Created
February 11, 2013 01:50
-
-
Save darrelmiller/4751934 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BingMapLink : Link | |
{ | |
public BingMapLink() | |
{ | |
Target = new Uri("http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/{lat},{long}/{level}?mapSize={mapsize}&key={apikey}"); | |
SetParameter("level", 10); | |
SetParameter("mapsize", "500, 500"); | |
} | |
public void SetCoordinates(double latitude, double longitude) | |
{ | |
SetParameter("lat", latitude.ToString()); | |
SetParameter("long", longitude.ToString()); | |
} | |
public void SetMapSize(int height, int width) | |
{ | |
SetParameter("mapsize", string.Format("{0},{1}",height,width)); | |
} | |
public void SetApiKey(string key) | |
{ | |
SetParameter("apikey", key); | |
} | |
public void SetLevel(int level) | |
{ | |
SetParameter("level", level.ToString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment