From cae0c646e60caebd9715be17cb39371df23537f1 Mon Sep 17 00:00:00 2001 From: Per Qvarforth Date: Tue, 2 Aug 2022 13:34:36 +0000 Subject: [PATCH] modified heatmat maxZoom --- htdocs/public/js/trackdirect.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/js/trackdirect.min.js b/htdocs/public/js/trackdirect.min.js index cec88ce..f341b01 100755 --- a/htdocs/public/js/trackdirect.min.js +++ b/htdocs/public/js/trackdirect.min.js @@ -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;}