int[] graphicIDs = graphicsLayer.getGraphicIDs(x, y, 25); if (graphicIDs != null && graphicIDs.length > 0) { //Graphic gr = graphics[0]; Graphic gr = graphicsLayer.getGraphic(graphicIDs[0]); updateContent((String) gr.getAttributeValue("Rating"), (String) gr.getAttributeValue("Title")); Point location = (Point) gr.getGeometry(); callout.setOffset(0, -15); callout.show(location, content); }
HashMap<String, Object> map = new HashMap<String, Object>(); map.put("note", ""); graphicsLayer.updateGraphic(graphic.getUid(), map);
HashMap<String, Object> hashMap = new HashMap<String, Object>(); hashMap.put("Title", title); hashMap.put("BodyText", bodyText); graphicsLayer.addGraphic(new Graphic(point, symbol, hashMap, null));
Point location = (Point) gr.getGeometry();
map.setOnSingleTapListener(new OnSingleTapListener() { private static final long serialVersionUID = 1L; public void onSingleTap(float x, float y) { if(callout != null){ callout.hide(); } else { callout = map.getCallout(); callout.setStyle(R.xml.calloutstyle); } int[] graphicIDs = graphicsLayer.getGraphicIDs(x, y, 25); if (graphicIDs != null && graphicIDs.length > 0) { Graphic gr = graphicsLayer.getGraphic(graphicIDs[0]); updateContent((String) gr.getAttributeValue("Rating"), (String) gr.getAttributeValue("Title")); Point location = (Point) gr.getGeometry(); callout.setOffset(0, -15); callout.show(location, content); } } });
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.