Hii All,
I have loaded map using portal/portal item. Now i want to add/sync feature(point) on the same map, how can i add/sync, please help.
Hello,You can add the point graphic to the same map using below code snippet:
// create and add a map with with portal itemval map = ArcGISMap(portalItem)// add the marker graphic to the graphics overlaygraphicsOverlay.graphics.add(markerGraphic)mapView.apply { this.map = map// add the graphics overlay to the MapView graphicsOverlays.add(graphicsOverlay)}
// setup the red pin marker as a Graphicprivate val markerGraphic: Graphic by lazy { // creates a symbol from the marker drawable val markerSymbol = PictureMarkerSymbol.createWithImage(markerDrawable).apply { // resize the symbol into a smaller size width = 30f height = 30f } // create the graphic from the symbol Graphic(symbol = markerSymbol)}
Let me know if this helps?
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.