我需要更新此代码:
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://demo.remoteservice.com/cgi-bin/serve.cgi?";
tileurl+="bbox="+ll.lng()+","+ll.lat()+","+ur.lng()+","+ur.lat();
tileurl+="&width=256&height=256&reaspect=false&cachetime="+nowtime;
return tileurl;
};
Run Code Online (Sandbox Code Playgroud)
我得到了:
var DemoLayer = new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
var llp = new google.maps.Point(coord.x*256,(coord.y+1)*256);
var urp = new google.maps.Point((coord.x+1)*256,coord.y*256);
var ll = googleMap.getProjection().fromPointToLatLng(llp);
var ur = googleMap.getProjection().fromPointToLatLng(urp);
var dt = new Date();
var nowtime = dt.getTime();
var tileurl = "http://demo.remoteservice.com/cgi-bin/serve.cgi?"; …Run Code Online (Sandbox Code Playgroud)