[OpenLayers-Users] PanZoomBar

leorochadecastro at gmail.com leorochadecastro at gmail.com
Thu Jul 31 15:09:39 EDT 2008


My problem with PANZOOMBAR:
 
I first set my base layer with zoom=12. When I change the base layer, for
example to Google Road Map, the zoom value changes automatically to 14 (add
2). When I return to my base layer again, the zoom value changes
automatically to 13 (substract 1). If I perform again those base layer
changes the zoom values change to 15 and 14.
 
Pls, can anyone help me with this.
 
Thanks in advance,
    Leonel
 
PS: Follows part of the code:
 
 
var theVIEWER = new OpenLayers.Map('map', {
                                                               controls: [],
maxResolution: 'auto',
 
eventListeners: {
 
"moveend": mapEvent,
 
"zoomend": mapEvent,
 
"changebaselayer": mapBaseLayerChanged
 
}
                                                              });
                                    
theVIEWER.addControl(new OpenLayers.Control.PanZoomBar());
                                   
var Roadup = new OpenLayers.Layer.WMS( "RoadUP",
"http://localhost:8080/geoserver/wms", {layers: 'TM_Mvdeo'}, {singleTile:
true });
    theVIEWER.addLayer(Roadup) ;
var GoogleStr = new OpenLayers.Layer.Google( "Google Rutas y calles" );
    theVIEWER.addLayer(GoogleStr) ;
var GoogleSat = new OpenLayers.Layer.Google( "Google Satelite" , {type:
G_SATELLITE_MAP });
    theVIEWER.addLayer(GoogleSat) ;
var GooglePhy = new OpenLayers.Layer.Google( "Google Fisico" , {type:
G_PHYSICAL_MAP });
    theVIEWER.addLayer(GooglePhy) ;
var GoogleHyb = new OpenLayers.Layer.Google( "Google Mixto" , {type:
G_HYBRID_MAP });
    theVIEWER.addLayer(GoogleHyb) ;
                                        
theVIEWER.setBaseLayer(Roadup);
theVIEWER.setCenter(new OpenLayers.LonLat(Parms.centerLon, Parms.centerLat),
Parms.zoom);

 
 
LEONEL ROCHA
 ALTASUR S.A.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080731/74a1d0cb/attachment.html


More information about the Users mailing list