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
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user