I'm using this to center my points in the map screen:
var centerPoint = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y);
map.setCenter(centerPoint);
what should I use to center polylines and polygons?
thanks in advance,
|
I'm using this to center my points in the map screen:
what should I use to center polylines and polygons? thanks in advance, |
||||
|
|
|
You can use the following:
This will center your map to the center of your vector layer 1, at a zoom level 12. |
|||||
|
|
solution:
|
|||
|
|