The SWMC Wiki is currently under review.

Maps test

From SWMC Wiki
Jump to: navigation, search

New Maps Extension

http://www.mediawiki.org/wiki/Extension:Maps looks interesting and more powerful than the map extension we currently use.

Yes that does look pretty powerful - and complicated ;-) --Alan rosier 13:07, 2 March 2010 (UTC)

'Maps' Installed

OK... it's setup now. This extension is under active development. As it stands, it is quite powerful. I expect many more features to be added.

It doesn't seem (yet) to allow wiki markup in popups. However, it does support OpenStreetMaps. OpenStreetMaps allows us to edit the actual maps. Could be useful to map access routes, etc. See http://www.openstreetmap.org/ .

I suggest using this extension in preference to the other one. The syntax is easy and neat and hopefully we can incorporate it in templates.

Look at the following examples and have a play. Further info to be found at http://www.mediawiki.org/wiki/Extension:Maps





Displays the default map (GoogleMaps) with Swansea marked as a point and centered. Default map size used. N.B. This automatically uses Google's Geocode service to get the lon/lat coordinates! Clever, huh?

{{#display_point: Swansea, Wales}}
Loading map...





Displays the above but with OpenStreetMap using the default map size N.B. This may technically speaking be "illegal" as it displays info on Openlayers byt uses Google's Geocoding service. I think Google says we shouldn't do this. Simple fix - replace "Swansea, Wales" by lon/lat coords.. **STOP PRESS** This is untrue. The default geocoding service is Geonames and there is no restriction as far as I can tell.

{{#display_point: Swansea, Wales
| service=openlayers
| layers=osmarender
}}
Loading map...


Displays point using coordinates - default mapping (Google) and map size.

{{#display_point: 51.5791486, -4.0709835}}
Loading map...





The following geocodes places to coordinates using the default Googlegeocoding service N.B. Legal, because it uses defaults; i.e. GoogleMaps and GoogleGeoCode services. **STOP PRESS** It actually uses Geonames for geocoding. Not sure if this is "legal".

{{#geocode: Pennard, Swansea}}

51° 34' 32.89" N, 4° 5' 17.84" W





The following defines height and width and uses the OpenStreetMap CycleMap, specified with long/lat coodinates and various controls

{{
#display_point:51.5791486, -4.0709835
|service=openlayers
|height=800
|width=800
|zoom=14
|layers=osm-cyclemap
|controls=panzoombar,scaleline,overviewmap,keyboarddefaults,navigation,layerswitcher
}}
Loading map...





OpenStreetMap (OpenCycleMap) centred on Barland Quarry. N.B. This one's interesting because it is entirely legal and even has the track marked that goes down to the foot of the slab. I believe this feature was added to the map by club member Steve Hill. The track is absent from GoogleMaps!

{{
#display_points:51.586015, -4.057088
|service=openlayers
|height=600
|width=800
|zoom=14
|layers=osm-cyclemap
|controls=panzoombar,scaleline,overviewmap,keyboarddefaults,navigation,layerswitcher
}}
Loading map...





As above but using OpenLayers Mapnik - (Now with choice of layer - --Tim Hoddy 10:31, 7 April 2010 (UTC))

{{
#display_points:51.586015, -4.057088
|service=openlayers
|height=600
|width=800
|zoom=14
|layers=osm-mapnik osmarender, osm-cyclemap
|controls=panzoombar,scaleline,overviewmap,keyboarddefaults,navigation,layerswitcher
}}
Loading map...




As above but using OpenLayers OsmaRender (Now with choice of layer - --Tim Hoddy 10:36, 7 April 2010 (UTC))

{{
#display_point:51.586015, -4.057088
|service=openlayers
|height=600
|width=800
|zoom=15
|layers=osmarender, osm-mapnik, osm-cyclemap
|controls=panzoombar,scaleline,overviewmap,keyboarddefaults,navigation,layerswitcher
}}
Loading map...