i have wms layer with coming geoserver and it's bounds is

 bounds = new OpenLayers.Bounds(417138.6205791628, 4243634.852681775, 486211.1950145211, 4331542.555877601).transform(WGS84, WGS84_google_mercator);

but when i use google baselayer, in the opening map it shows me full extends how can i transform my bound with harmonic google. ?


Your transform goes from WGS84 to mercator. However, the coordinates of your bounds are not in WGS84 (a geographic coordinate system , with lat/long in degrees). Maybe your coordinates are already in mercator, or you should try to identify the correct coordinate system of your source before projecting the data.


i add projection: WGS84_google_mercator on map it s works also

var position = new OpenLayers.LonLat(3947950.0553875, 4679507.9024374);

map.setCenter(position, 10);

i used for bounds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.