Talk:MediaWiki extension

From OpenStreetMap Wiki
Jump to: navigation, search

Discuss MediaWiki extension page here:



Merge the two extensions

Would it be possible to merge the two extensions?

  • By default, show the static map image.
  • Put a little "click here to make this map interactive" button into the map's corner using JavaScript. In print view, this button wouldn't be there, same in static mode or on browsers without JS.
  • If the button is clicked, the openlayers JS would be loaded and the interactive map would fill the screenspace formerly used by the static image.

Further, I don't think that going through the squids of WMF would be enough, I guess WMF would need to maintain a tilecache, perhaps using rsync updates. The squids don't cache requests for logged in users, and those are still many many requests. -- JeLuF 21:53, 14 June 2008 (UTC)


Caching Extension

I wrote a very simple Extension with caching support, to increase performance.

See http://en.hitchwiki.org/Buenos_Aires for an example.

Usage

<osm lat='8.33' lng='49.54' zoom='14' width='640' height='480' float='right' />

--MrTweek 09:15, 28 May 2008 (UTC)

SlippyMap Enhanced

I've done some changes to the SlippyMap extension:

  • load a static image for users without javascript.
  • add internationalization support by putting all messages into a message file.
  • speed up load time by postponing the loading of the parser (class autoload).
  • add a "marker" parameter to put a marker on the map.
  • show the PanZoom control on small maps, PanZoomBar on bigger ones.
  • added a button to reset the view.
  • added a button to get the wiki code for the current view (currently using a javascript "alert", needs to become a popup that can be used for cut&paste).

Tested on Firefox 2 & 3, Safari, Internet Explorer and Opera.

You can see an example at this page. Try it with and without Javascript.

The code is available at http://mormo.org/SlippyMap/ -- JeLuF 21:11, 16 June 2008 (UTC)


Usage of default Mediawiki syntax

I think it's better to use the default Mediwiki syntax. Instead of

<slippymap>lat=51.485|lon=-0.15|z=11|w=450|h=330|layer=mapnik</slippymap>

it's better to write

<slippymap lat="51.485" lon="-0.15" z="11" w="450" h="330" layer="mapnik" />

I the latter case, the parameter delivery is made by the Mediawiki software automatically. --Unger 05:45, 3 July 2008 (UTC)

Yes. The extension now supports both, but we're moving to follow that approach, since this is the standard MediaWiki way of doing things. Please update any usages in OSM wiki pages accordingly -- Harry Wood 13:57, 17 November 2008 (UTC)

Relations

Hi, perhaps the maps can be enhanced to display a give relation on the map. I think the main feature is to display "something". This could either be a point/marker or a relation. --ernie_hh 21:12, 9 July 2009 (UTC)

new static maps api can display relations - see links from talk@ list this week Ojw 11:29, 10 July 2009 (UTC)

Broken link

The link at the bottom of the Simple image MediaWiki Extension section is broken. --Luis Felipe Schenone (talk) 14:05, 25 July 2013 (UTC)

Ah yes. Well spotted. I've just updated that. Nowadays this extension links to staticmap.openstreetmap.de . The previous URL was the tiles@home server which is now discontinued -- Harry Wood (talk) 15:55, 25 July 2013 (UTC)