on(map, "layer-add-result", function(layerAdded, errorMsg){ if(layerAdded.layer === myLayer){ console.log('found the layer i want, do something specific'); } });
The 'layer-add-result' event actually returns the layer that was added to the map in the callback.You would have to check in the callback which layer was added and then do something based on that.http://jsfiddle.net/tE4A3/7/ on(map, "layer-add-result", function(layerAdded, errorMsg){ if(layerAdded.layer === myLayer){ console.log('found the layer i want, do something specific'); } });
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.