python 2.7 - Deleting a marker from folium map -


i making application in have stream of locations need mark on map. show particular number of markers on map, need replace few of old markers new markers.

i using folium.simple_marker() mark locations.

is there function delete specific marker?

import folium map_1 = folium.map(location=[latitude,longtitude], zoom_start=9,) location in locations:    map_1.simple_marker([location.lat,location.longt], popup='') map_1.create_map(path='map.html') 

this not built-in function, can use

del map_1.template_vars.get('custom_markers')[0] 

this removes oldest marker in map object. standard python call. not find in folium need.

it seems though of map's objects in template_vars dictionary, way.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -