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")
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.