which one is better? or are there any better ways of doing this? thanks,
if ( map.getLayer(map.graphicsLayerIds).type != "Feature Layer")
or
if ( !map.getLayer(map.graphicsLayerIds).hasOwnProperty("type"))
.....
Try it:
if ( map.getLayer(map.graphicsLayerIds).declaredClass === "esri.layers.GraphicsLayer")
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.