<div>Dear All,</div><div> </div><div>I'm a beginner for javascript, OpenLayers, ExtJS and GeoExt. </div><div>I'm developing a web map with multi-based layers from google.</div><div>However, when I used the following code, there is the white layer over the google based layer after the map is rendered.</div>
<div>How could I solve this problem? I also attached the full code.</div><div> </div><div>Thank in advanced.</div><div> </div><div>Wangsom</div><div> </div><div><br> var mapOptions = {<br> controls: [<br> new OpenLayers.Control.Navigation(),<br>
new OpenLayers.Control.PanZoomBar(),<br> new OpenLayers.Control.ScaleLine(),<br> new OpenLayers.Control.KeyboardDefaults()<br> ],<br> allOverlays: false,<br> projection: "EPSG:900913",<br>
units: 'm'<br> };</div><div> </div><div> var map = new OpenLayers.Map('map', mapOptions);</div><div> </div><div> var gmap = new OpenLayers.Layer.Google(<br> "Google Map", // the default<br>
{<br> type: google.maps.MapTypeId.ROADMAP,<br> numZoomLevels: 20<br> }, {<br> isBaseLayer: true,<br> buffer: 0,<br> visibility: false<br> }<br> );</div>
<div> </div><div> var gsat = new OpenLayers.Layer.Google(<br> "Google Satellite",<br> {<br> type: google.maps.MapTypeId.SATELLITE,<br> numZoomLevels: 22<br> }, {<br>
isBaseLayer: true,<br> buffer: 0,<br> visibility: false<br> }<br> );</div><div> </div><div> var gphy = new OpenLayers.Layer.Google(<br> "Google Terrain",<br>
{<br> type: google.maps.MapTypeId.TERRAIN,<br> numZoomLevels: 22<br> }, {<br> isBaseLayer: true,<br> buffer: 0,<br> visibility: false<br> }<br> );</div>
<div> </div><div> var ghyb = new OpenLayers.Layer.Google(<br> "Google Hybrid",<br> {<br> type: google.maps.MapTypeId.HYBRID,<br> numZoomLevels: 22<br> }, {<br> isBaseLayer: true,<br>
buffer: 0,<br> visibility: false<br> }<br> );</div><div> </div><div> var boundary = new OpenLayers.Layer.WMS("Tasmania State Boundaries",<br> localUrl, {<br> layers: "topp:tasmania_state_boundaries",<br>
transparent: true,<br> format: "image/png"<br> }, {<br> isBaseLayer: false,<br> opacity: 0.2,<br> visibility: true,<br> buffer: 0,<br> displayOutsideMaxExtent: true<br>
});</div><div> </div><div> var water = new OpenLayers.Layer.WMS("Water",<br> localUrl, {<br> layers: "topp:tasmania_water_bodies",<br> transparent: true,<br> format: "image/png"<br>
}, {<br> isBaseLayer: false,<br> visibility: true,<br> buffer: 0,<br> displayOutsideMaxExtent: true<br> });</div><div> </div><div> var city = new OpenLayers.Layer.WMS("Cities",<br>
localUrl, {<br> layers: "topp:tasmania_cities",<br> transparent: true,<br> format: "image/png"<br> }, {<br> isBaseLayer: false,<br> visibility: true,<br>
buffer: 0,<br> displayOutsideMaxExtent: true<br> });</div><div> </div><div> var road = new OpenLayers.Layer.WMS("Tasmania Roads",<br> localUrl, {<br> layers: "topp:tasmania_roads",<br>
transparent: true,<br> format: "image/png"<br> }, {<br> isBaseLayer: false,<br> visibility: true,<br> buffer: 0,<br> displayOutsideMaxExtent: true<br>
});</div><div> </div><div> map.addLayers([ghyb, gsat, gphy, gmap, boundary, water, city, road]);</div><div> </div><div> var mapPanel = new GeoExt.MapPanel({<br> map: map,<br> center: new OpenLayers.LonLat(146.64681, -42.16430).transform(<br>
new OpenLayers.Projection("EPSG:4326"),<br> map.getProjectionObject()),<br> zoom: 7,<br> region: "center",<br> layout: "fit"<br> });</div><div> </div>
<div> </div><div> </div>