OpenLayers -> Leaflet and other improvements

I added some more improvements to my MapOSMatic instance:

  • selecting a GUI language works again
  • slippy maps are now created with Leaflet instead of OpenLayers
  • rendered maps list and details page now show rendered area
  • city search is fast again

(details below)

Selecting a GUI language works again

That one turned out to be simple after all:

Somewhere along upgrading to newer Django versions the path that translations are searched in for changed from www to www/maposmatic

Slippy maps now using Leaflet

By switching from Openlayers to Leaflet some features could be added or improved by using Leaflet plugins:

  • how to select a geographic are for rendering is now far more obvious
  • modifying a selection by moving and resizing is now possible
  • geographic area selection now has a search feature

Showing requested area in maps list and detail view

The bounding box of the selected city or area is now shown as a blue rectangle on the area map

City search is fast again

City search works by first querying Nominatim for possible matching OSM objects, then checking the local database whether a returned match is indeed a city.

As this query is done by the objects osm_id an index on this column greatly improves search performance

One thought on “OpenLayers -> Leaflet and other improvements”

Leave a Reply

Your email address will not be published. Required fields are marked *