How to show busy icon when leaflet api load tile images RSS

المشرف العام

Administrator
طاقم الإدارة
i like to know is there any way exist in leaflet api which i can fire when it load tile and when tile loading finish then another function will be called.

i was reading leaflet api and found in this url http://leafletjs.com/reference.html#tilelayer

there is two event exist called

loading and load

which may solve my purpose. basically i want to show busy icon when map api will load tiles and i want to hide busy icon when loading will be completed.

but i do not find any sample code like how to attached these event called

loading and load

with my map api. so it will be helpful if some one show me how to attached this two function

loading and load

with map api. if possible please attach a jsfiddle link in answer. thanks



أكثر...
 
أعلى