openlayers WebMapServiceLayer (wms)

Hi
I’m trying to display a wms layer with the UK OS grid (EPSG: 27700) but it simply doesn’t work (i.e. it doesn’t display anything).
I note the example says “has not been tested” due to unavailability of a suitable server.
I also note that my javascript has a options being set - such as

tilesorigin: [map.maxExtent.left, map.maxExtent.bottom]

attribution: ‘Contains Ordnance Survey data &copy Crown copyright and database right 2012’,
dpi:90,
tiled:‘true’,

for which there are no equivalents in the vol object.

Since I’m an utter novice in vaadin and gwt (8 hours yesterday - most of it banging my head against this particular wall) and a comparative novice in openlayers (I inherited code from another programmer and just added things to it) I’m reluctant to leap into opensource collaboration on this one - but I can contribute a working wms server with that projection if somebody is willing to work with me to look at the problem.
It’s our server and the data is all OS (UK Ordnance Survey) OpenData - so there’s no copyright restrictions.

Can anyone help?

Thanks
Tim

Hi,

GIS is hard even with great tools like Vaadin and OpenLayers :frowning:

The first thing you will face here is with custom projections. OpenLayers by default supports “google mercator” and EPSG:4326. To use others you need to add proj4js library and definition of your projection. You can add those javascripts via you widgetset.

Example definition:
http://code.google.com/p/vopenlayers/source/browse/trunk/src/test/java/org/vaadin/vol/demo/public/customprojections.js

A widget set that adds those javascripts:
http://code.google.com/p/vopenlayers/source/browse/trunk/src/test/java/org/vaadin/vol/demo/VolExampleAppWidgetset.gwt.xml

Example using custom projection:
http://code.google.com/p/vopenlayers/source/browse/trunk/src/test/java/org/vaadin/vol/demo/CustomProjectionWithWms.java

cheers,
matti

Hey Matti, thanks. I’ll give it a go when back at the computer this evening.