将其从Google Maps API v2转换为v3
|
这适用于Google Maps API v2,现在如何将其转换为API v3?
谢谢
// - Radar 1 Overlay Tiles
var radar_layer= new GTileLayer(new GCopyrightCollection(\"\"),1,17);
radar_layer.getTileUrl=function(tile,zoom) {
var llp = new GPoint(tile.x*256,(tile.y+1)*256);
var urp = new GPoint((tile.x+1)*256,tile.y*256);
var ll = G_NORMAL_MAP.getProjection().fromPixelToLatLng(llp,zoom);
var ur = G_NORMAL_MAP.getProjection().fromPixelToLatLng(urp,zoom);
var dt = new Date();
var nowtime = dt.getTime();
var tileurl = \"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?&request=GetMap&service=WMS&version=1.1.1&LAYERS=nexrad-n0r&styles=\";
tileurl+=\"&format=image/png&bgcolor=0x333333&transparent=true&srs=EPSG:4326&bbox=\"+ll.x+\",\"+ll.y+\",\"+ur.x+\",\"+ur.y;
tileurl+=\"&width=256&height=256&reaspect=false&cachetime=\"+nowtime;
return tileurl;
};
radar_layer.getOpacity = function() {return 0.6;}
radar_layer.isPng = function() {return true;}
radaroverlay = new GTileLayerOverlay(radar_layer);
map.addOverlay( radaroverlay );
radarShown = true;
没有找到相关结果
已邀请:
1 个回复
橙绥