[Maps-l] Usage of Maps instead of SlippyMap

Ævar Arnfjörð Bjarmason avarab at gmail.com
Mon Sep 7 11:07:58 UTC 2009


On Sun, Sep 6, 2009 at 8:38 PM, Yaron Koren<yaron57 at gmail.com> wrote:
> Hi Ævar,
> 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:

> - 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).
> - 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.

My questions reveal how little I know about Extension:Maps :)

It sounds like it will work just fine & is designed in a modular
enough fashion to not bog us down in any way.

> - 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)?

Yes to get a static map the extension just has to include a <img> tag
pointing at the static map server(s). E.g.:

http://cassini.toolserver.org/cgi-bin/export?bbox=-0.2214,51.4746,0.0316,51.5878&scale=110000&format=png&locale=en&maptype=osm-like

Calculating the "bbox=-0.2214,51.4746,0.0316,51.5878&scale=110000"
part is what all the complexity in SlippyMapExportCgiBin.class.php is
about. But hopefully we'll be able to specify
"lat/lon/zoom/width/height" instead soon which will save us all that
complexity.

> - 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.
> :) )

The marker is set (currently) with marker=1 which will turn on an
OpenLayers.Marker in the JavaScript:
http://dev.openlayers.org/docs/files/OpenLayers/Marker-js.html

I'm going to remove that until we've figured out how do do this in an
extensible and open-enden way. Like e.g.:

<maps lat=.. lon=.. zoom=..>
some code that specifies lots of markers / layers / highlighting of
OSM data here
</maps>

AND if we're going to add marker support the static map service needs
to support that too.

> - 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?

The reason I suggested a separate project was because Jeroen ended his
bullet point list of requirements with "Anything mission critical I'm
missing there?". So I thought he might be under the impression that
this functionality was needed for getting maps embedding to work.

But we're probably talking about separate things here.

It has been suggested to use OpenLayers for huge images on image
description pages. There's a demo of how this might work here:

  http://toolserver.org/~kolossos/zoom-image/zoom-ol.html

I thought he had looked at that demo and were talking about that. It
would be an interesting project but to do it properly (for supporting
huge images at commons) you'd have to split images into tiles on
demand and embed OpenLayers into image pages. Which would be a
different sort of embedding than embedding maps into articles
(although using much of the same techniques).

Another way it might be done is with OpenLayers.Image (like for
scrolling a panorama), e.g.:

  http://openlayers.org/dev/examples/image-layer.html

In any case both of those are interesting problem to work on and if
you're interested in either one by all means go for it.



More information about the Maps-l mailing list