[OpenLayers-Users] google zoom
Armin Nesiren
nesiren at gmail.com
Mon Aug 13 08:48:10 EDT 2007
Hi,
I have problem with zoom. When I switching between google, and my map
server i got zoom out evry time I switch it from google
to my map. Somebody know what is problem? Here is my script:
Version of OL is 2.4.
var map = new OpenLayers.Map( 'map', {
maxResolution: 'auto',
controls: [new OpenLayers.Control.MouseDefaults()],
numZoomLevels: 19, });
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.MousePosition());
var bih = new OpenLayers.Layer.MapServer("LimesMap
Server","http://map.gps.ba/cgi-bin/mapserv", {
layers: 'bih bosna_1 saraj
tuzla jajce bl grid',
map:
"/srv/www/vhosts/map.gps/global/global.map",
});
var googleh = new OpenLayers.Layer.Google("Google Map", { 'type':
G_HYBRID_MAP });
var layer_switcher = new OpenLayers.Control.LayerSwitcher();
map.addControl(layer_switcher);
map.addLayers([bih, googleh, markerL]);
map.addControl(new OpenLayers.Control.PanZoomBar(3,22));
map.zoomToExtent(new
OpenLayers.Bounds(14.64306,42.48436,21.22124,45.31686));
</script>
Thanks!!!
More information about the Users
mailing list