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 <[email protected]> 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 > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
