Select to view content in your preferred language

Map callout does not display when Esri is started first time in android

3490
10
04-12-2019 05:07 AM
AhsanApp
Occasional Contributor

I have to restart my Esri map or restart app to show map callout but the map callout is actually present in the desired location but never displays in the first launch of the app. Here is my code.

mMapView = findViewById(R.id.map);
//ArcGISMap map = new ArcGISMap(SpatialReference.create(2868));
ArcGISMap map = new ArcGISMap(Basemap.createStreetsVector());
mMapView.setMap(map);
//new Handler().postDelayed(()->mMapView.setMap(map), 3000);
mMapView.getGraphicsOverlays().add(graphicsOverlay);
PictureMarkerSymbol pictureMarkerSymbol = new PictureMarkerSymbol((BitmapDrawable)getResources().getDrawable(R.mipmap.pin_blue));
Map<String, Object> attr = new HashMap<>();
attr.put("position", i);
attr.put("name", record.getName());
Graphic graphic = new Graphic(point, attr,pictureMarkerSymbol);
graphicsOverlay.getGraphics().add(graphic);
0 Kudos
10 Replies
DastanIqbal
New Contributor

<?xml version="1.0" encoding="utf-8"?>

<resources>

    <calloutStyle

        backgroundColor="#0FFF"

        borderColor="#0000"

        borderWidth="2"

        leaderLength="0"

        leaderWidth="0" />

</resources>

Hope this help

0 Kudos