modified heatmat maxZoom

This commit is contained in:
Per Qvarforth 2022-08-02 13:34:36 +00:00
parent 7e8d00bc4b
commit cae0c646e6
1 changed files with 2 additions and 2 deletions

View File

@ -866,9 +866,9 @@ if(typeof packet.station_id_path!=="undefined"&&packet.station_id_path!==null&&p
if(relatedStationPacket!==null){var relatedStationLatLng={lat:parseFloat(relatedStationPacket.latitude),lng:parseFloat(relatedStationPacket.longitude),};var distance=trackdirect.services.distanceCalculator.getDistance(packet.getLatLngLiteral(),relatedStationLatLng);if(distance!==null){return distance;}}}
return null;};
trackdirect.models.HeatMap=function(map){this._defaultMap=map;if(typeof google==="object"&&typeof google.maps==="object"){google.maps.ImageMapType.call(this,this._getGoogleMapOptions());}else if(typeof L==="object"){L.TileLayer.call(this,this._getUrlTemplate(),this._getLeafletOptions());}};if(typeof google==="object"&&typeof google.maps==="object"){trackdirect.models.HeatMap.prototype=Object.create(google.maps.ImageMapType.prototype);}else if(typeof L==="object"){trackdirect.models.HeatMap.prototype=Object.create(L.TileLayer.prototype);}
trackdirect.models.HeatMap.prototype.constructor=trackdirect.models.HeatMap;trackdirect.models.HeatMap.prototype._getLeafletOptions=function(){var options={errorTileUrl:trackdirect.settings.baseUrl+"/heatmaps/transparent.png",tileSize:256,maxZoom:16,minZoom:0,};return options;};trackdirect.models.HeatMap.prototype._getGoogleMapOptions=function(){var me=this;var options={getTileUrl:function(coord,zoom){if(zoom>trackdirect.settings.minZoomForMarkers-1){return trackdirect.settings.baseUrl+"/heatmaps/transparent.png";}
trackdirect.models.HeatMap.prototype.constructor=trackdirect.models.HeatMap;trackdirect.models.HeatMap.prototype._getLeafletOptions=function(){var options={errorTileUrl:trackdirect.settings.baseUrl+"/heatmaps/transparent.png",tileSize:256,maxZoom:9,minZoom:0,};return options;};trackdirect.models.HeatMap.prototype._getGoogleMapOptions=function(){var me=this;var options={getTileUrl:function(coord,zoom){if(zoom>trackdirect.settings.minZoomForMarkers-1){return trackdirect.settings.baseUrl+"/heatmaps/transparent.png";}
var normalizedCoord=me._getNormalizedCoord(coord,zoom);if(!normalizedCoord){return trackdirect.settings.baseUrl+"/heatmaps/transparent.png";}
var xString=String(normalizedCoord.x);var yString=String(normalizedCoord.y);return me._getUrlTemplate().replace("{z}",zoom).replace("{y}",yString).replace("{x}",xString);},tileSize:new google.maps.Size(256,256),maxZoom:16,minZoom:0,radius:1738000,name:"APRSHEAT",};return options;};trackdirect.models.HeatMap.prototype._getUrlTemplate=function(){return(trackdirect.settings.baseUrl+
var xString=String(normalizedCoord.x);var yString=String(normalizedCoord.y);return me._getUrlTemplate().replace("{z}",zoom).replace("{y}",yString).replace("{x}",xString);},tileSize:new google.maps.Size(256,256),maxZoom:9,minZoom:0,radius:1738000,name:"APRSHEAT",};return options;};trackdirect.models.HeatMap.prototype._getUrlTemplate=function(){return(trackdirect.settings.baseUrl+
"/heatmaps/latest-heatmap.{z}.{y}.{x}.png?version="+
this._getHeatMapVersion());};trackdirect.models.HeatMap.prototype._getHeatMapVersion=function(){var today=new Date();var dd=today.getDate();var mm=today.getMonth()+1;var yyyy=today.getFullYear();var hh=today.getHours();if(dd<10){dd="0"+dd;}
if(mm<10){mm="0"+mm;}