Hello,
I have issue with switching overlay. I have 3 overlays in map.
1. Local overlay
2. Bing map overlay
3. Open street overlay (OSM).
If initially I load local overlay as a BaseOverlay than if I switch from local to OSM or Bing than its work fine.
But If I load Bing map as a Baseoverlay than when I switch from Bing to Local overlay than its not working properly. its working for OSM layer but not for Local overlay.
I have added three radio button not used map option for switching layer.
Here is my code for that.
$(document).ready(function() {//$(Map1.div).css(“height”, document.documentElement.clientHeight - 20);
$(‘input#radioMapOption’).bind(‘click’,function() {if($(this).is(’:checked’)) {
varmapname = $(this).val();if(mapname ==“Open Street”) {Map1.getOpenLayersMap().setBaseLayer(Map1.getLayersByName(“OSMLayer”)[0]);Map1.redrawLayer(“MarkerOverlay”);}elseif(mapname ==“Local”) {Map1.getOpenLayersMap().setBaseLayer(Map1.getLayersByName(“ShapeOverlay”)[0]);}else{Map1.getOpenLayersMap().setBaseLayer(Map1.getLayersByName(“BingMapOverlay”)[0]);Map1.redrawLayer(“MarkerOverlay”);}}});
});
Please check the code and let me know If I made any mistake.
Thanks.
Eric.