OpenStreetMap logo OpenStreetMap

Drupal openstreetmaps

Posted by kaerast on 14 December 2008 in English.

Today I started moving a Drupal website from using google and gmap to openstreetmap. Ugh, the process is ugly and horrible using existing modules - to the extent that it would almost have been easier to just write some php from scratch. However, the first step of displaying locations is now complete.

It took installing the mappingkit module (http://drupal.org/project/mappingkit) module, specifically the Map assist, map client, map context, map layer, mapping kit, openlayers map client and wms modules.

Then a context is needed, just let it create the default ones and then edit to your location (I just need a bounding box covering UK)

Then a layer is needed, just create one and don't argue about the fact that you're never going to use it.

Then you need to ensure your data is available through a public geo-encoded rss feed.

Then you can use map assist to create a macro for the map.

Finally, you can edit the macro to use a sensible zoom and center setting. Leaving me with: [map context="node/37/context" baselayers="osm,none" layers="1" 1="georss|event/feed|events" zoom="8" center="-1.28264,53.57226" width="700" height="400" /]

I really dislike javascript and openlayers coding, so I'm not the person to make this much simpler and I'm really not looking forward to switching the geoencoding modules to something open.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment