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.
Jim,
In addition to Robert's suggestion, you can scrape the HTML from the map and launch a print window from the browser. In Chrome, I can send the printout to MS OneNote. In our mapping app, we allow the user to "export" an image/PDF using the ArcGIS print service, or, we allow the user to "print" using the HTML scrape.
How did you accomplish this with a screen scrape? There isn't a said image (tag) to scrape off the page.
I simply create a blank HTML page from text in js. Inside of the page, insert the map content, which, in my case, is just the innerHTML of the document - document.documentElement.innerHTML
(I pipe-in maps over an iframe, so I just grab the whole page).
You can then just open a print dialog and write the HTML, and voila, a scrape of the map.
So you are just scrapping the div container and everything that is in it? Also is this approach valid? I was trying to go down this route for Google Maps but was told it could be in violation of the terms of service.
If you're licensed for the product, there shouldn't be any issue with doing this - you're just printing the page. You may want to have a look at this:
Is the ArcGIS Server JavaScript API free to use? - Geographic Information Systems Stack Exchange
So you were able to just grab the parent map div and scrape to an image?
It's not an image - it would be a printout from the browser using a scape of the map's HTML - the browser might support saving as an image though. For instance, in Chrome, I can send the printout as an image to MS OneNote.
..or just Print Screen?....
That would get my vote, unless they need functionality for users on the system.
Not an option. They have to be able to click a button and have that map image added to a document.