ThinkGeo.com    |     Documentation    |     Premium Support

Google Satellite with Yahoo Regular overlay

Yahoo uses NAVTECH street data in Africa, which is very accurate, whereas Google road data is waaaay out!

But then google satelite resolutions is 10x better than that of yahoo.


Can one laod the google satelite as an overlay, then the yahoo regular (make it 50% transparent) as an overlay on top of the goole layer?



Eventually there will be lots of layers, but the first 2 layers, either google or yahoo must be visible, or both.


Then my feature layers from sqlserver will be switchable on top.



Guss, 



The following codes meets your requirement, please note that we changed yahoo map’s opacity on client side, 




// Code on Server
GoogleOverlay google = new GoogleOverlay("Google Map");
google.JavaScriptLibraryUri = new Uri(ConfigurationManager.AppSettings["GoogleUri"]);
google.GoogleMapType = GoogleMapType.Satellite;

YahooOverlay yahoo = new YahooOverlay("Yahoo Map");
yahoo.JavaScriptLibraryUri = new Uri(ConfigurationManager.AppSettings["YahooUri"]);
yahoo.YahooMapType = YahooMapType.Regular;
yahoo.IsBaseOverlay = false;
yahoo.IsVisibleInOverlaySwitcher = false;

Map1.CustomOverlays.Add(google);
Map1.CustomOverlays.Add(yahoo);



// Code on Client
        var OnMapCreated = function(map) {
            var yahoo = map.getLayer("Yahoo Map");
            if (yahoo) {
                yahoo.mapObject.dom.style.filter = "alpha(opacity=50)";
            }
        }

Thanks, 



Ben 

 



Tnaks for the reply…Your service is excellent (10/10). Is it 03:15 AM your side?!!

Guss, 
  
   We have a few offices around the globe.  Ben is out of the Asian Pacific office as am I for some part of the year.  It services all of your Eurasian customers and allows us to better manage the discussion forums.  The US support team handles all of the phone calls and high priority support tickets from customers.  Both teams are really excellent in my opinion, somewhat bias admittedly, and they get to work closely with the development teams which is a big plus. 
  
 David