Hi guys
I have a query, I am printing several points (lat, long) on the map and want to know that the map center (lat, long) in order to show all the printed dots. Can someone help me please!!!
Solved! Go to Solution.
George,
There is a time to use centerAndZoom but what you described would better be using by setting the maps extent using
map.setExtent(graphicsUtils.graphicsExtent(yourArrayofGraphics), true);
George,
If you want the center of the map then you use
map.extent.getCenter()
or
map.geographicExtent.getCenter()
if it is the center of the graphics you are adding then you will use
graphicsUtils.graphicsExtent(yourArrayofGraphics)
.
thank you very much, and one more question as determined zoom to show all points on my map.
???
Sorry I'm new to the use of this API.
and I have the heart to my map, now I need is to know the zoom level so that all points are shown on the map.
I'm using this map.centerAndZoom (point, zoom);
George,
There is a time to use centerAndZoom but what you described would better be using by setting the maps extent using
map.setExtent(graphicsUtils.graphicsExtent(yourArrayofGraphics), true);
I understand, thank you very much for your help.