Select to view content in your preferred language

Changing extent of an ArcGIS Online map

1524
10
Jump to solution
10-10-2013 05:20 AM
HeiJo
by
Deactivated User
Hi everyone,
I follow this example: https://developers.arcgis.com/en/javascript/jssamples/ags_createwebmapitem.html
It's said those lines of code below can do changing the extent of the map, but when I try to modify the values of XMin, YMin, XMax, YMax it seems does not effect anymore:
//By default the extent will be that of the web map. Here we change it to a custom extent.            var extent = new Extent({             "xmin": "-13529153",             "ymin": "4665612",             "xmax": "-13281497",             "ymax": "872422882",             "spatialReference": {"wkid": 102100}           });            map.setExtent(extent);


So could any of you explain me why?
Thank you!
0 Kudos
10 Replies
ChristopherBlinn1
Deactivated User
Hei Jo,

To make is easier for future users to get the answer, if you could delete all other posts but your first and last, and mark my post as the answer it will greatly improve the quality of this question/post.

Thanks,
Chris B.
0 Kudos