AnsweredAssumed Answered

Get selected single point geometry, use in map.centerAndZoom

Question asked by davidchrest on Oct 6, 2015
Latest reply on Oct 7, 2015 by davidchrest

I can easily zoom to a selection of points in my FeatureLayer with this handy one-liner:

map.setExtent(graphicsUtils.graphicsExtent(myFeatureLayer.getSelectedFeatures()), true);

In this case, it's assigned to a button.


How do I utilize the map.centerAndZoom when just a single point of my Feature Layer is selected?

Just want to assign to a different button. I can't seem to find the exact syntax but I know I need to grab the geometry of the single selected point to then use in map.centerAndZoom.


Thnks so much. Any help is greatly appreciated.