存档

文章标签 ‘google’

天气预报API

2010年2月21日 评论已被关闭

通过经纬度坐标作为参数执行 Google Weather API, 例如:
http://www.google.com/ig/api?hl=zh-cn&weather=,,,30670000,104019996
(30670000,104019996 为 成都, 中国大陆 的经纬度坐标)

通过城市名称的汉语拼音来查询,例如:以下是北京的天气

http://www.google.com/ig/api?weather=Beijing

分类: Flash Platform 标签: , ,

用Flex玩转Google Map 之三-自动显示你所在的城市

2009年3月17日 评论已被关闭

自动显示你所在的城市

分类: 生活杂谈 标签: , ,

Google Reader 改版喽

2008年12月6日 评论已被关闭

刚刚一打开Reader ,感觉好像不一样了,仔细一看,原来改版了,

不过现在我找不到,隐藏没有更新的订阅的那个按纽了,难道没有了?

再找找看。。。。。。。。

原来在这里了:image 躲在向下的三角图标中了,呵呵。

分类: 生活杂谈 标签:

(译)Google Map API for Flash 之纬度和经度(Latitudes and Longitudes)

2008年5月21日 评论已被关闭

摘自原文:Writing the Hello World of the Maps API for Flash 片断(翻译能力有限,仅供个人学习参考,看得懂就好-_-||)

Google Map API for Flash 之纬度和经度(Latitudes and Longitudes)
现在我们有一个map 了,我们需要有一种方法来定位地图位置。Google Maps API for Flash的LatLng 对像提供了一个机制。构造一个LatLng对像,传递 { latitude, longitude }作为它的参数,是一种习惯的绘图法:
var myGeographicCoordinates:LatLng = new LatLng(myLatitude, myLongitude);

注意:转换一个地址为一个地理点的程序是geocoding,我们会在Google Maps API for Flash Services部分详细介绍的

它可以简单地指向一个地理点,它也可以定义一个地理点对像。例如,一个map显示一个完全世界为当前窗口,被称为 视点。这个视点可以用矩形点来定义。LatLngBounds对像提供这个功能,使用两个LatLng对像(表现为southwest 和 northeast)定义一个矩形区域。

LatLng对像有许多的API。com.google.maps.overlays.Marker对像用一个LatLng对像作为参数,例如,根据在你给的地理点上,放置一个标签覆盖在地图上。

下面例子使用getLatLngBounds()方法返回当前视点,然后在这些范围内,随机放置10个标签在地图上:

private function onMapReady(event:MapEvent):void { 
    setCenter(new LatLng(37.4419, -122.1419), 13, MapType.NORMAL_MAP_TYPE); 
    // 随机放置10个标签在地图上
    var bounds:LatLngBounds = getLatLngBounds(); 
    var southWest:LatLng = bounds.getSouthWest(); 
    var northEast:LatLng = bounds.getNorthEast(); 
    var lngSpan:Number = northEast.lng() – southWest.lng();
    var latSpan:Number = northEast.lat() – southWest.lat(); 
    for (var i:int = 0; i < 10; i++) {       
        var newLat:Number = southWest.lat() + (latSpan * Math.random());       
        var newLng:Number = southWest.lng() + (lngSpan * Math.random());           
        var latlng:LatLng = new LatLng(newLat, newLng);  
        addOverlay(new Marker(latlng));
        }
    }
}
查看例子(MapMarkers.html)
查看代码(MapMarkers.as)

注意:更多关于Marker对像的信息请看Overlays章节

分类: 生活杂谈 标签: ,

Flash/AS3 API for Google Maps

2008年5月16日 评论已被关闭

Google已发放出as版的Map API了,记得要申请一个API key

地址:http://code.google.com/apis/maps/documentation/flash/intro.html

Flash/Flex中如何使用的例子:http://code.google.com/p/gmaps-samples-flash/

Google Maps API Blog:http://googlemapsapi.blogspot.com/

一个例子源文件

分类: 生活杂谈 标签: , , ,