From c77688a0be7e7da5a46d1f730970ca3981a295de Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 4 Aug 2010 18:41:00 +0000 Subject: [PATCH] Change the OSM example to show how to setCenter (using reprojection), in part to demonstrate that OSM is in spherical mercator coords. git-svn-id: http://svn.openlayers.org/trunk/openlayers@10583 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/osm.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/osm.html b/examples/osm.html index 94f73a3bdf..d14a1bb004 100644 --- a/examples/osm.html +++ b/examples/osm.html @@ -10,7 +10,12 @@ map = new OpenLayers.Map( 'map'); layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); - map.zoomToMaxExtent(); + map.setCenter( + new OpenLayers.LonLat(-71.147, 42.472).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), 12 + ); }