[OSM-dev] Projection Issues
Christopher Schmidt
crschmidt at crschmidt.net
Wed May 31 19:30:23 BST 2006
On Wed, May 31, 2006 at 06:45:35PM +0100, Nick Whitelegg wrote:
> >At this point, I'm largely just confused, and I'm willing to
> >admit that I think with the current setup, OSM and OpenLayers simply
> >aren't going to work together. I don't claim to understand projections
> >well enough to know what's going on, and without knowing that, I can't
> >begin to create a tile system that will grab tiles in the same format as
> >OSM currently is.
>
> Having seen this talk of OpenLayers, I was going to experiment with it
> this evening to see if it will talk to the new renderer (see recent dev
> posts). Will OpenLayers accept the URL of a simple WMS-compliant server
> i.e. a script which accepts bbox, width, height and layers parameters? I
> note that the examples e.g. the Boston Free Map take a ".map" file which
> is (I believe) a configuration file for Mapserver, but presumably
> OpenLayers will talk to any WMS server.
Yep. The mapfile is just a configuration file, but OL will talk to any
WMS.
The problem I was having with the new renderer is a 'zoom' parameter,
which I wasn't sure what effect it had :) But it does seem that the new
dev renderer works fine in OL:
http://crschmidt.net/projects/openstreetmap/devrender
The only modification I had to make to the OL code was to change bbox to
BBOX, etc.: Capitalizing keys in the URL request. Note that this is
against the WMS spec -- params are case insensitive -- so you should
probably just lowercase or uppercase all your param values, with
something like :
foreach(array_keys($_GET) as $key) {
$_GET[strtoupper($key)] = $_GET[$key];
}
to be compatible with as many WMS clients as possible. (Is this code in
SVN? I couldn't find it, or I'd have attached a patch.)
In any case, if this new renderer is actually going to be deployed in
the relatively near future, messing around with any of the other code is
probably not worthwhile.
--
Christopher Schmidt
Web Developer
More information about the dev
mailing list