Morning,
I have recently been updating metadata on hosted feature services on AGOL.
When I try and add an extent for a bounding box using the 'current features in layer' option the bounding box itself is accurate but the coordinates referenced are not accepted. To get around this I need to adjust the bounding a minor amount and then coordinates update to a format that is accepted.
Is this the expected behaviour? Has anyone else noticed or come across this before?
See attachment for reference.
Thanks,
Andy
Hi @AndrewHankinson,
Yes, you can do this. Use featureLayer.queryExtent() to get the bounding box of filtered or visible features, then use view.goTo(extent) to zoom the map. Works well in custom widgets or embedded JS logic.
If you want something static or repeatable, use Minimum Bounding Geometry in ArcGIS Pro to create envelopes, then publish and use them in your app.
Dynamic = JS/API. Static = preprocessed in Pro.
Regards,
Venkat
Thanks for the response @VenkataKondepati , but I don't think that answers my question. The issue is when I apply a bounding box in AGOL the coordinates are not accepted as they are and I need to manually adjust the bounding box to correct the coordinates.