Can I create an image from JavaScript API to add to a PowerPoint or Word Doc?

5838
29
12-07-2015 07:53 AM
JimSirianni
New Contributor

What I need to accomplish is to generate a map (client side) and highlight the county or zip code based upon geo locations that I have.

I also need to take that same map and generate an image that I can add to either a word or power point document.

Can this be done with ArcGIS?

I have tried with Bing and Google Maps and I am unable to create static images due to the url length.

0 Kudos
29 Replies
omega_cancer
Occasional Contributor II

To launch a print dialog in Chrome with a click of a button use:

print();

function to do the trick.

0 Kudos
JimSirianni
New Contributor

I just can't print the screen.  There will be other information on the screen as well.  So I will need the ability to just create an image of the map only.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jim,

   Then my suggestion of using the print service is your best option. This gives you a true image file to be used of just the map contents.

0 Kudos
JimSirianni
New Contributor

This seems to be the best route, however I do not know if the client will want to invest that money on a server just to accommodate printing. (On top of the licensing for the web api)

0 Kudos
ChrisSmith7
Frequent Contributor

Jim,

That's why I grab just the map content and add it to my own HTML print template (header and footer). My maps are embedded within a web app - just a small portion of the app are maps, but users can export just the map using the ArcGIS print service, or they can scrape only the map using the browser print function. Basically, you'd grab the container HTML and insert into a blank print template pop-up, then call the JS print functions. You can set it up just right so the pop-up only allows printing:

http://stackoverflow.com/questions/6460630/close-window-automatically-after-printing-dialog-closes

0 Kudos
JimSirianni
New Contributor

Thanks, I'll look at this code and see if I can accomplish what I need.

0 Kudos
omega_cancer
Occasional Contributor II
0 Kudos
JimSirianni
New Contributor

I've tried this one before and it doesn't work with maps.

0 Kudos
omega_cancer
Occasional Contributor II
0 Kudos
JimSirianni
New Contributor

Thanks, I'll check this one out.

0 Kudos