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")
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.