yourcelf / olwidget

Javascript library to replace textareas that contain WKT data with editable OpenLayers maps, and a django app using it for django forms and admin.
Other
91 stars 43 forks source link

Create global variable for map, so other js can interact #122

Open wildintellect opened 10 years ago

wildintellect commented 10 years ago

Looking at http://stackoverflow.com/questions/9153914/geodjango-olwidget-adding-a-control-to-a-map I was wondering why the templates aren't just modified to: var map = new olwidget

That way other js outside olwidget could manipulate the map. In my case based on user action I want to recenter the map. Not sure what to do with multiple maps on the same page.