Extension talk:SlippyMap
Add topicDiscuss Extension:SlippyMap page here:
User documentation
[edit]There is no information on the syntax for this extension. That of course does not help in the adoption of it. Please provide some user documentation. Cheers! Siebrand 17:24, 13 November 2008 (UTC)
- OK I've put some basic info. -- Harry Wood 17:49, 13 November 2008 (UTC)
Developing at OpenStreetMap
[edit]I'm working on this extension code. There's currently a different (better) version over at the OpenStreetMap SVN repo: http://svn.openstreetmap.org/applications/utils/wiki-extensions/SlippyMap-local/ but we'll aim to get it checked in here too/instead -- Harry Wood 17:49, 13 November 2008 (UTC)
- I updated the extension in MediaWiki's svn. However, a few issues: no more markers, no more buttons. See betawiki:User:Siebrand. Siebrand 09:24, 14 November 2008 (UTC)
- I fixed an XHTML issue in rev:43481. Siebrand 09:37, 14 November 2008 (UTC)
- Re-added the marker in rev:43482. Siebrand 09:48, 14 November 2008 (UTC)
Cool OK. Wasn't expecting that to happen quite so quickly, but good that we're more in sync now. You know I did also disable 'KML' support in that copy.
The reason I disabled markers and KML temporarily is because I wanted to discuss wiki syntax. If we unleash these things on the OSM wiki then we have a lot more hassle fix the syntax usages later. We are currently going through the hassle of switching from old to new syntax for the basic params.
So I was thinking for the markers it's going to be better if we are vaguely following a similar syntax as Extension:Google_Maps/Syntax. Easy enough to code.
-- Harry Wood 13:47, 17 November 2008 (UTC)
- Why not request MediaWiki SVN access and maintain the beast directly? Siebrand 14:11, 17 November 2008 (UTC)
- hmmm suppose I could -- Harry Wood 11:06, 23 November 2008 (UTC)
Upgrade Slippymap like Googlemap
[edit]Hi Harry, do you now the Googlemap-extension? It makes it easy to build a slippy-map with markers, klickable marker-text and routes by simple wiki-syntax:
<googlemap lat="..." lon="..." type="map" zoom=".." width="..." height="..."> lat, lon, marker_text lat, lon, marker_text </googlemap>
Can you upgrade the Slippymap-extension like this? I would like to use OSM, and I need this feature for our city-wiki. Thanks a lot, --Markus BĂ€rlocher 23:00, 10 March 2009 (UTC)
- Yes on the TODO list I've written "Change syntax to be in line with Extension:Google Maps". This was particularly with this marker syntax in mind. For implementing marker/polyline stuff I pondering switching to the Maptraction API. That way we might one day merge with the google maps extension! (I'm sure I'm overestimating how compatible these things are, but we can dream)
- In the long run we should also get some inspiration from the google maps extension regarding providing a toolbar button above the edit box which makes it easier to design your map. Actually the way that extension does it, leaves plenty of room for improvement.
- -- Harry Wood 15:27, 11 March 2009 (UTC)
- Hi Harry, this sounds great! May be you can cooperate with Evan Miller? What is your timetable about? --Markus BĂ€rlocher 20:47, 12 March 2009 (UTC)
addOnLoadHook
[edit]With a previous version there was an addOnLoadHook() call which was added in order to defer loading of the javascript. For me this seemed to cause IE7 to crap out completely with "operation aborted" error making the wiki page completely unviewable. This code was also inelegant because it requires a modified copy of OpenStreetMap.js . Not only that, but it was loaded in from a hardcoded svn.wikimedia.org remote URL rather loading the local file.
For those reasons I removed that whole chunk of code in my latest version (one with the blue button graphics added) which is now in SVN.
...but actually looking at this Betawiki:User:Raymond/Kölner_Dom example. That's running a version with the addOnLoadHook, which does not crash IE. hmmm. I notice in this HTML there are other 'addOnLoadHook' calls higher up (outside of the extension output). Maybe that helps it to work.
-- Harry Wood 11:06, 23 November 2008 (UTC)
Using templates with slippymap
[edit]Hi,
is it possible to use the slippymap extension within templates? I tried several things, but nothing worked for me.
I tried to use the variables
|lat=51.743 |lon=7.877
and in the template was
|- ! colspan="2" | <slippymap lat={{{lat}}} lon={{{lon}}} z=15 w=300 h=200 format=jpeg layer=mapnik/>
But I got the error that lat=%1 does not work.
Thanks for help
--Hanniball76 10:59, 14 May 2009 (UTC)
- Try something like this in your template wikicode:
{{#tag:slippymap||lat="{{{1}}}"|lon="{{{2}}}"|z="15"|w="300"|h="200"|format="jpeg"|layer="mapnik"}}
- That's using the #tag magic word [1]
- You can see something similar working on this page. That's actually a different extension [2], but the same idea should work for slippymap.
- -- Harry Wood 15:58, 10 June 2009 (UTC)
%1
[edit]Messages 'slippymap_widthnan', 'slippymap_heightnan', 'slippymap_zoomnan', 'slippymap_latnan', 'slippymap_lonnan' and 'slippymap_invalidlayer' (and of course their translations) should probably use $1 instead of %1. Also, message 'slippymap_osmlink' seems to be unused. --Lockal 15:37, 23 June 2009 (UTC)
Maps and Semantic Maps
[edit]Hey,
What are the future plans with this project?
I think it's a good idea to move towards integrating this extension with Maps and Semantic Maps if possible. What are your thoughts on this?
Cheers
-- Jeroen De Dauw 00:58, 15 August 2009 (UTC)
Just a small bug
[edit]The extension works brilliantly for everything I need to use it for but I noticed something when I was writing a help page for my editors who might wish to embed a single map onto a page. This isnt a problem, but to demostrate the uses on the help page itself I wanted to embed several maps, but found that interacting with one map meant I was interacting with all of them. I cant see any reason why I would need to embed more than one map on a page other than the fairly obscure purpose of writing a help page so its not a big issue, just though I would mention this. Other than this, 10 out of 10. Thanks.
- Development on this extension will most likely not continue. You will be better off using Extension:Maps. siebrand 14:54, 14 November 2009 (UTC)