Hi all,
I'm using a geoserver to display open layer data through a WMS service and it works correctly with the projection 4326 but apparently everybody is using 900913 for background tiles (google, mapbox, etc..). So I've reprojected all my GIS points in my PostGIS database to 900913, i've added them to the Geoserver, check that the Layer Preview works:
http://gis.domain.org:8080/geoserver/wms?service=WMS&version=1.1.0&reque...
and then created a new Map with the OpenLayers Drupal module and added the newly created layers with 900913. The problem is that the layer is not showing up while the map with the 4326 projection layers and identical configuration works perfectly.
I've looked for logs but the web server is not giving useful information, with the previous version i would see something like:
TYPE openlayers
DATE Wednesday, January 9, 2013 - 11:43
USER admin
LOCATION http://dev.domain.org/admin/structure/openlayers/maps/my_map2/edit
REFERRER http://dev.domain.org/admin/structure/openlayers/maps
MESSAGE Layer my_map2 not found.
SEVERITY error
but since i've updated to the 7.x-2.0-beta3 nothing shows up anymore.
When i define the BaseURL layer i'm using: http://gis.domain.org:8080/geoserver/wms?service=WMS&version=1.1.0&reque... since it was the URL that was working with the 4326 projection.
If i mark the layer as not transparent i will see that the base layer gets hidden and the map becomes blank.
Do you have any suggestions? how can i find more OpenLayers logs? Code points works too!
Thanks!!!
Alex
Comments
Comment #1
AlexanderKocisky commentedComment #2
AlexanderKocisky commentedComment #3
AlexanderKocisky commentedif I publish the layer as a KML file with the correct URL from the geoserver the issue is still present
Comment #4
AlexanderKocisky commentedit seems open layer is actually fetching the WMS png files but in the wrong bound box, this is a correct link directly from geoserver:
http://gis.site.org:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=MyMap:my_layer&styles=&bbox=0.0,0.0,99.067,97.183&width=512&height=502&srs=EPSG:900913&format=application/openlayersthis one is the wrong one from open layer:
if i change the bound box parameter to the same of the geoserver it fetches something, it seems its just looking in the wrong place, any ideas? where is the logic of the bbox parameter?
thanks
Comment #5
g_f commentedSo you are recieving your image, but it seems to be displayed at a wrong place. You could implement a single point with a huge size, so you'd be able to see where the point is displayed - that gives you a hint in which coordinate system the map is shown.
Did you check the display projection? Maybe you are generating wrong bounding box parameter because of you're using a different coordinate system to display your data. Try Map Projection 900913 and Display projection 4326.
Comment #6
AlexanderKocisky commentedHi g_f, thats actually my setting ( Map Projection 900913 and Display projection 4326). With the same data projected in the postgis db as 4326 and setting the map to 4326 projection it works. The same with 900913 gets wrong bbox parameter. Here is the map created by the module:
These are the layer added to the map
i've dumped the objects with:
alert("The map: "+map.id+" options are: "+JSON.stringify(options, null, 4));any ideas?
Comment #7
AlexanderKocisky commentedSince the bbox parameter of the 900913 layer is not correct i was wondering which would be the openlayers parameters that would influence that behavior, any ideas?
this is the code generated on the client side:
Comment #8
polHello,
What is the bbox parameters in these texts you copied ?
Comment #9
liam morland