Zverik / Level0

Web-based OpenStreetMap Editor
http://level0.osmz.ru
Do What The F*ck You Want To Public License
54 stars 14 forks source link

Map position and preload #47

Open cascafico opened 3 years ago

cascafico commented 3 years ago

I'm running a script which extracts specific OSM notes and list them in a telegram message.

It would be nice such message contain not just note link, but also links to l0l, preparing map at note coordinates and possibly pre-loading data around a such coordinates. Is this possible?

Looking at documentation I've fount example of pre-loading a node ("To open the editor with a preloaded object or map region, use url query parameter: e.g. http://level0.osmz.ru/?url=node/240095754"), but no examples of "preloaded map region".

I made some attempts trying for instance http://level0.osmz.ru/index.php/map=17/41.882874/4.321425 but map keeps displaying map at coordinate from cache.

Zverik commented 3 years ago

Try http://level0.osmz.ru/?url=map=17/53.91262/27.629858 (maybe you would need to replace = with a %-encoded sequence)

cascafico commented 3 years ago

Try http://level0.osmz.ru/?url=map=17/53.91262/27.629858 (maybe you would need to replace = with a %-encoded sequence)

The url loads correctly the data around coordinates defined by url.

The problem is the persistency of map which is not updated at new coordinates, unless I click one of the data elements on the left pane; if I do so, marker is placed on selected element and the original coordinates (where I want to place my POI) are lost.

Behaviour I would expect when accessing URL at new coordinates is a map update, centered at URL coordinates and possibly with a marker.

I tested just a couple of browsers, Chrome v78 and Internet Explorer v11. No need of url encoding.