The graphics object is available to use after the Map.onLoad event.
dojo.connect(map, "onLoad", function() { var pt= new esri.geometry.Point(x,y,sr); var sms= new esri.symbol.SimpleMarkerSymbol(...); var label = new esri.Graphic(pt,sms); map.graphics.add(label); });
Thanks Stevel. I tried that as well, still it was giving me the same error. Any thoughts?
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.