{"id":26,"date":"2016-08-27T22:44:13","date_gmt":"2016-08-27T22:44:13","guid":{"rendered":"http:\/\/blog.get-map.org\/?p=26"},"modified":"2016-08-27T22:45:34","modified_gmt":"2016-08-27T22:45:34","slug":"openlayers-leaflet-and-other-improvements","status":"publish","type":"post","link":"https:\/\/blog.get-map.org\/index.php\/2016\/08\/27\/openlayers-leaflet-and-other-improvements\/","title":{"rendered":"OpenLayers -> Leaflet and other improvements"},"content":{"rendered":"<p><a name=\"preamble\"><\/a> <\/p>\n<p>I added some more improvements to <a href=\"http:\/\/maposmatic.osm-baustelle.de\">my MapOSMatic instance<\/a>:<\/p>\n<ul>\n<li> selecting a GUI language works again <\/li>\n<li> slippy maps are now created with Leaflet instead of OpenLayers <\/li>\n<li> rendered maps list and details page now show rendered area <\/li>\n<li> city search is fast again <\/li>\n<\/ul>\n<p>(details below)<\/p>\n<p><!--more--><\/p>\n<hr>\n<h2><a name=\"_selecting_a_gui_language_works_again\"><\/a>Selecting a GUI language works again<\/h2>\n<p>That one turned out to be simple after all:<\/p>\n<p>Somewhere along upgrading to newer Django versions the path that translations are searched in for changed from <code>www<\/code> to <code>www\/maposmatic<\/code><\/p>\n<hr>\n<h2><a name=\"_slippy_maps_now_using_leaflet\"><\/a>Slippy maps now using Leaflet<\/h2>\n<p>By switching from Openlayers to Leaflet some features could be added or improved by using Leaflet plugins:<\/p>\n<ul>\n<li> how to select a geographic are for rendering is now far more obvious <\/li>\n<li> modifying a selection by moving and resizing is now possible <\/li>\n<li> geographic area selection now has a search feature <\/li>\n<\/ul>\n<hr>\n<h2><a name=\"_showing_requested_area_in_maps_list_and_detail_view\"><\/a>Showing requested area in maps list and detail view<\/h2>\n<p>The bounding box of the selected city or area is now shown as a blue rectangle on the area map<\/p>\n<hr>\n<h2><a name=\"_city_search_is_fast_again\"><\/a>City search is fast again<\/h2>\n<p>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.<\/p>\n<p>As this query is done by the objects <code>osm_id<\/code> an index on this column greatly improves search performance<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/26"}],"collection":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":2,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}