We have a client API - SetCenter(lon,lat) - to center your map, please have a look at the javascirpt as following.
Do not forget to replace the “Map1” with the ID of your map.
[script removed]
function setCenter(lon, lat) {
//Convert the coordinates in DMS to coordinates in Google projection
var pointInDMS = new OpenLayers.Geometry.Point(lon, lat);
var pointInGoogle = pointInDMS.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
<%=Map1.ClientID%>.SetCenter(pointInGoogle.x, pointInGoogle.y);
}
[script removed]
Ben.
263-post5055.txt (549 Bytes)