Jump to content

Variable Maps


tsghost

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 1 year later...
  • 3 months later...
  • 1 year later...

I know this is an old post, but I was asked to investigate Variable MAPS.

Need maps (image) and directions from point A (variable) to point B (static).

I have been looking for information, but not to much out there.

Not sure how to implement API's, (Google maps API), (JavaScript Maps API).

I can find information all day long on how to link maps to a website, but nothing about images for variable printing.

 

Any insight anyone can give would be appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

You can bring just about any graphic from the Internet into your FusionPro job by calling the CreateResource function with a URL starting with "http://" in a Graphic rule. This includes things like barcodes, maps, and any other images you can obtain with a URL, including those generated from web APIs such as Google Maps, MapQuest, Bing, and many others.

 

So you could do something like this to include a map in your output:

return CreateResource("http://maps.googleapis.com/maps/api/staticmap?center=201%20Lomas%20Santa%20Fe%20Drive,Solana%20Beach,CA&zoom=14&size=400x400&sensor=false");

It's not hard to build a URL like this from your own data in JavaScript.

 

However....

 

:eek: GIANT CAVEAT!!! :eek:

Most commercial mapping APIs, such as Google Maps, have very specific licensing terms, which generally limit or prohibit the use of such maps in a printed piece, at least without a paid access key. There are also limits as to the number of maps which can be generated in a period of time, and other restrictions, especially for commercial use. There are open-source mapping and GIS systems which may have less restrictive terms. In any case, though, please read the licensing terms very carefully. PTI is not responsible for any liabilities or damages which you may incur from using FusionPro to access online GIS/map generation systems, or any other web APIs or online material, in an unauthorized way.

That said, though, feel free to investigate any mapping APIs and how you can license them for use in your own FusionPro jobs.

Link to comment
Share on other sites

  • 9 months later...

I was able to get a map with 2 markers to show up but I can't figure out how to get the driving path / line between the two locations to show up. Any ideas out there?

This is the code I have so far:

 

var map = CreateResource("http://maps.googleapis.com/maps/api/staticmap?size=800x800&maptype=roadmap&markers=color:red%7Clabel:A%7C"+saddr+"&markers=color:red%7Clabel:B%7C"+daddr+"&travelMode:google.maps.DirectionsTravelMode.DRIVING&sensor=false");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...