1

I'm working on arcgis javascript api, and I'm trying to implement a selection print tool, I'm new to this api, and don't know how to select area of the map, and after that, print the selected drawn area. Any help?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 28, 2014 at 9:05

1 Answer 1

2

As far as I can tell, you'll need to just zoom in on the selected area and print it, assuming you're using the Print Task found here: https://developers.arcgis.com/javascript/jsapi/printtask-amd.html. It doesn't look like there's an option to print only part of what's visible.

Note: The PrintTask requires an ArcGIS Server 10.1 Export Web Map Task. So make sure you've got that first.

Create a navigation toolbar and set it to ZOOM_IN: https://developers.arcgis.com/javascript/jsapi/navigation-amd.html. That will be your "select an area of the map".

Now, there is also an option that's just referred to as "export": http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/

1) This is not the same thing as the Export Web Map task.

2) It does not print the basemap, only the layers on your server.

3) It does allow you to specify a bounding box.

If export is available on your server and you choose this option you'll want to use the Draw toolbar instead of the navigation area: https://developers.arcgis.com/javascript/jsapi/draw-amd.html. Get the extent of the shape once it's drawn and pass the xmin, ymin, xmax, ymax to the export function.

answered Nov 17, 2014 at 15:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.