Which version of OpenLayers are you using? I think the spherical
mercator stuff was added in 2.5... I could be wrong though. Also have
you seen the following example:
http://svn.openlayers.org/branches/openlayers/2.5/examples/spherical-mercator.html
It might be useful to use this as a starting point. I just tried an
example with tasmania_state_boundaries and it works great.
-Justin
Bakoi wrote:
Hi everyone.
I have a geoserver on a ubuntu server and it's pretty nice to test it.
But I have a problem using it.
I am making some test with the tazmania example give with the 1.5.3
version of geoserver. I would like to see the "boundaries" shape, in
WMS, while I have the yahoo map beneath. I am trying to play with
projection, but it seems useless as I don't see any difference.
* Do I have to create my map in a particular way (i.e. with a
"900913" SRS projection) ?
* Do I have to modify the data on the server side or is it enough to
play with openlayers ?
Here is a part of the code that I have right now :
map = new OpenLayers.Map( $('map') );
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
externalLayer = new OpenLayers.Layer.Yahoo("Yahoo",
{"sphercialMercator": true});
map.addLayer(externalLayer);
var tasmaniaTestLayer = new OpenLayers.Layer.WMS( "Tasmania test",
"/geoserver/wms", {layers: 'topp:tasmania_state_boundaries',
'transparent': true, format: 'image/png', 'sphericalMercator':
true}, {'isBaseLayer': false, projection: "EPSG:900913"} );
map.addLayer(tasmaniaTestLayer);
------------------------------------------------------------------------
View this message in context: Projection using geoserve example
<http://www.nabble.com/Projection-using-geoserve-example-tf4711879.html#a13468224>
Sent from the GeoServer - User mailing list archive
<http://www.nabble.com/GeoServer---User-f1194.html> at Nabble.com.
!DSPAM:4007,4725ee49263042458217002!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
!DSPAM:4007,4725ee49263042458217002!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,4725ee49263042458217002!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org