首先,在Google地图上订阅一个免费的API序列号Key(登陆http://code.google.com/apis/maps/signup.html,然后把你的域名根目录和TCP/IP端口提交上去)。于是,使用测试工程的时候,别忘了改这些。
我们的GStaticMap控件时继承于System.Web.UI.Image的。
你需要添加的一些属性如下:
The next step is to more deeply describe our objects. So, a static map is defined by the following properties:
* A width (integer, inherited from Image)宽
* A height (integer, inherited from Image)高
* A center (using our GCoordinate class, optional when there is at least one marker)中心位置
* A zoom level (integer, optional when there is at least one marker, from 1 to 19)缩放尺寸
* A rendering type (enumerator, optional; roadmap, by default, or designed for mobile devices)地图类型(公路地图还是移动设备等等)
A marker is defined by the following properties:
* A color (enumerator, optional; the Static Map API restricts them to red, by default, blue, or green)
* An optional letter (character, optional, from A to Z)
A coordinate is defined by the following properties:
* A latitude (double)纬度
* A longitude (double)经度