Navigation
Register  Login
 Yahoo Maps Mashup Code Minimize
 TitleSize (Kb) 
Yahoo Maps Mashup C# Code31.59Download

  
 Yahoo Maps Mashup using the Gaia Ajax Widgets Minimize

Requirements:  Gaia Ajax Widgets Glory V3.0+, ASP.NET 2.0

Why Yahoo over Google?

There are 2 reasons why I did the Yahoo Maps Mashup.    The first being, simply put, Google has a requirement that a key to use their map API has to be tied to a particular URL.   Yahoo doesn't have that limitation.    Go to the YahooMaps API page and you can download a APPID to use their API.   This APPID can be used pretty much anywhere and is not tied to a URL.   For developers this does make a bit more sense.  

The second reason was because there wasn't already one out there.   Someone had already built a Google Map mashup and a Live Map mashup, but no one had build one for Yahoo Maps.

Usage of the control

First register the DLL and put the control onto your ASCX or ASPX page:

   1:  <%@ Register Assembly="Marvici.Maps" Namespace="Marvici.Maps" TagPrefix="marvici" %>
   2:   
   3:  <marvici:YahooMap ID="YahooMap" runat="server" Width="100%" Height="325" />

Then in your code behind, you will need to use the GeoLocate class to get the Geocode information for your address.   (Current example is in VB.Net)

   1:  'Constants.YahooAppID = Your Yahoo AppID
   2:  Dim GeoAddress As Marvici.Maps.GeoCode.GeoAddress = _   
   3:      Marvici.Maps.GeoCode.GeoLocate.Execute(FullAddress, Constants.YahooAppID)          
   4:  YahooMap.YahooAppID = Constants.YahooAppID 
   5:  YahooMap.Latitude = GeoAddress.Latitude   
   6:  YahooMap.Longitude = GeoAddress.Longitude   
   7:  YahooMap.ShowMapTypeControls = True   
   8:  YahooMap.ShowZoomPanControls = True   
   9:  YahooMap.Zoom = 4   
  10:  YahooMap.MapType = YahooMapType.YAHOO_MAP_HYB

These class have the ability to convert a normal Address to the needed Geocode address and then load a map for it.  Makes it easy to generate your own maps from database driven address.  

C# Source code can be downloaded from the link to the left of this page.    Very limited help will be provided on the usage of this control.   Additional samples and test information will be provided here in the future.  

powered by metaPost

  
[ Projects » Gaia Yahoo Maps Mashup Thursday, July 29, 2010   Copyright 2007 by Marvici Enterprises, LLC   Terms Of Use  Privacy Statement