The Maps extension appears to have a lot of excess code for supporting Google Maps, yahoo, etc. I see there also is geocoding, but it using Google Maps so we wouldn't want to use it.<br><br>Although, Google Maps and other non-free map services may be turned off with LocalSettings.php, I think it would be better not to have all that code in the extension. I would prefer to keep the code base small and simple as possible, and strictly have only open source mapping services in the code. <br>
<br>What does the Maps extension do that we can't do with SlippyMaps that we would want for OpenStreetMap integration? Let's do things the other way around, instead of using Maps extension, use SlippyMaps and incorporate what bits of Maps code that are useful into SlippyMaps? <br>
<br>-Aude<br><br><div class="gmail_quote">On Sun, Sep 6, 2009 at 4:38 PM, Yaron Koren <span dir="ltr"><<a href="mailto:yaron57@gmail.com">yaron57@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Ævar,<div><br></div><div>It's great, once again, to hear that Maps can be used as part of the OSM initiative - I think it makes a lot of sense as a solution. A few thoughts and responses:</div><div><br></div><div>- yes, Maps is modular - the code for services like Google Maps and Yahoo! Maps sits in standalone directories that can either be included or not, depending on the LocalSettings.php settings. For this project, only OpenLayers support would be included (and possibly support for a separate "OpenStreetMap" service, if such a thing were created to try to improve performance).</div>
<div><br></div><div>- similarly, Maps has no Semantic MediaWiki component - all of that code is contained, not surprisingly, in the separate extension "Semantic Maps". Maps was created with Semantic Maps in mind, but the two are independent.</div>
<div><br></div><div>- for retrieving the static image, am I correct in thinking that there is, or will be, an API that returns such an image, based on one or a set of coordinates? And that thus, the MediaWiki extension, whether it's Maps or anything else, doesn't have to worry about it much (besides knowing how to call the API)?</div>
<div><br></div><div>- I assume "marker=" sets the marker image? Maps doesn't allow users to set the image for the marker, so that should be fine. (We'll know not to add it. :) )</div><div><br></div><div>
- The one possibly bigger issue is the use of OpenLayers to let users browse through high-resolution images. You suggest turning that into a separate project; presumably so that that functionality won't slow down the regular OpenStreetMap stuff. I don't think that's necessary, though: in terms of PHP performance, having code that can handle all the OpenLayers stuff should affect performance only minimally, since it's just not much code... or was there another reason you wanted it to be separate?</div>
<div><br></div><font color="#888888"><div>-Yaron</div></font><div><div></div><div class="h5"><div><br><br><div class="gmail_quote">On Sun, Sep 6, 2009 at 11:33 AM, Ævar Arnfjörð Bjarmason <span dir="ltr"><<a href="mailto:avarab@gmail.com" target="_blank">avarab@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Fri, Sep 4, 2009 at 4:56 PM, jeroen De Dauw<<a href="mailto:jeroen_dedauw@yahoo.com" target="_blank">jeroen_dedauw@yahoo.com</a>> wrote:<br>
> After discussing with Ævar, we agreed that using the Maps extension [0]<br>
> instead of SlippyMap to display OSM maps with OL is probably a good idea,<br>
> assuming this is doable of course, which I think it is.<br>
<br>
</div>[see below]<br>
<div><br>
> I am able and willing to put quite some time into making the needed changes<br>
> to Maps. Before I can really start though, it would be helpful if I had the<br>
> most up to date code of SlippyMap, since a lot of it's current code can be<br>
> re-used. Is this the one committed to the SVN trunk? (I've downloaded that<br>
> code, but it's missing at least one file and giving other errors as well.)<br>
<br>
</div>I run the code from SVN (although with this patch:<br>
<a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=19961" target="_blank">https://bugzilla.wikimedia.org/show_bug.cgi?id=19961</a> but that<br>
shouldn't matter) and it works just fine. What file is missing / what<br>
errors do you get?<br>
<div><br>
> It would also be nice if the people who are working on this end of the<br>
> mapping effort give me a poke, so efforts can be coordinated, and no one<br>
> goes off to create duplicate or redundant functionality.<br>
><br>
> If anyone has objections to using Maps instead of SlippyMap, please voice<br>
> them, so we can discuss the advantages and disadvantages of using Maps.<br>
<br>
</div>To provide a bit of context Jeroen contacted me on IRC recently about<br>
this and I talked to Yaron (the other main author of Extension:Maps)<br>
about this as well.<br>
<br>
I don't care what piece of software we use for embedding maps into MW<br>
pages as long as it works. So if you're willing to modify the Maps<br>
extension so that it works for our purposes that's just great. One<br>
less thing for me to worry about.<br>
<br>
While I don't care /what/ software we use whatever we end up using has<br>
to be suitable for production deployment on Wikimedia sites for our<br>
purposes. Which means, among other things:<br>
<br>
* Making it fast<br>
<br>
I'm vaguely worried about the size of the Extension:Maps codebase<br>
compared to what we actually have to use. But then again I'm not that<br>
familiar with it and you said on IRC that it was all pluggable so you<br>
could just enable the parts you need.<br>
<br>
* Making it secure<br>
<br>
I fixed up a bunch of potential XSS injections in the SlippyMap<br>
codebase by being really paranoid about what input it accepts (see<br>
extractOptions in<br>
<a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SlippyMap/SlippyMap.class.php?view=markup" target="_blank">http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SlippyMap/SlippyMap.class.php?view=markup</a>).<br>
I also added parser tests (which Extension:Maps lacks) to make sure<br>
this all works.<br>
<br>
Perhaps you can reuse some of the parsertests work for Maps?<br>
<br>
* Making sure it doesn't bite us later<br>
<br>
The SlippyMap extension has a really limited featureset currently.<br>
Anything we enable we're going to have to support in the future (& has<br>
to be scalable). So Maps will have to be configured to expose a really<br>
limited featureset (e.g. no semantic stuff, or API queries to Yahoo).<br>
<div><br>
> These are as I see it the most important functionality to-do's:<br>
> * Migrate code from SlippyMap to Maps, mainly the static map handling<br>
<br>
</div>Rather than copying the huge pile of PHP code that calculates a<br>
bbox/scale from lat/lon/zoom it would probably be more worthwhile to<br>
work on this: <a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=19861" target="_blank">https://bugzilla.wikimedia.org/show_bug.cgi?id=19861</a><br>
<br>
But in any case I made the lat/lon/zoom -> bbox/scale code isolated<br>
from the rest so feel free to copy/paste until we have something<br>
better on the backend.<br>
<div><br>
> * Add the ability to display maps without any markers on them. Currently<br>
> maps has several parser functions, like display_point, which will display an<br>
> error when you don't provide any coordinates instead of displaying an empty<br>
> map. (Should be easy to do though.)<br>
<br>
</div>Regarding markers I was going to remove the marker= support in the<br>
SlippyMap extension, because:<br>
<br>
* It's limited. We want some sort of syntax to support multiple markers<br>
<br>
* In order to support anything like markers/kml layers/whatever we're<br>
going to have to support that in OpenLayers *and* on the static<br>
rendering backend.<br>
<div><br>
> * Optimize the code. Currenly Maps supports OpenLayers as mapping service,<br>
> and allows you to display maps from a variety of mapping services. On top of<br>
> that, the OL JS is far from optimal. Therefore I think it's best to simply<br>
> add a new service to Maps (this is done via a hook-like system build in<br>
> Maps), and create optimized handling for only OL+ OSM there, based on<br>
> current SlippyMap JS.<br>
<br>
</div>Sounds good.<br>
<div><br>
> * Optionally (probably not required in the first version) add image-as-layer<br>
> capabilities, allowing users to zoom and pan around high resolution images.<br>
<br>
</div>That's probably better done as a seperate project for File: pages as<br>
OpenLayers gets wider use within MediaWiki.<br>
<div><br>
> Anything mission critical I'm missing there?<br>
<br>
</div>Not that I can see.<br>
<br>
_______________________________________________<br>
Maps-l mailing list<br>
<a href="mailto:Maps-l@lists.wikimedia.org" target="_blank">Maps-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/maps-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/maps-l</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Maps-l mailing list<br>
<a href="mailto:Maps-l@lists.wikimedia.org">Maps-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/maps-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/maps-l</a><br>
<br></blockquote></div><br>