Skip to main content

Openlayers Openlayers2 and Geoserver: OSM/Google Maps and WMS Overlay

In case I open the WMS layer in the OpenLayers preview of GeoServer, it looks okOK:

The question is: Why is my shapefile distorted in my OpenLayers application, but not in the GeoServer preview? As you can see, the GeoServer preview uses EPSG:4326 and my OpenLayers application EPSG:900913 (Update: EPSG:4326 as well; mouse coordinates are displayed as latitude/longitude). But, however, as GeoServer provides a WMS interface with EPSG:900913 capabilities, shouldn't it correctly reproject my vector sources?

Thanks for you replies in advance, Rainer.

Openlayers and Geoserver: OSM/Google Maps and WMS Overlay

In case I open the WMS layer in the OpenLayers preview of GeoServer, it looks ok:

The question is: Why is my shapefile distorted in my OpenLayers application, but not in the GeoServer preview? As you can see, the GeoServer preview uses EPSG:4326 and my OpenLayers application EPSG:900913 (Update: EPSG:4326 as well; mouse coordinates are displayed as latitude/longitude). But, however, as GeoServer provides a WMS interface with EPSG:900913 capabilities, shouldn't it correctly reproject my vector sources?

Thanks for you replies in advance, Rainer.

Openlayers2 and Geoserver: OSM/Google Maps and WMS Overlay

In case I open the WMS layer in the OpenLayers preview of GeoServer, it looks OK:

The question is: Why is my shapefile distorted in my OpenLayers application, but not in the GeoServer preview? As you can see, the GeoServer preview uses EPSG:4326 and my OpenLayers application EPSG:900913 (Update: EPSG:4326 as well; mouse coordinates are displayed as latitude/longitude). But, however, as GeoServer provides a WMS interface with EPSG:900913 capabilities, shouldn't it correctly reproject my vector sources?

added images
Source Link
Ian Turton
  • 83.2k
  • 6
  • 89
  • 189

https://i.sstatic.net/UcWBQ.png (sorry, I had to post a link again after my edit ...)https://i.sstatic.net/UcWBQ.png (sorry, I had to post a link again after my edit ...)

https://i.sstatic.net/P8IMj.png (sorry, I had to post a link again after my edit ...)https://i.sstatic.net/P8IMj.png (sorry, I had to post a link again after my edit ...)

https://i.sstatic.net/UcWBQ.png (sorry, I had to post a link again after my edit ...)

https://i.sstatic.net/P8IMj.png (sorry, I had to post a link again after my edit ...)

https://i.sstatic.net/UcWBQ.png (sorry, I had to post a link again after my edit ...)

https://i.sstatic.net/P8IMj.png (sorry, I had to post a link again after my edit ...)

Tweeted twitter.com/#!/StackGIS/status/139755339162722305
added 1 characters in body
Source Link
dubbaluga
  • 171
  • 1
  • 3
  • GeoServer with ESPG:4326 based hapefilesshapefiles (*.shp)
  • OpenJump to edit my shapefiles
  • Openlayers with EPSG:900913 base layers
  • GeoServer provides the shapefiles as WMS to OpenLayers.
  • GeoServer with ESPG:4326 based hapefiles (*.shp)
  • OpenJump to edit my shapefiles
  • Openlayers with EPSG:900913 base layers
  • GeoServer provides the shapefiles as WMS to OpenLayers.
  • GeoServer with ESPG:4326 based shapefiles (*.shp)
  • OpenJump to edit my shapefiles
  • Openlayers with EPSG:900913 base layers
  • GeoServer provides the shapefiles as WMS to OpenLayers.
Projection info *was* incorrect
Source Link
dubbaluga
  • 171
  • 1
  • 3
Loading
Source Link
dubbaluga
  • 171
  • 1
  • 3
Loading