-function removeMarkerFromMap(marker){
- markers.removeMarker(marker);
-}
-
-function removeBoxFromMap(box){
- vectors.removeFeature(box);
-}
-
-function getMapCenter() {
- return map.getCenter().clone().transform(map.getProjectionObject(), epsg4326);
-}
-
-function setMapCenter(center, zoom) {
- zoom = parseInt(zoom);
- var numzoom = map.getNumZoomLevels();
- if (zoom >= numzoom) zoom = numzoom - 1;
- map.setCenter(center.clone().transform(epsg4326, map.getProjectionObject()), zoom);
-}
-
-function setMapExtent(extent) {
- map.zoomToExtent(extent.clone().transform(epsg4326, map.getProjectionObject()));
-}
-
-function getMapExtent() {
- return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326);
-}
-
-function getMapZoom() {
- return map.getZoom();
-}
-
-function getEventPosition(event) {
- return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326);
+function getMapBaseLayer() {
+ for (var i = 0; i < layers.length; i++) {
+ if (map.hasLayer(layers[i].layer)) {
+ return layers[i];
+ }
+ }