Logo OpenStreetMap OpenStreetMap

Drupal openstreetmaps

Zapsal kaerast 14. 12. 2008 v jazyce 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.

Ikona e-mailu Ikona Bluesky Ikona Facebooku Ikona LinkedIn Ikona Mastodonu Ikona Telegramu Ikona X

Diskuse

Přihlaste se k zanechání komentáře