TransWikia.com

Update graphic on Graphic layer with new Geo point (new current location)

Geographic Information Systems Asked by Kalpitbm on March 9, 2021

We have migrated ArcGIS library from 10x to 100.9.0.

In our App we have the functionality of change mock location using long press. Below is the code snippet of 10x which is working fine.

Graphic graphic = mGraphicsLayer.getGraphic(marker);
if (graphic != null) {
Point point = LocationUtils.convertToMapPoint(position, getSpatialReference());
final Point geometry = (Point) graphic.getGeometry();
geometry.setXY(point.getX(), point.getY());

mGraphicsLayer.updateGraphic(marker, geometry);
mGraphicsLayer.bringToFront(marker);
}

After Migration we does not found any method like update graphic and change location of marker which is already drawn on Graphic layer. We have more than 1000 marker on Map so also not feasible to clear and redraw all again.

I tried so much but there are no such documentation help. So we are stuck now and do not know how to migrate above code with new library.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP