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")
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.