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")
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.