private function showLocation(data:Object):void { hideInfoWindow(); graphicsLayer.clear(); var ptGraphic:Graphic = new Graphic(); ptGraphic.geometry = data.point; graphicsLayer.add(ptGraphic); var contentNavigator:ContentNavigator = new ContentNavigator(); // //Here is where you need to use a querytask to get the layers graphic that you want the popup to appear for // then after the async result from the query returns. // then you set that graphic in the contentNavigator.dataProvider // contentNavigator.dataProvider = new ArrayList([ resultGraphic ]); // Put the ContentNavigator in the info window. map.infoWindowContent = contentNavigator; if (map.scale > zoomScale) { map.scale = zoomScale; } map.centerAt(data.point); map.infoWindow.show(ptGraphic); }
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.