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.
To launch a print dialog in Chrome with a click of a button use:
print();
function to do the trick.
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.
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.
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)
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
Thanks, I'll look at this code and see if I can accomplish what I need.
Have a look at https://html2canvas.hertzen.com/examples.html
I've tried this one before and it doesn't work with maps.
and this div to image - JSFiddle
Thanks, I'll check this one out.