[OpenLayers-Users] Noob Needs Help with setCenter() call
Andreas Hocevar
ahocevar at opengeo.org
Sat Jan 7 04:28:39 EST 2012
If your map's projection is not EPSG:4326 and not EPSG:900913 or one
of its aliases (like EPSG:3587), you'll have to include proj4js and a
projection definition file for your map projection to make this
transformation work.
Andreas.
On Fri, Jan 6, 2012 at 9:32 AM, Arnie Shore <ashore3 at verizon.net> wrote:
> Folks, my map is not centering on the bounds center point returned from the
> foll'g:
>
> var proj = new OpenLayers.Projection("EPSG:4326");
> var point = new OpenLayers.LonLat(bounds.getCenterLonLat());
> // returns lon=-77.50959,lat=39.011702, which is correct
> map_Obj.setCenter(point.transform(proj, map_Obj.getProjectionObject()));
>
>
> I'll appreciate any help in that setCenter() call working.
>
> AS
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list