thanthamky commited on
Commit
3bc64f7
1 Parent(s): c2bb2ae

Upload 50 files

Browse files
Files changed (50) hide show
  1. dist/control.playback.css +32 -0
  2. dist/control.trackplayback.js +2 -0
  3. dist/control.trackplayback.js.map +1 -0
  4. dist/images/icon-close.png +0 -0
  5. dist/images/icon-play.png +0 -0
  6. dist/images/icon-quick.png +0 -0
  7. dist/images/icon-restart.png +0 -0
  8. dist/images/icon-slow.png +0 -0
  9. dist/images/icon-stop.png +0 -0
  10. dist/leaflet.trackplayback.js +2 -0
  11. dist/leaflet.trackplayback.js.map +1 -0
  12. examples/.DS_Store +0 -0
  13. examples/1.html +41 -0
  14. examples/data/test.json +0 -0
  15. examples/data/test_gps_non (1).json +0 -0
  16. examples/data/test_gps_non (2).json +0 -0
  17. examples/data/test_gps_non (3).json +0 -0
  18. examples/data/test_gps_non (4).json +0 -0
  19. examples/data/test_gps_non (5).json +0 -0
  20. examples/data/test_gps_non (6).json +0 -0
  21. examples/data/test_gps_non (7).json +0 -0
  22. examples/data/test_gps_non.json +0 -0
  23. examples/lib/echarts.min.js +0 -0
  24. examples/lib/leaflet/images/layers-2x.png +0 -0
  25. examples/lib/leaflet/images/layers.png +0 -0
  26. examples/lib/leaflet/images/marker-icon-2x.png +0 -0
  27. examples/lib/leaflet/images/marker-icon.png +0 -0
  28. examples/lib/leaflet/images/marker-shadow.png +0 -0
  29. examples/lib/leaflet/leaflet-src.esm.js +0 -0
  30. examples/lib/leaflet/leaflet-src.esm.js.map +0 -0
  31. examples/lib/leaflet/leaflet-src.js +0 -0
  32. examples/lib/leaflet/leaflet-src.js.map +0 -0
  33. examples/lib/leaflet/leaflet.css +635 -0
  34. examples/lib/leaflet/leaflet.js +0 -0
  35. examples/lib/leaflet/leaflet.js.map +0 -0
  36. examples/lib/leaflet0.7.7/images/layers-2x.png +0 -0
  37. examples/lib/leaflet0.7.7/images/layers.png +0 -0
  38. examples/lib/leaflet0.7.7/images/marker-icon-2x.png +0 -0
  39. examples/lib/leaflet0.7.7/images/marker-icon.png +0 -0
  40. examples/lib/leaflet0.7.7/images/marker-shadow.png +0 -0
  41. examples/lib/leaflet0.7.7/leaflet-src.js +0 -0
  42. examples/lib/leaflet0.7.7/leaflet.css +479 -0
  43. examples/lib/leaflet0.7.7/leaflet.js +0 -0
  44. examples/monitor.html +38 -0
  45. examples/navigation-2.png +0 -0
  46. examples/navigation-3.png +0 -0
  47. examples/navigation.png +0 -0
  48. examples/playback.png +0 -0
  49. examples/ship.png +0 -0
  50. index.html +49 -18
dist/control.playback.css ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .leaflet-control-playback{position:relative;background-color:#7cbdf5;padding:10px;}
2
+ .leaflet-control-playback .optionsContainer{position:relative;}
3
+ .leaflet-control-playback .optionsContainer > div {
4
+ display: inline-block;
5
+ }
6
+ .leaflet-control-playback .buttonContainer {}
7
+ .leaflet-control-playback .buttonContainer a {
8
+ display: inline-block;
9
+ width: 32px;
10
+ height: 32px;
11
+ text-decoration: none;
12
+ }
13
+ .leaflet-control-playback .buttonContainer .btn-stop {
14
+ background: url(./images/icon-play.png) no-repeat center;
15
+ }
16
+ .leaflet-control-playback .buttonContainer .btn-start {
17
+ background: url(./images/icon-stop.png) no-repeat center;
18
+ }
19
+ .leaflet-control-playback .buttonContainer .btn-restart {
20
+ background: url(./images/icon-restart.png) no-repeat center;
21
+ }
22
+ .leaflet-control-playback .buttonContainer .btn-slow {
23
+ background: url(./images/icon-slow.png) no-repeat center;
24
+ }
25
+ .leaflet-control-playback .buttonContainer .btn-quick {
26
+ background: url(./images/icon-quick.png) no-repeat center;
27
+ }
28
+ .leaflet-control-playback .buttonContainer .btn-close {
29
+ background: url(./images/icon-close.png) no-repeat center;
30
+ }
31
+ .leaflet-control-playback .infoContainer {}
32
+ .leaflet-control-playback .sliderContainer {}
dist/control.trackplayback.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("leaflet"));else if("function"==typeof define&&define.amd)define(["leaflet"],e);else{var i="object"==typeof exports?e(require("leaflet")):e(t.L);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2)}([function(e,i){e.exports=t},,function(t,e,i){"use strict";i.r(e);var n=i(0),a=i.n(n);const o=a.a.Control.extend({options:{position:"topright",showOptions:!0,showInfo:!0,showSlider:!0,autoPlay:!1},initialize:function(t,e){a.a.Control.prototype.initialize.call(this,e),this.trackPlayBack=t,this.trackPlayBack.on("tick",this._tickCallback,this)},onAdd:function(t){return this._initContainer(),this._container},onRemove:function(t){this.trackPlayBack.dispose(),this.trackPlayBack.off("tick",this._tickCallback,this)},getTimeStrFromUnix:function(t,e="s"){t=parseInt(1e3*t);let i,n=new Date(t),a=n.getFullYear(),o=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,r=n.getDate()<10?"0"+n.getDate():n.getDate(),s=n.getHours()<10?"0"+n.getHours():n.getHours(),c=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),l=n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds();return i="d"===e?a+"-"+o+"-"+r:"h"===e?a+"-"+o+"-"+r+" "+s:"m"===e?a+"-"+o+"-"+r+" "+s+":"+c:a+"-"+o+"-"+r+" "+s+":"+c+":"+l},_initContainer:function(){return this._container=a.a.DomUtil.create("div","leaflet-control-playback"),a.a.DomEvent.disableClickPropagation(this._container),this._optionsContainer=this._createContainer("optionsContainer",this._container),this._buttonContainer=this._createContainer("buttonContainer",this._container),this._infoContainer=this._createContainer("infoContainer",this._container),this._sliderContainer=this._createContainer("sliderContainer",this._container),this._pointCbx=this._createCheckbox("show trackPoint","show-trackpoint",this._optionsContainer,this._showTrackPoint),this._lineCbx=this._createCheckbox("show trackLine","show-trackLine",this._optionsContainer,this._showTrackLine),this._playBtn=this._createButton("play","btn-stop",this._buttonContainer,this._play),this._restartBtn=this._createButton("replay","btn-restart",this._buttonContainer,this._restart),this._slowSpeedBtn=this._createButton("slow","btn-slow",this._buttonContainer,this._slow),this._quickSpeedBtn=this._createButton("quick","btn-quick",this._buttonContainer,this._quick),this._closeBtn=this._createButton("close","btn-close",this._buttonContainer,this._close),this._infoStartTime=this._createInfo("startTime: ",this.getTimeStrFromUnix(this.trackPlayBack.getStartTime()),"info-start-time",this._infoContainer),this._infoEndTime=this._createInfo("endTime: ",this.getTimeStrFromUnix(this.trackPlayBack.getEndTime()),"info-end-time",this._infoContainer),this._infoCurTime=this._createInfo("curTime: ",this.getTimeStrFromUnix(this.trackPlayBack.getCurTime()),"info-cur-time",this._infoContainer),this._infoSpeedRatio=this._createInfo("speed: ",`X${this.trackPlayBack.getSpeed()}`,"info-speed-ratio",this._infoContainer),this._slider=this._createSlider("time-slider",this._sliderContainer,this._scrollchange),this._container},_createContainer:function(t,e){return a.a.DomUtil.create("div",t,e)},_createCheckbox:function(t,e,i,n){let o=a.a.DomUtil.create("div",e+" trackplayback-checkbox",i),r=a.a.DomUtil.create("input","trackplayback-input",o),s=`trackplayback-input-${a.a.Util.stamp(r)}`;r.setAttribute("type","checkbox"),r.setAttribute("id",s);let c=a.a.DomUtil.create("label","trackplayback-label",o);return c.setAttribute("for",s),c.innerHTML=t,a.a.DomEvent.on(r,"change",n,this),o},_createButton:function(t,e,i,n){let o=a.a.DomUtil.create("a",e,i);return o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),a.a.DomEvent.disableClickPropagation(o),a.a.DomEvent.on(o,"click",n,this),o},_createInfo:function(t,e,i,n){let o=a.a.DomUtil.create("div","info-container",n);a.a.DomUtil.create("span","info-title",o).innerHTML=t;let r=a.a.DomUtil.create("span",i,o);return r.innerHTML=e,r},_createSlider:function(t,e,i){let n=a.a.DomUtil.create("input",t,e);return n.setAttribute("type","range"),n.setAttribute("min",this.trackPlayBack.getStartTime()),n.setAttribute("max",this.trackPlayBack.getEndTime()),n.setAttribute("value",this.trackPlayBack.getCurTime()),a.a.DomEvent.on(n,"click mousedown dbclick",a.a.DomEvent.stopPropagation).on(n,"click",a.a.DomEvent.preventDefault).on(n,"change",i,this).on(n,"mousemove",i,this),n},_showTrackPoint(t){t.target.checked?this.trackPlayBack.showTrackPoint():this.trackPlayBack.hideTrackPoint()},_showTrackLine(t){t.target.checked?this.trackPlayBack.showTrackLine():this.trackPlayBack.hideTrackLine()},_play:function(){a.a.DomUtil.hasClass(this._playBtn,"btn-stop")?(a.a.DomUtil.removeClass(this._playBtn,"btn-stop"),a.a.DomUtil.addClass(this._playBtn,"btn-start"),this._playBtn.setAttribute("title","stop"),this.trackPlayBack.start()):(a.a.DomUtil.removeClass(this._playBtn,"btn-start"),a.a.DomUtil.addClass(this._playBtn,"btn-stop"),this._playBtn.setAttribute("title","play"),this.trackPlayBack.stop())},_restart:function(){a.a.DomUtil.removeClass(this._playBtn,"btn-stop"),a.a.DomUtil.addClass(this._playBtn,"btn-start"),this._playBtn.setAttribute("title","stop"),this.trackPlayBack.rePlaying()},_slow:function(){this.trackPlayBack.slowSpeed();let t=this.trackPlayBack.getSpeed();this._infoSpeedRatio.innerHTML=`X${t}`},_quick:function(){this.trackPlayBack.quickSpeed();let t=this.trackPlayBack.getSpeed();this._infoSpeedRatio.innerHTML=`X${t}`},_close:function(){return a.a.DomUtil.remove(this._container),this.onRemove&&this.onRemove(this._map),this},_scrollchange:function(t){let e=Number(t.target.value);this.trackPlayBack.setCursor(e)},_tickCallback:function(t){let e=this.getTimeStrFromUnix(t.time);this._infoCurTime.innerHTML=e,this._slider.value=t.time,t.time>=this.trackPlayBack.getEndTime()&&(a.a.DomUtil.removeClass(this._playBtn,"btn-start"),a.a.DomUtil.addClass(this._playBtn,"btn-stop"),this._playBtn.setAttribute("title","play"),this.trackPlayBack.stop())}});a.a.TrackPlayBackControl=o,a.a.trackplaybackcontrol=function(t,e){return new o(t,e)}}])});
2
+ //# sourceMappingURL=control.trackplayback.js.map
dist/control.trackplayback.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///external {\"root\":\"L\",\"commonjs\":\"leaflet\",\"commonjs2\":\"leaflet\",\"amd\":\"leaflet\"}","webpack:///./src/control.trackplayback/control.playback.js","webpack:///./src/control.trackplayback/index.js"],"names":["root","factory","exports","module","require","define","amd","a","i","window","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","TrackPlayBackControl","external_root_L_commonjs_leaflet_commonjs2_leaflet_amd_leaflet_default","Control","extend","options","position","showOptions","showInfo","showSlider","autoPlay","initialize","trackplayback","this","trackPlayBack","on","_tickCallback","onAdd","map","_initContainer","_container","onRemove","dispose","off","getTimeStrFromUnix","time","accuracy","parseInt","ret","newDate","Date","year","getFullYear","month","getMonth","day","getDate","hours","getHours","minuts","getMinutes","seconds","getSeconds","DomUtil","DomEvent","disableClickPropagation","_optionsContainer","_createContainer","_buttonContainer","_infoContainer","_sliderContainer","_pointCbx","_createCheckbox","_showTrackPoint","_lineCbx","_showTrackLine","_playBtn","_createButton","_play","_restartBtn","_restart","_slowSpeedBtn","_slow","_quickSpeedBtn","_quick","_closeBtn","_close","_infoStartTime","_createInfo","getStartTime","_infoEndTime","getEndTime","_infoCurTime","getCurTime","_infoSpeedRatio","getSpeed","_slider","_createSlider","_scrollchange","className","container","labelName","fn","divEle","inputEle","inputId","Util","stamp","setAttribute","labelEle","innerHTML","title","link","href","info","infoContainer","infoEle","sliderEle","stopPropagation","preventDefault","[object Object]","e","target","checked","showTrackPoint","hideTrackPoint","showTrackLine","hideTrackLine","hasClass","removeClass","addClass","start","stop","rePlaying","slowSpeed","sp","quickSpeed","remove","_map","val","Number","setCursor","trackplaybackcontrol"],"mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBACA,sBAAAC,eAAAC,IACAD,QAAA,WAAAJ,OACA,CACA,IAAAM,EAAA,iBAAAL,QAAAD,EAAAG,QAAA,YAAAH,EAAAD,EAAA,GACA,QAAAQ,KAAAD,GAAA,iBAAAL,gBAAAF,GAAAQ,GAAAD,EAAAC,IAPA,CASCC,OAAA,SAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAX,QAGA,IAAAC,EAAAQ,EAAAE,IACAL,EAAAK,EACAC,GAAA,EACAZ,YAUA,OANAa,EAAAF,GAAAG,KAAAb,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAW,GAAA,EAGAX,EAAAD,QA0DA,OArDAU,EAAAK,EAAAF,EAGAH,EAAAM,EAAAP,EAGAC,EAAAO,EAAA,SAAAjB,EAAAkB,EAAAC,GACAT,EAAAU,EAAApB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AAApH,OACA2B,KAAAC,cAAA2G,UAAAF,IAGAvG,cAAA,SAAAqF,GAEA,IAAA5E,EAAAZ,KAAAW,mBAAA6E,EAAA5E,MACAZ,KAAA2D,aAAAkB,UAAAjE,EAEAZ,KAAA+D,QAAA1F,MAAAmH,EAAA5E,KAEA4E,EAAA5E,MAAAZ,KAAAC,cAAAyD,eACMrE,EAAAvC,EAACgF,QAAAkE,YAAAhG,KAAA2C,SAAA,aACDtD,EAAAvC,EAACgF,QAAAmE,SAAAjG,KAAA2C,SAAA,YACP3C,KAAA2C,SAAAgC,aAAA,gBACA3E,KAAAC,cAAAkG,WCxNA9G,EAAAvC,EAACsC,qBAAwBA,EACzBC,EAAAvC,EAAC+J,qBD4NM,SAAA9G,EAAAP,GACP,WAAAJ,EAAAW,EAAAP","file":"control.trackplayback.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"leaflet\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"leaflet\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"leaflet\")) : factory(root[\"L\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","import L from 'leaflet'\r\n\r\nexport const TrackPlayBackControl = L.Control.extend({\r\n\r\n options: {\r\n position: 'topright',\r\n showOptions: true,\r\n showInfo: true,\r\n showSlider: true,\r\n autoPlay: false\r\n },\r\n\r\n initialize: function (trackplayback, options) {\r\n L.Control.prototype.initialize.call(this, options)\r\n this.trackPlayBack = trackplayback\r\n this.trackPlayBack.on('tick', this._tickCallback, this)\r\n },\r\n\r\n onAdd: function (map) {\r\n this._initContainer()\r\n return this._container\r\n },\r\n\r\n onRemove: function (map) {\r\n this.trackPlayBack.dispose()\r\n this.trackPlayBack.off('tick', this._tickCallback, this)\r\n },\r\n\r\n /**\r\n * 根据unix时间戳(单位:秒)获取时间字符串\r\n * @param {[int]} time [时间戳(精确到秒)]\r\n * @param {[string]} accuracy [精度,日:d, 小时:h,分钟:m,秒:s]\r\n * @return {[string]} [yy:mm:dd hh:mm:ss]\r\n */\r\n getTimeStrFromUnix: function (time, accuracy = 's') {\r\n time = parseInt(time * 1000)\r\n let newDate = new Date(time)\r\n let year = newDate.getFullYear()\r\n let month = (newDate.getMonth() + 1) < 10 ? '0' + (newDate.getMonth() + 1) : newDate.getMonth() + 1\r\n let day = newDate.getDate() < 10 ? '0' + newDate.getDate() : newDate.getDate()\r\n let hours = newDate.getHours() < 10 ? '0' + newDate.getHours() : newDate.getHours()\r\n let minuts = newDate.getMinutes() < 10 ? '0' + newDate.getMinutes() : newDate.getMinutes()\r\n let seconds = newDate.getSeconds() < 10 ? '0' + newDate.getSeconds() : newDate.getSeconds()\r\n let ret\r\n if (accuracy === 'd') {\r\n ret = year + '-' + month + '-' + day\r\n } else if (accuracy === 'h') {\r\n ret = year + '-' + month + '-' + day + ' ' + hours\r\n } else if (accuracy === 'm') {\r\n ret = year + '-' + month + '-' + day + ' ' + hours + ':' + minuts\r\n } else {\r\n ret = year + '-' + month + '-' + day + ' ' + hours + ':' + minuts + ':' + seconds\r\n }\r\n return ret\r\n },\r\n\r\n _initContainer: function () {\r\n var className = 'leaflet-control-playback'\r\n this._container = L.DomUtil.create('div', className)\r\n L.DomEvent.disableClickPropagation(this._container)\r\n\r\n this._optionsContainer = this._createContainer('optionsContainer', this._container)\r\n this._buttonContainer = this._createContainer('buttonContainer', this._container)\r\n this._infoContainer = this._createContainer('infoContainer', this._container)\r\n this._sliderContainer = this._createContainer('sliderContainer', this._container)\r\n\r\n this._pointCbx = this._createCheckbox('show trackPoint', 'show-trackpoint', this._optionsContainer, this._showTrackPoint)\r\n this._lineCbx = this._createCheckbox('show trackLine', 'show-trackLine', this._optionsContainer, this._showTrackLine)\r\n\r\n this._playBtn = this._createButton('play', 'btn-stop', this._buttonContainer, this._play)\r\n this._restartBtn = this._createButton('replay', 'btn-restart', this._buttonContainer, this._restart)\r\n this._slowSpeedBtn = this._createButton('slow', 'btn-slow', this._buttonContainer, this._slow)\r\n this._quickSpeedBtn = this._createButton('quick', 'btn-quick', this._buttonContainer, this._quick)\r\n this._closeBtn = this._createButton('close', 'btn-close', this._buttonContainer, this._close)\r\n\r\n this._infoStartTime = this._createInfo('startTime: ', this.getTimeStrFromUnix(this.trackPlayBack.getStartTime()), 'info-start-time', this._infoContainer)\r\n this._infoEndTime = this._createInfo('endTime: ', this.getTimeStrFromUnix(this.trackPlayBack.getEndTime()), 'info-end-time', this._infoContainer)\r\n this._infoCurTime = this._createInfo('curTime: ', this.getTimeStrFromUnix(this.trackPlayBack.getCurTime()), 'info-cur-time', this._infoContainer)\r\n this._infoSpeedRatio = this._createInfo('speed: ', `X${this.trackPlayBack.getSpeed()}`, 'info-speed-ratio', this._infoContainer)\r\n\r\n this._slider = this._createSlider('time-slider', this._sliderContainer, this._scrollchange)\r\n\r\n return this._container\r\n },\r\n\r\n _createContainer: function (className, container) {\r\n return L.DomUtil.create('div', className, container)\r\n },\r\n\r\n _createCheckbox: function (labelName, className, container, fn) {\r\n let divEle = L.DomUtil.create('div', className + ' trackplayback-checkbox', container)\r\n\r\n let inputEle = L.DomUtil.create('input', 'trackplayback-input', divEle)\r\n let inputId = `trackplayback-input-${L.Util.stamp(inputEle)}`\r\n inputEle.setAttribute('type', 'checkbox')\r\n inputEle.setAttribute('id', inputId)\r\n\r\n let labelEle = L.DomUtil.create('label', 'trackplayback-label', divEle)\r\n labelEle.setAttribute('for', inputId)\r\n labelEle.innerHTML = labelName\r\n\r\n L.DomEvent.on(inputEle, 'change', fn, this)\r\n\r\n return divEle\r\n },\r\n\r\n _createButton: function (title, className, container, fn) {\r\n let link = L.DomUtil.create('a', className, container)\r\n link.href = '#'\r\n link.title = title\r\n\r\n /*\r\n * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n */\r\n link.setAttribute('role', 'button')\r\n link.setAttribute('aria-label', title)\r\n\r\n L.DomEvent.disableClickPropagation(link)\r\n L.DomEvent.on(link, 'click', fn, this)\r\n\r\n return link\r\n },\r\n\r\n _createInfo: function (title, info, className, container) {\r\n let infoContainer = L.DomUtil.create('div', 'info-container', container)\r\n let infoTitle = L.DomUtil.create('span', 'info-title', infoContainer)\r\n infoTitle.innerHTML = title\r\n let infoEle = L.DomUtil.create('span', className, infoContainer)\r\n infoEle.innerHTML = info\r\n return infoEle\r\n },\r\n\r\n _createSlider: function (className, container, fn) {\r\n let sliderEle = L.DomUtil.create('input', className, container)\r\n sliderEle.setAttribute('type', 'range')\r\n sliderEle.setAttribute('min', this.trackPlayBack.getStartTime())\r\n sliderEle.setAttribute('max', this.trackPlayBack.getEndTime())\r\n sliderEle.setAttribute('value', this.trackPlayBack.getCurTime())\r\n\r\n L.DomEvent.on(sliderEle, 'click mousedown dbclick', L.DomEvent.stopPropagation)\r\n .on(sliderEle, 'click', L.DomEvent.preventDefault)\r\n .on(sliderEle, 'change', fn, this)\r\n .on(sliderEle, 'mousemove', fn, this)\r\n\r\n return sliderEle\r\n },\r\n\r\n _showTrackPoint (e) {\r\n if (e.target.checked) {\r\n this.trackPlayBack.showTrackPoint()\r\n } else {\r\n this.trackPlayBack.hideTrackPoint()\r\n }\r\n },\r\n\r\n _showTrackLine (e) {\r\n if (e.target.checked) {\r\n this.trackPlayBack.showTrackLine()\r\n } else {\r\n this.trackPlayBack.hideTrackLine()\r\n }\r\n },\r\n\r\n _play: function () {\r\n let hasClass = L.DomUtil.hasClass(this._playBtn, 'btn-stop')\r\n if (hasClass) {\r\n L.DomUtil.removeClass(this._playBtn, 'btn-stop')\r\n L.DomUtil.addClass(this._playBtn, 'btn-start')\r\n this._playBtn.setAttribute('title', 'stop')\r\n this.trackPlayBack.start()\r\n } else {\r\n L.DomUtil.removeClass(this._playBtn, 'btn-start')\r\n L.DomUtil.addClass(this._playBtn, 'btn-stop')\r\n this._playBtn.setAttribute('title', 'play')\r\n this.trackPlayBack.stop()\r\n }\r\n },\r\n\r\n _restart: function () {\r\n // 播放开始改变播放按钮样式\r\n L.DomUtil.removeClass(this._playBtn, 'btn-stop')\r\n L.DomUtil.addClass(this._playBtn, 'btn-start')\r\n this._playBtn.setAttribute('title', 'stop')\r\n this.trackPlayBack.rePlaying()\r\n },\r\n\r\n _slow: function () {\r\n this.trackPlayBack.slowSpeed()\r\n let sp = this.trackPlayBack.getSpeed()\r\n this._infoSpeedRatio.innerHTML = `X${sp}`\r\n },\r\n\r\n _quick: function () {\r\n this.trackPlayBack.quickSpeed()\r\n let sp = this.trackPlayBack.getSpeed()\r\n this._infoSpeedRatio.innerHTML = `X${sp}`\r\n },\r\n\r\n _close: function () {\r\n L.DomUtil.remove(this._container)\r\n if (this.onRemove) {\r\n this.onRemove(this._map)\r\n }\r\n return this\r\n },\r\n\r\n _scrollchange: function (e) {\r\n let val = Number(e.target.value)\r\n this.trackPlayBack.setCursor(val)\r\n },\r\n\r\n _tickCallback: function (e) {\r\n // 更新时间\r\n let time = this.getTimeStrFromUnix(e.time)\r\n this._infoCurTime.innerHTML = time\r\n // 更新时间轴\r\n this._slider.value = e.time\r\n // 播放结束后改变播放按钮样式\r\n if (e.time >= this.trackPlayBack.getEndTime()) {\r\n L.DomUtil.removeClass(this._playBtn, 'btn-start')\r\n L.DomUtil.addClass(this._playBtn, 'btn-stop')\r\n this._playBtn.setAttribute('title', 'play')\r\n this.trackPlayBack.stop()\r\n }\r\n }\r\n})\r\n\r\nexport const trackplaybackcontrol = function (trackplayback, options) {\r\n return new TrackPlayBackControl(trackplayback, options)\r\n}\r\n","import L from 'leaflet'\r\nimport {\r\n TrackPlayBackControl,\r\n trackplaybackcontrol\r\n} from './control.playback'\r\n\r\nL.TrackPlayBackControl = TrackPlayBackControl\r\nL.trackplaybackcontrol = trackplaybackcontrol\r\n"],"sourceRoot":""}
dist/images/icon-close.png ADDED
dist/images/icon-play.png ADDED
dist/images/icon-quick.png ADDED
dist/images/icon-restart.png ADDED
dist/images/icon-slow.png ADDED
dist/images/icon-stop.png ADDED
dist/leaflet.trackplayback.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i(require("leaflet"));else if("function"==typeof define&&define.amd)define(["leaflet"],i);else{var e="object"==typeof exports?i(require("leaflet")):i(t.L);for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(window,function(t){return function(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:s})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(s,n,function(i){return t[i]}.bind(null,n));return s},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=1)}([function(i,e){i.exports=t},function(t,i,e){"use strict";e.r(i);var s=e(0),n=e.n(s);function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}const a=n.a.Class.extend({initialize:function(t=[],i){n.a.setOptions(this,i),t.forEach(t=>{t.isOrigin=!0}),this._trackPoints=t,this._timeTick={},this._update()},addTrackPoint:function(t){if(r(t))for(let i=0,e=t.length;i<e;i++)this.addTrackPoint(t[i]);this._addTrackPoint(t)},getTimes:function(){let t=[];for(let i=0,e=this._trackPoints.length;i<e;i++)t.push(this._trackPoints[i].time);return t},getStartTrackPoint:function(){return this._trackPoints[0]},getEndTrackPoint:function(){return this._trackPoints[this._trackPoints.length-1]},getTrackPointByTime:function(t){return this._trackPoints[this._timeTick[t]]},_getCalculateTrackPointByTime:function(t){let i=this.getTrackPointByTime(t),e=this.getStartTrackPoint(),s=this.getEndTrackPoint(),r=this.getTimes();if(t<e.time||t>s.time)return;let a,o=0,h=r.length-1;if(o===h)return i;for(;h-o!=1;)t>r[a=parseInt((o+h)/2)]?o=a:h=a;let c=r[o],l=r[h],_=t,u=this.getTrackPointByTime(c),p=this.getTrackPointByTime(l);e=n.a.point(u.lng,u.lat),s=n.a.point(p.lng,p.lat);let f=e.distanceTo(s);if(f<=0)return i=p;let d=f/(l-c),k=(s.y-e.y)/f,T=(s.x-e.x)/f,m=d*(_-c),g=e.x+m*T,x=e.y+m*k,y=s.x>=e.x?180*(.5*Math.PI-Math.asin(k))/Math.PI:180*(1.5*Math.PI+Math.asin(k))/Math.PI;return i?void 0===i.dir&&(i.dir=y):i={lng:g,lat:x,dir:y,isOrigin:!1,time:t},i},getTrackPointsBeforeTime:function(t){let i=[];for(let e=0,s=this._trackPoints.length;e<s;e++)this._trackPoints[e].time<t&&i.push(this._trackPoints[e]);let e=this._getCalculateTrackPointByTime(t);return e&&i.push(e),i},_addTrackPoint:function(t){t.isOrigin=!0,this._trackPoints.push(t),this._update()},_update:function(){this._sortTrackPointsByTime(),this._updatetimeTick()},_sortTrackPointsByTime:function(){let t=this._trackPoints.length;for(let i=0;i<t;i++)for(let e=0;e<t-1-i;e++)if(this._trackPoints[e].time>this._trackPoints[e+1].time){let t=this._trackPoints[e+1];this._trackPoints[e+1]=this._trackPoints[e],this._trackPoints[e]=t}},_updatetimeTick:function(){this._timeTick={};for(let t=0,i=this._trackPoints.length;t<i;t++)this._timeTick[this._trackPoints[t].time]=t}}),o=n.a.Class.extend({initialize:function(t=[],i,e){n.a.setOptions(this,e),this._tracks=[],this.addTrack(t),this._draw=i,this._updateTime()},getMinTime:function(){return this._minTime},getMaxTime:function(){return this._maxTime},addTrack:function(t){if(r(t))for(let i=0,e=t.length;i<e;i++)this.addTrack(t[i]);else{if(!(t instanceof a))throw new Error("tracks must be an instance of `Track` or an array of `Track` instance!");this._tracks.push(t),this._updateTime()}},drawTracksByTime:function(t){this._draw.clear();for(let i=0,e=this._tracks.length;i<e;i++){let e=this._tracks[i].getTrackPointsBeforeTime(t);e&&e.length&&this._draw.drawTrack(e)}},_updateTime:function(){this._minTime=this._tracks[0].getStartTrackPoint().time,this._maxTime=this._tracks[0].getEndTrackPoint().time;for(let t=0,i=this._tracks.length;t<i;t++){let i=this._tracks[t].getStartTrackPoint().time,e=this._tracks[t].getEndTrackPoint().time;i<this._minTime&&(this._minTime=i),e>this._maxTime&&(this._maxTime=e)}}}),h=n.a.Class.extend({includes:n.a.Mixin.Events,options:{speed:12,maxSpeed:65},initialize:function(t,i){n.a.setOptions(this,i),this._trackController=t,this._endTime=this._trackController.getMaxTime(),this._curTime=this._trackController.getMinTime(),this._speed=this.options.speed,this._maxSpeed=this.options.maxSpeed,this._intervalID=null,this._lastFpsUpdateTime=0},start:function(){this._intervalID||(this._intervalID=n.a.Util.requestAnimFrame(this._tick,this))},stop:function(){this._intervalID&&(n.a.Util.cancelAnimFrame(this._intervalID),this._intervalID=null,this._lastFpsUpdateTime=0)},rePlaying:function(){this.stop(),this._curTime=this._trackController.getMinTime(),this.start()},slowSpeed:function(){this._speed=this._speed<=1?this._speed:this._speed-1,this._intervalID&&(this.stop(),this.start())},quickSpeed:function(){this._speed=this._speed>=this._maxSpeed?this._speed:this._speed+1,this._intervalID&&(this.stop(),this.start())},getSpeed:function(){return this._speed},getCurTime:function(){return this._curTime},getStartTime:function(){return this._trackController.getMinTime()},getEndTime:function(){return this._trackController.getMaxTime()},isPlaying:function(){return!!this._intervalID},setCursor:function(t){this._curTime=t,this._trackController.drawTracksByTime(this._curTime),this.fire("tick",{time:this._curTime})},setSpeed:function(t){this._speed=t,this._intervalID&&(this.stop(),this.start())},_caculatefpsTime:function(t){let i;return i=0===this._lastFpsUpdateTime?0:t-this._lastFpsUpdateTime,this._lastFpsUpdateTime=t,i/=1e3},_tick:function(){let t=+new Date,i=!1,e=this._caculatefpsTime(t)*Math.pow(2,this._speed-1);this._curTime+=e,this._curTime>=this._endTime&&(this._curTime=this._endTime,i=!0),this._trackController.drawTracksByTime(this._curTime),this.fire("tick",{time:this._curTime}),i||(this._intervalID=n.a.Util.requestAnimFrame(this._tick,this))}}),c=n.a.Renderer.extend({initialize:function(t){n.a.Renderer.prototype.initialize.call(this,t),this.options.padding=.1},onAdd:function(t){this._container=n.a.DomUtil.create("canvas","leaflet-zoom-animated"),t.getPane(this.options.pane).appendChild(this._container),this._ctx=this._container.getContext("2d"),this._update()},onRemove:function(t){n.a.DomUtil.remove(this._container)},getContainer:function(){return this._container},getBounds:function(){return this._bounds},_update:function(){if(!this._map._animatingZoom||!this._bounds){n.a.Renderer.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),s=n.a.Browser.retina?2:1;n.a.DomUtil.setPosition(i,t.min),i.width=s*e.x,i.height=s*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",n.a.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}}}),l=n.a.Class.extend({trackPointOptions:{isDraw:!1,useCanvas:!0,stroke:!1,color:"#ef0300",fill:!0,fillColor:"#ef0300",opacity:.3,radius:4},trackLineOptions:{isDraw:!1,stroke:!0,color:"#1C54E2",weight:2,fill:!1,fillColor:"#000",opacity:.3},targetOptions:{useImg:!1,imgUrl:"../../static/images/ship.png",showText:!1,width:8,height:18,color:"#00f",fillColor:"#9FD12D"},toolTipOptions:{offset:[0,0],direction:"top",permanent:!1},initialize:function(t,i){if(n.a.extend(this.trackPointOptions,i.trackPointOptions),n.a.extend(this.trackLineOptions,i.trackLineOptions),n.a.extend(this.targetOptions,i.targetOptions),n.a.extend(this.toolTipOptions,i.toolTipOptions),this._showTrackPoint=this.trackPointOptions.isDraw,this._showTrackLine=this.trackLineOptions.isDraw,this._map=t,this._map.on("mousemove",this._onmousemoveEvt,this),this._trackLayer=(new c).addTo(t),this._trackLayer.on("update",this._trackLayerUpdate,this),this._canvas=this._trackLayer.getContainer(),this._ctx=this._canvas.getContext("2d"),this._bufferTracks=[],this.trackPointOptions.useCanvas||(this._trackPointFeatureGroup=n.a.featureGroup([]).addTo(t)),this.targetOptions.useImg){const t=new Image;t.onload=(()=>{this._targetImg=t}),t.onerror=(()=>{throw new Error("img load error!")}),t.src=this.targetOptions.imgUrl}},update:function(){this._trackLayerUpdate()},drawTrack:function(t){this._bufferTracks.push(t),this._drawTrack(t)},showTrackPoint:function(){this._showTrackPoint=!0,this.update()},hideTrackPoint:function(){this._showTrackPoint=!1,this.update()},showTrackLine:function(){this._showTrackLine=!0,this.update()},hideTrackLine:function(){this._showTrackLine=!1,this.update()},remove:function(){this._bufferTracks=[],this._trackLayer.off("update",this._trackLayerUpdate,this),this._map.off("mousemove",this._onmousemoveEvt,this),this._map.hasLayer(this._trackLayer)&&this._map.removeLayer(this._trackLayer),this._map.hasLayer(this._trackPointFeatureGroup)&&this._map.removeLayer(this._trackPointFeatureGroup)},clear:function(){this._clearLayer(),this._bufferTracks=[]},_trackLayerUpdate:function(){this._bufferTracks.length&&(this._clearLayer(),this._bufferTracks.forEach(function(t,i){this._drawTrack(t)}.bind(this)))},_onmousemoveEvt:function(t){if(!this._showTrackPoint)return;let i=t.layerPoint;if(this._bufferTracks.length)for(let t=0,e=this._bufferTracks.length;t<e;t++)for(let e=0,s=this._bufferTracks[t].length;e<s;e++){let s=this._getLayerPoint(this._bufferTracks[t][e]);if(i.distanceTo(s)<=this.trackPointOptions.radius)return void this._opentoolTip(this._bufferTracks[t][e])}this._map.hasLayer(this._tooltip)&&this._map.removeLayer(this._tooltip),this._canvas.style.cursor="pointer"},_opentoolTip:function(t){this._map.hasLayer(this._tooltip)&&this._map.removeLayer(this._tooltip),this._canvas.style.cursor="default";let i=n.a.latLng(t.lat,t.lng),e=this._tooltip=n.a.tooltip(this.toolTipOptions);e.setLatLng(i),e.addTo(this._map),e.setContent(this._getTooltipText(t))},_drawTrack:function(t){this._showTrackLine&&this._drawTrackLine(t);let i=t[t.length-1];this.targetOptions.useImg&&this._targetImg?this._drawShipImage(i):this._drawShipCanvas(i),this.targetOptions.showText&&this._drawtxt(`航向:${parseInt(i.dir)}度`,i),this._showTrackPoint&&(this.trackPointOptions.useCanvas?this._drawTrackPointsCanvas(t):this._drawTrackPointsSvg(t))},_drawTrackLine:function(t){let i=this.trackLineOptions,e=this._getLayerPoint(t[0]);this._ctx.save(),this._ctx.beginPath(),this._ctx.moveTo(e.x,e.y);for(let i=1,e=t.length;i<e;i++){let e=this._getLayerPoint(t[i]);this._ctx.lineTo(e.x,e.y)}this._ctx.globalAlpha=i.opacity,i.stroke&&(this._ctx.strokeStyle=i.color,this._ctx.lineWidth=i.weight,this._ctx.stroke()),i.fill&&(this._ctx.fillStyle=i.fillColor,this._ctx.fill()),this._ctx.restore()},_drawTrackPointsCanvas:function(t){let i=this.trackPointOptions;this._ctx.save();for(let e=0,s=t.length;e<s;e++)if(t[e].isOrigin){let s=n.a.latLng(t[e].lat,t[e].lng),r=i.radius,a=this._map.latLngToLayerPoint(s);this._ctx.beginPath(),this._ctx.arc(a.x,a.y,r,0,2*Math.PI,!1),this._ctx.globalAlpha=i.opacity,i.stroke&&(this._ctx.strokeStyle=i.color,this._ctx.stroke()),i.fill&&(this._ctx.fillStyle=i.fillColor,this._ctx.fill())}this._ctx.restore()},_drawTrackPointsSvg:function(t){for(let i=0,e=t.length;i<e;i++)if(t[i].isOrigin){let e=n.a.latLng(t[i].lat,t[i].lng),s=n.a.circleMarker(e,this.trackPointOptions);s.bindTooltip(this._getTooltipText(t[i]),this.toolTipOptions),this._trackPointFeatureGroup.addLayer(s)}},_drawtxt:function(t,i){let e=this._getLayerPoint(i);this._ctx.save(),this._ctx.font="12px Verdana",this._ctx.fillStyle="#000",this._ctx.textAlign="center",this._ctx.textBaseline="bottom",this._ctx.fillText(t,e.x,e.y-12,200),this._ctx.restore()},_drawShipCanvas:function(t){let i=this._getLayerPoint(t),e=t.dir||0,s=this.targetOptions.width,n=this.targetOptions.height,r=n/3;this._ctx.save(),this._ctx.fillStyle=this.targetOptions.fillColor,this._ctx.strokeStyle=this.targetOptions.color,this._ctx.translate(i.x,i.y),this._ctx.rotate(Math.PI/180*e),this._ctx.beginPath(),this._ctx.moveTo(0,0-n/2),this._ctx.lineTo(0-s/2,0-n/2+r),this._ctx.lineTo(0-s/2,0+n/2),this._ctx.lineTo(0+s/2,0+n/2),this._ctx.lineTo(0+s/2,0-n/2+r),this._ctx.closePath(),this._ctx.fill(),this._ctx.stroke(),this._ctx.restore()},_drawShipImage:function(t){let i=this._getLayerPoint(t),e=t.dir||0,s=this.targetOptions.width,n=this.targetOptions.height,r=s/2,a=n/2;this._ctx.save(),this._ctx.translate(i.x,i.y),this._ctx.rotate(Math.PI/180*e),this._ctx.drawImage(this._targetImg,0-r,0-a,s,n),this._ctx.restore()},_getTooltipText:function(t){let i=[];if(i.push("<table>"),t.info&&t.info.length)for(let e=0,s=t.info.length;e<s;e++)i.push("<tr>"),i.push("<td>"+t.info[e].key+"</td>"),i.push("<td>"+t.info[e].value+"</td>"),i.push("</tr>");return i.push("</table>"),i=i.join("")},_clearLayer:function(){let t=this._trackLayer.getBounds();if(t){let i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);this._map.hasLayer(this._trackPointFeatureGroup)&&this._trackPointFeatureGroup.clearLayers()},_getLayerPoint(t){return this._map.latLngToLayerPoint(n.a.latLng(t.lat,t.lng))}}),_=n.a.Class.extend({includes:n.a.Mixin.Events,initialize:function(t,i,e={}){let s={trackPointOptions:e.trackPointOptions,trackLineOptions:e.trackLineOptions,targetOptions:e.targetOptions,toolTipOptions:e.toolTipOptions};this.tracks=this._initTracks(t),this.draw=new l(i,s),this.trackController=new o(this.tracks,this.draw),this.clock=new h(this.trackController,e.clockOptions),this.clock.on("tick",this._tick,this)},start:function(){return this.clock.start(),this},stop:function(){return this.clock.stop(),this},rePlaying:function(){return this.clock.rePlaying(),this},slowSpeed:function(){return this.clock.slowSpeed(),this},quickSpeed:function(){return this.clock.quickSpeed(),this},getSpeed:function(){return this.clock.getSpeed()},getCurTime:function(){return this.clock.getCurTime()},getStartTime:function(){return this.clock.getStartTime()},getEndTime:function(){return this.clock.getEndTime()},isPlaying:function(){return this.clock.isPlaying()},setCursor:function(t){return this.clock.setCursor(t),this},setSpeed:function(t){return this.clock.setSpeed(t),this},showTrackPoint:function(){return this.draw.showTrackPoint(),this},hideTrackPoint:function(){return this.draw.hideTrackPoint(),this},showTrackLine:function(){return this.draw.showTrackLine(),this},hideTrackLine:function(){return this.draw.hideTrackLine(),this},dispose:function(){this.clock.off("tick",this._tick),this.draw.remove(),this.tracks=null,this.draw=null,this.trackController=null,this.clock=null},_tick:function(t){this.fire("tick",t)},_initTracks:function(t){let i=[];if(r(t))if(r(t[0]))for(let e=0,s=t.length;e<s;e++)i.push(new a(t[e]));else i.push(new a(t));return i}});n.a.TrackPlayBack=_,n.a.trackplayback=function(t,i,e){return new _(t,i,e)}}])});
2
+ //# sourceMappingURL=leaflet.trackplayback.js.map
dist/leaflet.trackplayback.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///external {\"root\":\"L\",\"commonjs\":\"leaflet\",\"commonjs2\":\"leaflet\",\"amd\":\"leaflet\"}","webpack:///./src/leaflet.trackplayback/util.js","webpack:///./src/leaflet.trackplayback/track.js","webpack:///./src/leaflet.trackplayback/trackcontroller.js","webpack:///./src/leaflet.trackplayback/clock.js","webpack:///./src/leaflet.trackplayback/tracklayer.js","webpack:///./src/leaflet.trackplayback/draw.js","webpack:///./src/leaflet.trackplayback/trackplayback.js","webpack:///./src/leaflet.trackplayback/index.js"],"names":["root","factory","exports","module","require","define","amd","a","i","window","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isArray","arr","Array","toString","Track","external_root_L_commonjs_leaflet_commonjs2_leaflet_amd_leaflet_default","Class","extend","initialize","trackData","options","setOptions","this","forEach","item","isOrigin","_trackPoints","_timeTick","_update","addTrackPoint","trackPoint","len","length","_addTrackPoint","getTimes","times","push","time","getStartTrackPoint","getEndTrackPoint","getTrackPointByTime","_getCalculateTrackPointByTime","endpoint","startPt","endPt","left","right","parseInt","t0","t1","p0","p1","point","lng","lat","distanceTo","v","sinx","y","cosx","x","step","dir","Math","PI","asin","undefined","getTrackPointsBeforeTime","tpoints","_sortTrackPointsByTime","_updatetimeTick","j","tmp","TrackController","tracks","draw","_tracks","addTrack","_draw","_updateTime","getMinTime","_minTime","getMaxTime","_maxTime","track","Error","drawTracksByTime","clear","tps","drawTrack","stime","etime","Clock","includes","Mixin","Events","speed","maxSpeed","trackController","_trackController","_endTime","_curTime","_speed","_maxSpeed","_intervalID","_lastFpsUpdateTime","start","Util","requestAnimFrame","_tick","stop","cancelAnimFrame","rePlaying","slowSpeed","quickSpeed","getSpeed","getCurTime","getStartTime","getEndTime","isPlaying","setCursor","fire","setSpeed","_caculatefpsTime","now","Date","isPause","stepTime","pow","TrackLayer","Renderer","padding","onAdd","map","_container","DomUtil","getPane","pane","appendChild","_ctx","getContext","onRemove","remove","getContainer","getBounds","_bounds","_map","_animatingZoom","b","container","size","getSize","Browser","retina","setPosition","min","width","height","style","scale","translate","Draw","trackPointOptions","isDraw","useCanvas","stroke","color","fill","fillColor","opacity","radius","trackLineOptions","weight","targetOptions","useImg","imgUrl","showText","toolTipOptions","offset","direction","permanent","_showTrackPoint","_showTrackLine","on","_onmousemoveEvt","_trackLayer","addTo","_trackLayerUpdate","_canvas","_bufferTracks","_trackPointFeatureGroup","featureGroup","img","Image","onload","_targetImg","onerror","src","update","trackpoints","_drawTrack","showTrackPoint","hideTrackPoint","showTrackLine","hideTrackLine","off","hasLayer","removeLayer","_clearLayer","element","index","e","layerPoint","leni","tpoint","_getLayerPoint","_opentoolTip","_tooltip","cursor","trackpoint","latlng","latLng","tooltip","setLatLng","setContent","_getTooltipText","_drawTrackLine","targetPoint","_drawShipImage","_drawShipCanvas","_drawtxt","_drawTrackPointsCanvas","_drawTrackPointsSvg","tp0","save","beginPath","moveTo","tpi","lineTo","globalAlpha","strokeStyle","lineWidth","fillStyle","restore","latLngToLayerPoint","arc","cricleMarker","circleMarker","bindTooltip","addLayer","text","font","textAlign","textBaseline","fillText","rotate","w","h","dh","closePath","drawImage","targetobj","content","info","join","bounds","clearRect","clearLayers","[object Object]","TrackPlayBack","data","drawOptions","_initTracks","clock","clockOptions","dispose","trackplayback"],"mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBACA,sBAAAC,eAAAC,IACAD,QAAA,WAAAJ,OACA,CACA,IAAAM,EAAA,iBAAAL,QAAAD,EAAAG,QAAA,YAAAH,EAAAD,EAAA,GACA,QAAAQ,KAAAD,GA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1E,MAEAmL,eAAA,WAEA,OADAnL,KAAAqD,KAAA8H,iBACAnL,MAEAoL,eAAA,WAEA,OADApL,KAAAqD,KAAA+H,iBACApL,MAEAqL,cAAA,WAEA,OADArL,KAAAqD,KAAAgI,gBACArL,MAEAsL,cAAA,WAEA,OADAtL,KAAAqD,KAAAiI,gBACAtL,MAEA6P,QAAA,WACA7P,KAAA2P,MAAApE,IAAA,OAAAvL,KAAAuF,OACAvF,KAAAqD,KAAAmE,SACAxH,KAAAoD,OAAA,KACApD,KAAAqD,KAAA,KACArD,KAAA4E,gBAAA,KACA5E,KAAA2P,MAAA,MAEApK,MAAA,SAAAsG,GACA7L,KAAAmG,KAAA,OAAA0F,IAEA6D,YAAA,SAAAF,GACA,IAAApM,KACA,GAAQhE,EAAYoQ,GACpB,GAAUpQ,EAAYoQ,EAAA,IAEtB,QAAAzS,EAAA,EAAA0D,EAAA+O,EAAA9O,OAA0C3D,EAAA0D,EAAS1D,IACnDqG,EAAAtC,KAAA,IAA0BtB,EAAKgQ,EAAAzS,UAI/BqG,EAAAtC,KAAA,IAAwBtB,EAAKgQ,IAG7B,OAAApM,KCrHA3D,EAAA3C,EAACyS,cAAiBA,EAClB9P,EAAA3C,EAACgT,cDwHM,SAAAN,EAAAzI,EAAAjH,GACP,WAAAyP,EAAAC,EAAAzI,EAAAjH","file":"leaflet.trackplayback.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"leaflet\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"leaflet\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"leaflet\")) : factory(root[\"L\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","export function isArray (arr) {\r\n return Array.isArray ? Array.isArray(arr) : Object.prototype.toString.call(arr) === '[object Array]'\r\n}\r\n","import L from 'leaflet'\r\n\r\nimport {\r\n isArray\r\n} from './util'\r\n\r\n/**\r\n * 轨迹类\r\n */\r\nexport const Track = L.Class.extend({\r\n\r\n initialize: function (trackData = [], options) {\r\n L.setOptions(this, options)\r\n\r\n trackData.forEach(item => {\r\n // 添加 isOrigin 字段用来标识是否是原始采样点,与插值点区分开\r\n item.isOrigin = true\r\n })\r\n this._trackPoints = trackData\r\n this._timeTick = {}\r\n this._update()\r\n },\r\n\r\n addTrackPoint: function (trackPoint) {\r\n if (isArray(trackPoint)) {\r\n for (let i = 0, len = trackPoint.length; i < len; i++) {\r\n this.addTrackPoint(trackPoint[i])\r\n }\r\n }\r\n this._addTrackPoint(trackPoint)\r\n },\r\n\r\n getTimes: function () {\r\n let times = []\r\n for (let i = 0, len = this._trackPoints.length; i < len; i++) {\r\n times.push(this._trackPoints[i].time)\r\n }\r\n return times\r\n },\r\n\r\n getStartTrackPoint: function () {\r\n return this._trackPoints[0]\r\n },\r\n\r\n getEndTrackPoint: function () {\r\n return this._trackPoints[this._trackPoints.length - 1]\r\n },\r\n\r\n getTrackPointByTime: function (time) {\r\n return this._trackPoints[this._timeTick[time]]\r\n },\r\n\r\n _getCalculateTrackPointByTime: function (time) {\r\n // 先判断最后一个点是否为原始点\r\n let endpoint = this.getTrackPointByTime(time)\r\n let startPt = this.getStartTrackPoint()\r\n let endPt = this.getEndTrackPoint()\r\n let times = this.getTimes()\r\n if (time < startPt.time || time > endPt.time) return\r\n let left = 0\r\n let right = times.length - 1\r\n let n\r\n // 处理只有一个点情况\r\n if (left === right) {\r\n return endpoint\r\n }\r\n // 通过【二分查找】法查出当前时间所在的时间区间\r\n while (right - left !== 1) {\r\n n = parseInt((left + right) / 2)\r\n if (time > times[n]) left = n\r\n else right = n\r\n }\r\n\r\n let t0 = times[left]\r\n let t1 = times[right]\r\n let t = time\r\n let p0 = this.getTrackPointByTime(t0)\r\n let p1 = this.getTrackPointByTime(t1)\r\n startPt = L.point(p0.lng, p0.lat)\r\n endPt = L.point(p1.lng, p1.lat)\r\n let s = startPt.distanceTo(endPt)\r\n // 不同时间在同一个点情形\r\n if (s <= 0) {\r\n endpoint = p1\r\n return endpoint\r\n }\r\n // 假设目标在两点间做匀速直线运动\r\n // 求解速度向量,并计算时间 t 目标所在位置\r\n let v = s / (t1 - t0)\r\n let sinx = (endPt.y - startPt.y) / s\r\n let cosx = (endPt.x - startPt.x) / s\r\n let step = v * (t - t0)\r\n let x = startPt.x + step * cosx\r\n let y = startPt.y + step * sinx\r\n // 求目标的运动方向,0-360度\r\n let dir = endPt.x >= startPt.x ? (Math.PI * 0.5 - Math.asin(sinx)) * 180 / Math.PI : (Math.PI * 1.5 + Math.asin(sinx)) * 180 / Math.PI\r\n\r\n if (endpoint) {\r\n if (endpoint.dir === undefined) {\r\n endpoint.dir = dir\r\n }\r\n } else {\r\n endpoint = {\r\n lng: x,\r\n lat: y,\r\n dir: dir,\r\n isOrigin: false,\r\n time: time\r\n }\r\n }\r\n return endpoint\r\n },\r\n\r\n // 获取某个时间点之前走过的轨迹\r\n getTrackPointsBeforeTime: function (time) {\r\n let tpoints = []\r\n for (let i = 0, len = this._trackPoints.length; i < len; i++) {\r\n if (this._trackPoints[i].time < time) {\r\n tpoints.push(this._trackPoints[i])\r\n }\r\n }\r\n // 获取最后一个点,根据时间线性插值而来\r\n let endPt = this._getCalculateTrackPointByTime(time)\r\n if (endPt) {\r\n tpoints.push(endPt)\r\n }\r\n return tpoints\r\n },\r\n\r\n _addTrackPoint: function (trackPoint) {\r\n trackPoint.isOrigin = true\r\n this._trackPoints.push(trackPoint)\r\n this._update()\r\n },\r\n\r\n _update: function () {\r\n this._sortTrackPointsByTime()\r\n this._updatetimeTick()\r\n },\r\n\r\n // 轨迹点按时间排序 【冒泡排序】\r\n _sortTrackPointsByTime: function () {\r\n let len = this._trackPoints.length\r\n for (let i = 0; i < len; i++) {\r\n for (let j = 0; j < len - 1 - i; j++) {\r\n if (this._trackPoints[j].time > this._trackPoints[j + 1].time) {\r\n let tmp = this._trackPoints[j + 1]\r\n this._trackPoints[j + 1] = this._trackPoints[j]\r\n this._trackPoints[j] = tmp\r\n }\r\n }\r\n }\r\n },\r\n\r\n // 为轨迹点建立时间索引,优化查找性能\r\n _updatetimeTick: function () {\r\n this._timeTick = {}\r\n for (let i = 0, len = this._trackPoints.length; i < len; i++) {\r\n this._timeTick[this._trackPoints[i].time] = i\r\n }\r\n }\r\n})\r\n\r\nexport const track = function (trackData, options) {\r\n return new Track(trackData, options)\r\n}\r\n","import L from 'leaflet'\r\n\r\nimport {\r\n isArray\r\n} from './util'\r\nimport {\r\n Track\r\n} from './track'\r\n\r\n/**\r\n * 控制器类\r\n * 控制轨迹和绘制\r\n */\r\nexport const TrackController = L.Class.extend({\r\n\r\n initialize: function (tracks = [], draw, options) {\r\n L.setOptions(this, options)\r\n\r\n this._tracks = []\r\n this.addTrack(tracks)\r\n\r\n this._draw = draw\r\n\r\n this._updateTime()\r\n },\r\n\r\n getMinTime: function () {\r\n return this._minTime\r\n },\r\n\r\n getMaxTime: function () {\r\n return this._maxTime\r\n },\r\n\r\n addTrack: function (track) {\r\n if (isArray(track)) {\r\n for (let i = 0, len = track.length; i < len; i++) {\r\n this.addTrack(track[i])\r\n }\r\n } else if (track instanceof Track) {\r\n this._tracks.push(track)\r\n this._updateTime()\r\n } else {\r\n throw new Error('tracks must be an instance of `Track` or an array of `Track` instance!')\r\n }\r\n },\r\n\r\n drawTracksByTime: function (time) {\r\n this._draw.clear()\r\n for (let i = 0, len = this._tracks.length; i < len; i++) {\r\n let track = this._tracks[i]\r\n let tps = track.getTrackPointsBeforeTime(time)\r\n if (tps && tps.length) this._draw.drawTrack(tps)\r\n }\r\n },\r\n\r\n _updateTime: function () {\r\n this._minTime = this._tracks[0].getStartTrackPoint().time\r\n this._maxTime = this._tracks[0].getEndTrackPoint().time\r\n for (let i = 0, len = this._tracks.length; i < len; i++) {\r\n let stime = this._tracks[i].getStartTrackPoint().time\r\n let etime = this._tracks[i].getEndTrackPoint().time\r\n if (stime < this._minTime) {\r\n this._minTime = stime\r\n }\r\n if (etime > this._maxTime) {\r\n this._maxTime = etime\r\n }\r\n }\r\n }\r\n\r\n})\r\n\r\nexport const trackController = function (tracks, draw, options) {\r\n return new TrackController(tracks, draw, options)\r\n}\r\n","import L from 'leaflet'\r\n/**\r\n * 时钟类,控制轨迹播放动画\r\n */\r\nexport const Clock = L.Class.extend({\r\n\r\n includes: L.Mixin.Events,\r\n\r\n options: {\r\n // 播放速度\r\n // 计算方法 fpstime * Math.pow(2, this._speed - 1)\r\n speed: 12,\r\n // 最大播放速度\r\n maxSpeed: 65\r\n },\r\n\r\n initialize: function (trackController, options) {\r\n L.setOptions(this, options)\r\n\r\n this._trackController = trackController\r\n this._endTime = this._trackController.getMaxTime()\r\n this._curTime = this._trackController.getMinTime()\r\n this._speed = this.options.speed\r\n this._maxSpeed = this.options.maxSpeed\r\n this._intervalID = null\r\n this._lastFpsUpdateTime = 0\r\n },\r\n\r\n start: function () {\r\n if (this._intervalID) return\r\n this._intervalID = L.Util.requestAnimFrame(this._tick, this)\r\n },\r\n\r\n stop: function () {\r\n if (!this._intervalID) return\r\n L.Util.cancelAnimFrame(this._intervalID)\r\n this._intervalID = null\r\n this._lastFpsUpdateTime = 0\r\n },\r\n\r\n rePlaying: function () {\r\n this.stop()\r\n this._curTime = this._trackController.getMinTime()\r\n this.start()\r\n },\r\n\r\n slowSpeed: function () {\r\n this._speed = this._speed <= 1 ? this._speed : this._speed - 1\r\n if (this._intervalID) {\r\n this.stop()\r\n this.start()\r\n }\r\n },\r\n\r\n quickSpeed: function () {\r\n this._speed = this._speed >= this._maxSpeed ? this._speed : this._speed + 1\r\n if (this._intervalID) {\r\n this.stop()\r\n this.start()\r\n }\r\n },\r\n\r\n getSpeed: function () {\r\n return this._speed\r\n },\r\n\r\n getCurTime: function () {\r\n return this._curTime\r\n },\r\n\r\n getStartTime: function () {\r\n return this._trackController.getMinTime()\r\n },\r\n\r\n getEndTime: function () {\r\n return this._trackController.getMaxTime()\r\n },\r\n\r\n isPlaying: function () {\r\n return !!this._intervalID\r\n },\r\n\r\n setCursor: function (time) {\r\n this._curTime = time\r\n this._trackController.drawTracksByTime(this._curTime)\r\n this.fire('tick', {\r\n time: this._curTime\r\n })\r\n },\r\n\r\n setSpeed: function (speed) {\r\n this._speed = speed\r\n if (this._intervalID) {\r\n this.stop()\r\n this.start()\r\n }\r\n },\r\n\r\n // 计算两帧时间间隔,单位:秒\r\n _caculatefpsTime: function (now) {\r\n let time\r\n if (this._lastFpsUpdateTime === 0) {\r\n time = 0\r\n } else {\r\n time = now - this._lastFpsUpdateTime\r\n }\r\n this._lastFpsUpdateTime = now\r\n // 将毫秒转换成秒\r\n time = time / 1000\r\n return time\r\n },\r\n\r\n _tick: function () {\r\n let now = +new Date()\r\n let fpstime = this._caculatefpsTime(now)\r\n let isPause = false\r\n let stepTime = fpstime * Math.pow(2, this._speed - 1)\r\n this._curTime += stepTime\r\n if (this._curTime >= this._endTime) {\r\n this._curTime = this._endTime\r\n isPause = true\r\n }\r\n this._trackController.drawTracksByTime(this._curTime)\r\n this.fire('tick', {\r\n time: this._curTime\r\n })\r\n if (!isPause) this._intervalID = L.Util.requestAnimFrame(this._tick, this)\r\n }\r\n})\r\n\r\nexport const clock = function (trackController, options) {\r\n return new Clock(trackController, options)\r\n}\r\n","import L from 'leaflet'\r\n\r\n/**\r\n * 轨迹图层\r\n */\r\nexport const TrackLayer = L.Renderer.extend({\r\n\r\n initialize: function (options) {\r\n L.Renderer.prototype.initialize.call(this, options)\r\n this.options.padding = 0.1\r\n },\r\n\r\n onAdd: function (map) {\r\n this._container = L.DomUtil.create('canvas', 'leaflet-zoom-animated')\r\n\r\n var pane = map.getPane(this.options.pane)\r\n pane.appendChild(this._container)\r\n\r\n this._ctx = this._container.getContext('2d')\r\n\r\n this._update()\r\n },\r\n\r\n onRemove: function (map) {\r\n L.DomUtil.remove(this._container)\r\n },\r\n\r\n getContainer: function () {\r\n return this._container\r\n },\r\n\r\n getBounds: function () {\r\n return this._bounds\r\n },\r\n\r\n _update: function () {\r\n if (this._map._animatingZoom && this._bounds) {\r\n return\r\n }\r\n\r\n L.Renderer.prototype._update.call(this)\r\n\r\n var b = this._bounds\r\n\r\n var container = this._container\r\n\r\n var size = b.getSize()\r\n\r\n var m = L.Browser.retina ? 2 : 1\r\n\r\n L.DomUtil.setPosition(container, b.min)\r\n\r\n // set canvas size (also clearing it); use double size on retina\r\n container.width = m * size.x\r\n container.height = m * size.y\r\n container.style.width = size.x + 'px'\r\n container.style.height = size.y + 'px'\r\n\r\n if (L.Browser.retina) {\r\n this._ctx.scale(2, 2)\r\n }\r\n\r\n // translate so we use the same path coordinates after canvas element moves\r\n this._ctx.translate(-b.min.x, -b.min.y)\r\n\r\n // Tell paths to redraw themselves\r\n this.fire('update')\r\n }\r\n})\r\n","import L from 'leaflet'\r\n\r\nimport {\r\n TrackLayer\r\n} from './tracklayer'\r\n\r\n/**\r\n * 绘制类\r\n * 完成轨迹线、轨迹点、目标物的绘制工作\r\n */\r\nexport const Draw = L.Class.extend({\r\n\r\n trackPointOptions: {\r\n isDraw: false,\r\n useCanvas: true,\r\n stroke: false,\r\n color: '#ef0300',\r\n fill: true,\r\n fillColor: '#ef0300',\r\n opacity: 0.3,\r\n radius: 4\r\n },\r\n trackLineOptions: {\r\n isDraw: false,\r\n stroke: true,\r\n color: '#1C54E2', // stroke color\r\n weight: 2,\r\n fill: false,\r\n fillColor: '#000',\r\n opacity: 0.3\r\n },\r\n targetOptions: {\r\n useImg: false,\r\n imgUrl: '../../static/images/ship.png',\r\n showText: false,\r\n width: 8,\r\n height: 18,\r\n color: '#00f', // stroke color\r\n fillColor: '#9FD12D'\r\n },\r\n toolTipOptions: {\r\n offset: [0, 0],\r\n direction: 'top',\r\n permanent: false\r\n },\r\n\r\n initialize: function (map, options) {\r\n L.extend(this.trackPointOptions, options.trackPointOptions)\r\n L.extend(this.trackLineOptions, options.trackLineOptions)\r\n L.extend(this.targetOptions, options.targetOptions)\r\n L.extend(this.toolTipOptions, options.toolTipOptions)\r\n\r\n this._showTrackPoint = this.trackPointOptions.isDraw\r\n this._showTrackLine = this.trackLineOptions.isDraw\r\n\r\n this._map = map\r\n this._map.on('mousemove', this._onmousemoveEvt, this)\r\n\r\n this._trackLayer = new TrackLayer().addTo(map)\r\n this._trackLayer.on('update', this._trackLayerUpdate, this)\r\n\r\n this._canvas = this._trackLayer.getContainer()\r\n this._ctx = this._canvas.getContext('2d')\r\n\r\n this._bufferTracks = []\r\n\r\n if (!this.trackPointOptions.useCanvas) {\r\n this._trackPointFeatureGroup = L.featureGroup([]).addTo(map)\r\n }\r\n\r\n // 目标如果使用图片,先加载图片\r\n if (this.targetOptions.useImg) {\r\n const img = new Image()\r\n img.onload = () => {\r\n this._targetImg = img\r\n }\r\n img.onerror = () => {\r\n throw new Error('img load error!')\r\n }\r\n img.src = this.targetOptions.imgUrl\r\n }\r\n },\r\n\r\n update: function () {\r\n this._trackLayerUpdate()\r\n },\r\n\r\n drawTrack: function (trackpoints) {\r\n this._bufferTracks.push(trackpoints)\r\n this._drawTrack(trackpoints)\r\n },\r\n\r\n showTrackPoint: function () {\r\n this._showTrackPoint = true\r\n this.update()\r\n },\r\n\r\n hideTrackPoint: function () {\r\n this._showTrackPoint = false\r\n this.update()\r\n },\r\n\r\n showTrackLine: function () {\r\n this._showTrackLine = true\r\n this.update()\r\n },\r\n\r\n hideTrackLine: function () {\r\n this._showTrackLine = false\r\n this.update()\r\n },\r\n\r\n remove: function () {\r\n this._bufferTracks = []\r\n this._trackLayer.off('update', this._trackLayerUpdate, this)\r\n this._map.off('mousemove', this._onmousemoveEvt, this)\r\n if (this._map.hasLayer(this._trackLayer)) {\r\n this._map.removeLayer(this._trackLayer)\r\n }\r\n if (this._map.hasLayer(this._trackPointFeatureGroup)) {\r\n this._map.removeLayer(this._trackPointFeatureGroup)\r\n }\r\n },\r\n\r\n clear: function () {\r\n this._clearLayer()\r\n this._bufferTracks = []\r\n },\r\n\r\n _trackLayerUpdate: function () {\r\n if (this._bufferTracks.length) {\r\n this._clearLayer()\r\n this._bufferTracks.forEach(function (element, index) {\r\n this._drawTrack(element)\r\n }.bind(this))\r\n }\r\n },\r\n\r\n _onmousemoveEvt: function (e) {\r\n if (!this._showTrackPoint) {\r\n return\r\n }\r\n let point = e.layerPoint\r\n if (this._bufferTracks.length) {\r\n for (let i = 0, leni = this._bufferTracks.length; i < leni; i++) {\r\n for (let j = 0, len = this._bufferTracks[i].length; j < len; j++) {\r\n let tpoint = this._getLayerPoint(this._bufferTracks[i][j])\r\n if (point.distanceTo(tpoint) <= this.trackPointOptions.radius) {\r\n this._opentoolTip(this._bufferTracks[i][j])\r\n return\r\n }\r\n }\r\n }\r\n }\r\n if (this._map.hasLayer(this._tooltip)) {\r\n this._map.removeLayer(this._tooltip)\r\n }\r\n this._canvas.style.cursor = 'pointer'\r\n },\r\n\r\n _opentoolTip: function (trackpoint) {\r\n if (this._map.hasLayer(this._tooltip)) {\r\n this._map.removeLayer(this._tooltip)\r\n }\r\n this._canvas.style.cursor = 'default'\r\n let latlng = L.latLng(trackpoint.lat, trackpoint.lng)\r\n let tooltip = this._tooltip = L.tooltip(this.toolTipOptions)\r\n tooltip.setLatLng(latlng)\r\n tooltip.addTo(this._map)\r\n tooltip.setContent(this._getTooltipText(trackpoint))\r\n },\r\n\r\n _drawTrack: function (trackpoints) {\r\n // 画轨迹线\r\n if (this._showTrackLine) {\r\n this._drawTrackLine(trackpoints)\r\n }\r\n // 画船\r\n let targetPoint = trackpoints[trackpoints.length - 1]\r\n if (this.targetOptions.useImg && this._targetImg) {\r\n this._drawShipImage(targetPoint)\r\n } else {\r\n this._drawShipCanvas(targetPoint)\r\n }\r\n // 画标注信息\r\n if (this.targetOptions.showText) {\r\n this._drawtxt(`航向:${parseInt(targetPoint.dir)}度`, targetPoint)\r\n }\r\n // 画经过的轨迹点\r\n if (this._showTrackPoint) {\r\n if (this.trackPointOptions.useCanvas) {\r\n this._drawTrackPointsCanvas(trackpoints)\r\n } else {\r\n this._drawTrackPointsSvg(trackpoints)\r\n }\r\n }\r\n },\r\n\r\n _drawTrackLine: function (trackpoints) {\r\n let options = this.trackLineOptions\r\n let tp0 = this._getLayerPoint(trackpoints[0])\r\n this._ctx.save()\r\n this._ctx.beginPath()\r\n // 画轨迹线\r\n this._ctx.moveTo(tp0.x, tp0.y)\r\n for (let i = 1, len = trackpoints.length; i < len; i++) {\r\n let tpi = this._getLayerPoint(trackpoints[i])\r\n this._ctx.lineTo(tpi.x, tpi.y)\r\n }\r\n this._ctx.globalAlpha = options.opacity\r\n if (options.stroke) {\r\n this._ctx.strokeStyle = options.color\r\n this._ctx.lineWidth = options.weight\r\n this._ctx.stroke()\r\n }\r\n if (options.fill) {\r\n this._ctx.fillStyle = options.fillColor\r\n this._ctx.fill()\r\n }\r\n this._ctx.restore()\r\n },\r\n\r\n _drawTrackPointsCanvas: function (trackpoints) {\r\n let options = this.trackPointOptions\r\n this._ctx.save()\r\n for (let i = 0, len = trackpoints.length; i < len; i++) {\r\n if (trackpoints[i].isOrigin) {\r\n let latLng = L.latLng(trackpoints[i].lat, trackpoints[i].lng)\r\n let radius = options.radius\r\n let point = this._map.latLngToLayerPoint(latLng)\r\n this._ctx.beginPath()\r\n this._ctx.arc(point.x, point.y, radius, 0, Math.PI * 2, false)\r\n this._ctx.globalAlpha = options.opacity\r\n if (options.stroke) {\r\n this._ctx.strokeStyle = options.color\r\n this._ctx.stroke()\r\n }\r\n if (options.fill) {\r\n this._ctx.fillStyle = options.fillColor\r\n this._ctx.fill()\r\n }\r\n }\r\n }\r\n this._ctx.restore()\r\n },\r\n\r\n _drawTrackPointsSvg: function (trackpoints) {\r\n for (let i = 0, len = trackpoints.length; i < len; i++) {\r\n if (trackpoints[i].isOrigin) {\r\n let latLng = L.latLng(trackpoints[i].lat, trackpoints[i].lng)\r\n let cricleMarker = L.circleMarker(latLng, this.trackPointOptions)\r\n cricleMarker.bindTooltip(this._getTooltipText(trackpoints[i]), this.toolTipOptions)\r\n this._trackPointFeatureGroup.addLayer(cricleMarker)\r\n }\r\n }\r\n },\r\n\r\n _drawtxt: function (text, trackpoint) {\r\n let point = this._getLayerPoint(trackpoint)\r\n this._ctx.save()\r\n this._ctx.font = '12px Verdana'\r\n this._ctx.fillStyle = '#000'\r\n this._ctx.textAlign = 'center'\r\n this._ctx.textBaseline = 'bottom'\r\n this._ctx.fillText(text, point.x, point.y - 12, 200)\r\n this._ctx.restore()\r\n },\r\n\r\n _drawShipCanvas: function (trackpoint) {\r\n let point = this._getLayerPoint(trackpoint)\r\n let rotate = trackpoint.dir || 0\r\n let w = this.targetOptions.width\r\n let h = this.targetOptions.height\r\n let dh = h / 3\r\n\r\n this._ctx.save()\r\n this._ctx.fillStyle = this.targetOptions.fillColor\r\n this._ctx.strokeStyle = this.targetOptions.color\r\n this._ctx.translate(point.x, point.y)\r\n this._ctx.rotate((Math.PI / 180) * rotate)\r\n this._ctx.beginPath()\r\n this._ctx.moveTo(0, 0 - h / 2)\r\n this._ctx.lineTo(0 - w / 2, 0 - h / 2 + dh)\r\n this._ctx.lineTo(0 - w / 2, 0 + h / 2)\r\n this._ctx.lineTo(0 + w / 2, 0 + h / 2)\r\n this._ctx.lineTo(0 + w / 2, 0 - h / 2 + dh)\r\n this._ctx.closePath()\r\n this._ctx.fill()\r\n this._ctx.stroke()\r\n this._ctx.restore()\r\n },\r\n\r\n _drawShipImage: function (trackpoint) {\r\n let point = this._getLayerPoint(trackpoint)\r\n let dir = trackpoint.dir || 0\r\n let width = this.targetOptions.width\r\n let height = this.targetOptions.height\r\n let offset = {\r\n x: width / 2,\r\n y: height / 2\r\n }\r\n this._ctx.save()\r\n this._ctx.translate(point.x, point.y)\r\n this._ctx.rotate((Math.PI / 180) * dir)\r\n this._ctx.drawImage(this._targetImg, 0 - offset.x, 0 - offset.y, width, height)\r\n this._ctx.restore()\r\n },\r\n\r\n _getTooltipText: function (targetobj) {\r\n let content = []\r\n content.push('<table>')\r\n if (targetobj.info && targetobj.info.length) {\r\n for (let i = 0, len = targetobj.info.length; i < len; i++) {\r\n content.push('<tr>')\r\n content.push('<td>' + targetobj.info[i].key + '</td>')\r\n content.push('<td>' + targetobj.info[i].value + '</td>')\r\n content.push('</tr>')\r\n }\r\n }\r\n content.push('</table>')\r\n content = content.join('')\r\n return content\r\n },\r\n\r\n _clearLayer: function () {\r\n let bounds = this._trackLayer.getBounds()\r\n if (bounds) {\r\n let size = bounds.getSize()\r\n this._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y)\r\n } else {\r\n this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height)\r\n }\r\n if (this._map.hasLayer(this._trackPointFeatureGroup)) {\r\n this._trackPointFeatureGroup.clearLayers()\r\n }\r\n },\r\n\r\n _getLayerPoint (trackpoint) {\r\n return this._map.latLngToLayerPoint(L.latLng(trackpoint.lat, trackpoint.lng))\r\n }\r\n})\r\n\r\nexport const draw = function (map, options) {\r\n return new Draw(map, options)\r\n}\r\n","import L from 'leaflet'\r\n\r\nimport {\r\n Track\r\n} from './track'\r\nimport {\r\n TrackController\r\n} from './trackcontroller'\r\nimport {\r\n Clock\r\n} from './clock'\r\nimport {\r\n Draw\r\n} from './draw'\r\nimport * as Util from './util'\r\n\r\n/**\r\n * single track data\r\n * [{lat: 30, lng: 116, time: 1502529980, heading: 300, info:[]},{},....]\r\n *\r\n * mutiple track data\r\n * [single track data, single track data, single track data]\r\n */\r\nexport const TrackPlayBack = L.Class.extend({\r\n\r\n includes: L.Mixin.Events,\r\n\r\n initialize: function (data, map, options = {}) {\r\n let drawOptions = {\r\n trackPointOptions: options.trackPointOptions,\r\n trackLineOptions: options.trackLineOptions,\r\n targetOptions: options.targetOptions,\r\n toolTipOptions: options.toolTipOptions\r\n }\r\n this.tracks = this._initTracks(data)\r\n this.draw = new Draw(map, drawOptions)\r\n this.trackController = new TrackController(this.tracks, this.draw)\r\n this.clock = new Clock(this.trackController, options.clockOptions)\r\n\r\n this.clock.on('tick', this._tick, this)\r\n },\r\n start: function () {\r\n this.clock.start()\r\n return this\r\n },\r\n stop: function () {\r\n this.clock.stop()\r\n return this\r\n },\r\n rePlaying: function () {\r\n this.clock.rePlaying()\r\n return this\r\n },\r\n slowSpeed: function () {\r\n this.clock.slowSpeed()\r\n return this\r\n },\r\n quickSpeed: function () {\r\n this.clock.quickSpeed()\r\n return this\r\n },\r\n getSpeed: function () {\r\n return this.clock.getSpeed()\r\n },\r\n getCurTime: function () {\r\n return this.clock.getCurTime()\r\n },\r\n getStartTime: function () {\r\n return this.clock.getStartTime()\r\n },\r\n getEndTime: function () {\r\n return this.clock.getEndTime()\r\n },\r\n isPlaying: function () {\r\n return this.clock.isPlaying()\r\n },\r\n setCursor: function (time) {\r\n this.clock.setCursor(time)\r\n return this\r\n },\r\n setSpeed: function (speed) {\r\n this.clock.setSpeed(speed)\r\n return this\r\n },\r\n showTrackPoint: function () {\r\n this.draw.showTrackPoint()\r\n return this\r\n },\r\n hideTrackPoint: function () {\r\n this.draw.hideTrackPoint()\r\n return this\r\n },\r\n showTrackLine: function () {\r\n this.draw.showTrackLine()\r\n return this\r\n },\r\n hideTrackLine: function () {\r\n this.draw.hideTrackLine()\r\n return this\r\n },\r\n dispose: function () {\r\n this.clock.off('tick', this._tick)\r\n this.draw.remove()\r\n this.tracks = null\r\n this.draw = null\r\n this.trackController = null\r\n this.clock = null\r\n },\r\n _tick: function (e) {\r\n this.fire('tick', e)\r\n },\r\n _initTracks: function (data) {\r\n let tracks = []\r\n if (Util.isArray(data)) {\r\n if (Util.isArray(data[0])) {\r\n // 多条轨迹\r\n for (let i = 0, len = data.length; i < len; i++) {\r\n tracks.push(new Track(data[i]))\r\n }\r\n } else {\r\n // 单条轨迹\r\n tracks.push(new Track(data))\r\n }\r\n }\r\n return tracks\r\n }\r\n})\r\n\r\nexport const trackplayback = function (data, map, options) {\r\n return new TrackPlayBack(data, map, options)\r\n}\r\n","import L from 'leaflet'\r\n\r\nimport {\r\n TrackPlayBack,\r\n trackplayback\r\n} from './trackplayback'\r\n\r\nL.TrackPlayBack = TrackPlayBack\r\nL.trackplayback = trackplayback\r\n"],"sourceRoot":""}
examples/.DS_Store ADDED
Binary file (6.15 kB). View file
 
examples/1.html ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-cn">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+ <title>leaflet.trackplayback</title>
9
+ <link rel="stylesheet" href="./lib/leaflet/leaflet.css">
10
+ <link rel="stylesheet" href="../dist/control.playback.css">
11
+ <script src="./lib/leaflet/leaflet.js"></script>
12
+ <script src="../dist/control.trackplayback.js"></script>
13
+ <script src="../dist/leaflet.trackplayback.js"></script>
14
+ </head>
15
+
16
+ <body>
17
+ <a href="https://github.com/linghuam/Leaflet.TrackPlayBack"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png" alt="Fork me on GitHub"></a>
18
+ <div id='mapid' style=" position: absolute; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; overflow: hidden;"></div>
19
+ <script>
20
+ const xhr = new XMLHttpRequest();
21
+ xhr.open('GET', './data/test.json', false);
22
+ xhr.send(null);
23
+ const data = JSON.parse(xhr.responseText);
24
+ const map = L.map('mapid').setView([33.74, 134.38], 6);
25
+ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
26
+ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
27
+ }).addTo(map);
28
+
29
+ const trackplayback = L.trackplayback(data, map, {
30
+ targetOptions: {
31
+ useImg: true,
32
+ imgUrl: './ship.png'
33
+ }
34
+ });
35
+ const trackplaybackControl = L.trackplaybackcontrol(trackplayback);
36
+ trackplaybackControl.addTo(map);
37
+
38
+ </script>
39
+ </body>
40
+
41
+ </html>
examples/data/test.json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (1).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (2).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (3).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (4).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (5).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (6).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non (7).json ADDED
The diff for this file is too large to render. See raw diff
 
examples/data/test_gps_non.json ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/echarts.min.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/images/layers-2x.png ADDED
examples/lib/leaflet/images/layers.png ADDED
examples/lib/leaflet/images/marker-icon-2x.png ADDED
examples/lib/leaflet/images/marker-icon.png ADDED
examples/lib/leaflet/images/marker-shadow.png ADDED
examples/lib/leaflet/leaflet-src.esm.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/leaflet-src.esm.js.map ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/leaflet-src.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/leaflet-src.js.map ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/leaflet.css ADDED
@@ -0,0 +1,635 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* required styles */
2
+
3
+ .leaflet-pane,
4
+ .leaflet-tile,
5
+ .leaflet-marker-icon,
6
+ .leaflet-marker-shadow,
7
+ .leaflet-tile-container,
8
+ .leaflet-pane > svg,
9
+ .leaflet-pane > canvas,
10
+ .leaflet-zoom-box,
11
+ .leaflet-image-layer,
12
+ .leaflet-layer {
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ }
17
+ .leaflet-container {
18
+ overflow: hidden;
19
+ }
20
+ .leaflet-tile,
21
+ .leaflet-marker-icon,
22
+ .leaflet-marker-shadow {
23
+ -webkit-user-select: none;
24
+ -moz-user-select: none;
25
+ user-select: none;
26
+ -webkit-user-drag: none;
27
+ }
28
+ /* Safari renders non-retina tile on retina better with this, but Chrome is worse */
29
+ .leaflet-safari .leaflet-tile {
30
+ image-rendering: -webkit-optimize-contrast;
31
+ }
32
+ /* hack that prevents hw layers "stretching" when loading new tiles */
33
+ .leaflet-safari .leaflet-tile-container {
34
+ width: 1600px;
35
+ height: 1600px;
36
+ -webkit-transform-origin: 0 0;
37
+ }
38
+ .leaflet-marker-icon,
39
+ .leaflet-marker-shadow {
40
+ display: block;
41
+ }
42
+ /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
43
+ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
44
+ .leaflet-container .leaflet-overlay-pane svg,
45
+ .leaflet-container .leaflet-marker-pane img,
46
+ .leaflet-container .leaflet-shadow-pane img,
47
+ .leaflet-container .leaflet-tile-pane img,
48
+ .leaflet-container img.leaflet-image-layer,
49
+ .leaflet-container .leaflet-tile {
50
+ max-width: none !important;
51
+ max-height: none !important;
52
+ }
53
+
54
+ .leaflet-container.leaflet-touch-zoom {
55
+ -ms-touch-action: pan-x pan-y;
56
+ touch-action: pan-x pan-y;
57
+ }
58
+ .leaflet-container.leaflet-touch-drag {
59
+ -ms-touch-action: pinch-zoom;
60
+ /* Fallback for FF which doesn't support pinch-zoom */
61
+ touch-action: none;
62
+ touch-action: pinch-zoom;
63
+ }
64
+ .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
65
+ -ms-touch-action: none;
66
+ touch-action: none;
67
+ }
68
+ .leaflet-container {
69
+ -webkit-tap-highlight-color: transparent;
70
+ }
71
+ .leaflet-container a {
72
+ -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
73
+ }
74
+ .leaflet-tile {
75
+ filter: inherit;
76
+ visibility: hidden;
77
+ }
78
+ .leaflet-tile-loaded {
79
+ visibility: inherit;
80
+ }
81
+ .leaflet-zoom-box {
82
+ width: 0;
83
+ height: 0;
84
+ -moz-box-sizing: border-box;
85
+ box-sizing: border-box;
86
+ z-index: 800;
87
+ }
88
+ /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
89
+ .leaflet-overlay-pane svg {
90
+ -moz-user-select: none;
91
+ }
92
+
93
+ .leaflet-pane { z-index: 400; }
94
+
95
+ .leaflet-tile-pane { z-index: 200; }
96
+ .leaflet-overlay-pane { z-index: 400; }
97
+ .leaflet-shadow-pane { z-index: 500; }
98
+ .leaflet-marker-pane { z-index: 600; }
99
+ .leaflet-tooltip-pane { z-index: 650; }
100
+ .leaflet-popup-pane { z-index: 700; }
101
+
102
+ .leaflet-map-pane canvas { z-index: 100; }
103
+ .leaflet-map-pane svg { z-index: 200; }
104
+
105
+ .leaflet-vml-shape {
106
+ width: 1px;
107
+ height: 1px;
108
+ }
109
+ .lvml {
110
+ behavior: url(#default#VML);
111
+ display: inline-block;
112
+ position: absolute;
113
+ }
114
+
115
+
116
+ /* control positioning */
117
+
118
+ .leaflet-control {
119
+ position: relative;
120
+ z-index: 800;
121
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
122
+ pointer-events: auto;
123
+ }
124
+ .leaflet-top,
125
+ .leaflet-bottom {
126
+ position: absolute;
127
+ z-index: 1000;
128
+ pointer-events: none;
129
+ }
130
+ .leaflet-top {
131
+ top: 0;
132
+ }
133
+ .leaflet-right {
134
+ right: 0;
135
+ }
136
+ .leaflet-bottom {
137
+ bottom: 0;
138
+ }
139
+ .leaflet-left {
140
+ left: 0;
141
+ }
142
+ .leaflet-control {
143
+ float: left;
144
+ clear: both;
145
+ }
146
+ .leaflet-right .leaflet-control {
147
+ float: right;
148
+ }
149
+ .leaflet-top .leaflet-control {
150
+ margin-top: 10px;
151
+ }
152
+ .leaflet-bottom .leaflet-control {
153
+ margin-bottom: 10px;
154
+ }
155
+ .leaflet-left .leaflet-control {
156
+ margin-left: 10px;
157
+ }
158
+ .leaflet-right .leaflet-control {
159
+ margin-right: 10px;
160
+ }
161
+
162
+
163
+ /* zoom and fade animations */
164
+
165
+ .leaflet-fade-anim .leaflet-tile {
166
+ will-change: opacity;
167
+ }
168
+ .leaflet-fade-anim .leaflet-popup {
169
+ opacity: 0;
170
+ -webkit-transition: opacity 0.2s linear;
171
+ -moz-transition: opacity 0.2s linear;
172
+ transition: opacity 0.2s linear;
173
+ }
174
+ .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
175
+ opacity: 1;
176
+ }
177
+ .leaflet-zoom-animated {
178
+ -webkit-transform-origin: 0 0;
179
+ -ms-transform-origin: 0 0;
180
+ transform-origin: 0 0;
181
+ }
182
+ .leaflet-zoom-anim .leaflet-zoom-animated {
183
+ will-change: transform;
184
+ }
185
+ .leaflet-zoom-anim .leaflet-zoom-animated {
186
+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
187
+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
188
+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
189
+ }
190
+ .leaflet-zoom-anim .leaflet-tile,
191
+ .leaflet-pan-anim .leaflet-tile {
192
+ -webkit-transition: none;
193
+ -moz-transition: none;
194
+ transition: none;
195
+ }
196
+
197
+ .leaflet-zoom-anim .leaflet-zoom-hide {
198
+ visibility: hidden;
199
+ }
200
+
201
+
202
+ /* cursors */
203
+
204
+ .leaflet-interactive {
205
+ cursor: pointer;
206
+ }
207
+ .leaflet-grab {
208
+ cursor: -webkit-grab;
209
+ cursor: -moz-grab;
210
+ cursor: grab;
211
+ }
212
+ .leaflet-crosshair,
213
+ .leaflet-crosshair .leaflet-interactive {
214
+ cursor: crosshair;
215
+ }
216
+ .leaflet-popup-pane,
217
+ .leaflet-control {
218
+ cursor: auto;
219
+ }
220
+ .leaflet-dragging .leaflet-grab,
221
+ .leaflet-dragging .leaflet-grab .leaflet-interactive,
222
+ .leaflet-dragging .leaflet-marker-draggable {
223
+ cursor: move;
224
+ cursor: -webkit-grabbing;
225
+ cursor: -moz-grabbing;
226
+ cursor: grabbing;
227
+ }
228
+
229
+ /* marker & overlays interactivity */
230
+ .leaflet-marker-icon,
231
+ .leaflet-marker-shadow,
232
+ .leaflet-image-layer,
233
+ .leaflet-pane > svg path,
234
+ .leaflet-tile-container {
235
+ pointer-events: none;
236
+ }
237
+
238
+ .leaflet-marker-icon.leaflet-interactive,
239
+ .leaflet-image-layer.leaflet-interactive,
240
+ .leaflet-pane > svg path.leaflet-interactive {
241
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
242
+ pointer-events: auto;
243
+ }
244
+
245
+ /* visual tweaks */
246
+
247
+ .leaflet-container {
248
+ background: #ddd;
249
+ outline: 0;
250
+ }
251
+ .leaflet-container a {
252
+ color: #0078A8;
253
+ }
254
+ .leaflet-container a.leaflet-active {
255
+ outline: 2px solid orange;
256
+ }
257
+ .leaflet-zoom-box {
258
+ border: 2px dotted #38f;
259
+ background: rgba(255,255,255,0.5);
260
+ }
261
+
262
+
263
+ /* general typography */
264
+ .leaflet-container {
265
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
266
+ }
267
+
268
+
269
+ /* general toolbar styles */
270
+
271
+ .leaflet-bar {
272
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
273
+ border-radius: 4px;
274
+ }
275
+ .leaflet-bar a,
276
+ .leaflet-bar a:hover {
277
+ background-color: #fff;
278
+ border-bottom: 1px solid #ccc;
279
+ width: 26px;
280
+ height: 26px;
281
+ line-height: 26px;
282
+ display: block;
283
+ text-align: center;
284
+ text-decoration: none;
285
+ color: black;
286
+ }
287
+ .leaflet-bar a,
288
+ .leaflet-control-layers-toggle {
289
+ background-position: 50% 50%;
290
+ background-repeat: no-repeat;
291
+ display: block;
292
+ }
293
+ .leaflet-bar a:hover {
294
+ background-color: #f4f4f4;
295
+ }
296
+ .leaflet-bar a:first-child {
297
+ border-top-left-radius: 4px;
298
+ border-top-right-radius: 4px;
299
+ }
300
+ .leaflet-bar a:last-child {
301
+ border-bottom-left-radius: 4px;
302
+ border-bottom-right-radius: 4px;
303
+ border-bottom: none;
304
+ }
305
+ .leaflet-bar a.leaflet-disabled {
306
+ cursor: default;
307
+ background-color: #f4f4f4;
308
+ color: #bbb;
309
+ }
310
+
311
+ .leaflet-touch .leaflet-bar a {
312
+ width: 30px;
313
+ height: 30px;
314
+ line-height: 30px;
315
+ }
316
+ .leaflet-touch .leaflet-bar a:first-child {
317
+ border-top-left-radius: 2px;
318
+ border-top-right-radius: 2px;
319
+ }
320
+ .leaflet-touch .leaflet-bar a:last-child {
321
+ border-bottom-left-radius: 2px;
322
+ border-bottom-right-radius: 2px;
323
+ }
324
+
325
+ /* zoom control */
326
+
327
+ .leaflet-control-zoom-in,
328
+ .leaflet-control-zoom-out {
329
+ font: bold 18px 'Lucida Console', Monaco, monospace;
330
+ text-indent: 1px;
331
+ }
332
+
333
+ .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
334
+ font-size: 22px;
335
+ }
336
+
337
+
338
+ /* layers control */
339
+
340
+ .leaflet-control-layers {
341
+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
342
+ background: #fff;
343
+ border-radius: 5px;
344
+ }
345
+ .leaflet-control-layers-toggle {
346
+ background-image: url(images/layers.png);
347
+ width: 36px;
348
+ height: 36px;
349
+ }
350
+ .leaflet-retina .leaflet-control-layers-toggle {
351
+ background-image: url(images/layers-2x.png);
352
+ background-size: 26px 26px;
353
+ }
354
+ .leaflet-touch .leaflet-control-layers-toggle {
355
+ width: 44px;
356
+ height: 44px;
357
+ }
358
+ .leaflet-control-layers .leaflet-control-layers-list,
359
+ .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
360
+ display: none;
361
+ }
362
+ .leaflet-control-layers-expanded .leaflet-control-layers-list {
363
+ display: block;
364
+ position: relative;
365
+ }
366
+ .leaflet-control-layers-expanded {
367
+ padding: 6px 10px 6px 6px;
368
+ color: #333;
369
+ background: #fff;
370
+ }
371
+ .leaflet-control-layers-scrollbar {
372
+ overflow-y: scroll;
373
+ overflow-x: hidden;
374
+ padding-right: 5px;
375
+ }
376
+ .leaflet-control-layers-selector {
377
+ margin-top: 2px;
378
+ position: relative;
379
+ top: 1px;
380
+ }
381
+ .leaflet-control-layers label {
382
+ display: block;
383
+ }
384
+ .leaflet-control-layers-separator {
385
+ height: 0;
386
+ border-top: 1px solid #ddd;
387
+ margin: 5px -10px 5px -6px;
388
+ }
389
+
390
+ /* Default icon URLs */
391
+ .leaflet-default-icon-path {
392
+ background-image: url(images/marker-icon.png);
393
+ }
394
+
395
+
396
+ /* attribution and scale controls */
397
+
398
+ .leaflet-container .leaflet-control-attribution {
399
+ background: #fff;
400
+ background: rgba(255, 255, 255, 0.7);
401
+ margin: 0;
402
+ }
403
+ .leaflet-control-attribution,
404
+ .leaflet-control-scale-line {
405
+ padding: 0 5px;
406
+ color: #333;
407
+ }
408
+ .leaflet-control-attribution a {
409
+ text-decoration: none;
410
+ }
411
+ .leaflet-control-attribution a:hover {
412
+ text-decoration: underline;
413
+ }
414
+ .leaflet-container .leaflet-control-attribution,
415
+ .leaflet-container .leaflet-control-scale {
416
+ font-size: 11px;
417
+ }
418
+ .leaflet-left .leaflet-control-scale {
419
+ margin-left: 5px;
420
+ }
421
+ .leaflet-bottom .leaflet-control-scale {
422
+ margin-bottom: 5px;
423
+ }
424
+ .leaflet-control-scale-line {
425
+ border: 2px solid #777;
426
+ border-top: none;
427
+ line-height: 1.1;
428
+ padding: 2px 5px 1px;
429
+ font-size: 11px;
430
+ white-space: nowrap;
431
+ overflow: hidden;
432
+ -moz-box-sizing: border-box;
433
+ box-sizing: border-box;
434
+
435
+ background: #fff;
436
+ background: rgba(255, 255, 255, 0.5);
437
+ }
438
+ .leaflet-control-scale-line:not(:first-child) {
439
+ border-top: 2px solid #777;
440
+ border-bottom: none;
441
+ margin-top: -2px;
442
+ }
443
+ .leaflet-control-scale-line:not(:first-child):not(:last-child) {
444
+ border-bottom: 2px solid #777;
445
+ }
446
+
447
+ .leaflet-touch .leaflet-control-attribution,
448
+ .leaflet-touch .leaflet-control-layers,
449
+ .leaflet-touch .leaflet-bar {
450
+ box-shadow: none;
451
+ }
452
+ .leaflet-touch .leaflet-control-layers,
453
+ .leaflet-touch .leaflet-bar {
454
+ border: 2px solid rgba(0,0,0,0.2);
455
+ background-clip: padding-box;
456
+ }
457
+
458
+
459
+ /* popup */
460
+
461
+ .leaflet-popup {
462
+ position: absolute;
463
+ text-align: center;
464
+ margin-bottom: 20px;
465
+ }
466
+ .leaflet-popup-content-wrapper {
467
+ padding: 1px;
468
+ text-align: left;
469
+ border-radius: 12px;
470
+ }
471
+ .leaflet-popup-content {
472
+ margin: 13px 19px;
473
+ line-height: 1.4;
474
+ }
475
+ .leaflet-popup-content p {
476
+ margin: 18px 0;
477
+ }
478
+ .leaflet-popup-tip-container {
479
+ width: 40px;
480
+ height: 20px;
481
+ position: absolute;
482
+ left: 50%;
483
+ margin-left: -20px;
484
+ overflow: hidden;
485
+ pointer-events: none;
486
+ }
487
+ .leaflet-popup-tip {
488
+ width: 17px;
489
+ height: 17px;
490
+ padding: 1px;
491
+
492
+ margin: -10px auto 0;
493
+
494
+ -webkit-transform: rotate(45deg);
495
+ -moz-transform: rotate(45deg);
496
+ -ms-transform: rotate(45deg);
497
+ transform: rotate(45deg);
498
+ }
499
+ .leaflet-popup-content-wrapper,
500
+ .leaflet-popup-tip {
501
+ background: white;
502
+ color: #333;
503
+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
504
+ }
505
+ .leaflet-container a.leaflet-popup-close-button {
506
+ position: absolute;
507
+ top: 0;
508
+ right: 0;
509
+ padding: 4px 4px 0 0;
510
+ border: none;
511
+ text-align: center;
512
+ width: 18px;
513
+ height: 14px;
514
+ font: 16px/14px Tahoma, Verdana, sans-serif;
515
+ color: #c3c3c3;
516
+ text-decoration: none;
517
+ font-weight: bold;
518
+ background: transparent;
519
+ }
520
+ .leaflet-container a.leaflet-popup-close-button:hover {
521
+ color: #999;
522
+ }
523
+ .leaflet-popup-scrolled {
524
+ overflow: auto;
525
+ border-bottom: 1px solid #ddd;
526
+ border-top: 1px solid #ddd;
527
+ }
528
+
529
+ .leaflet-oldie .leaflet-popup-content-wrapper {
530
+ zoom: 1;
531
+ }
532
+ .leaflet-oldie .leaflet-popup-tip {
533
+ width: 24px;
534
+ margin: 0 auto;
535
+
536
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
537
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
538
+ }
539
+ .leaflet-oldie .leaflet-popup-tip-container {
540
+ margin-top: -1px;
541
+ }
542
+
543
+ .leaflet-oldie .leaflet-control-zoom,
544
+ .leaflet-oldie .leaflet-control-layers,
545
+ .leaflet-oldie .leaflet-popup-content-wrapper,
546
+ .leaflet-oldie .leaflet-popup-tip {
547
+ border: 1px solid #999;
548
+ }
549
+
550
+
551
+ /* div icon */
552
+
553
+ .leaflet-div-icon {
554
+ background: #fff;
555
+ border: 1px solid #666;
556
+ }
557
+
558
+
559
+ /* Tooltip */
560
+ /* Base styles for the element that has a tooltip */
561
+ .leaflet-tooltip {
562
+ position: absolute;
563
+ padding: 6px;
564
+ background-color: #fff;
565
+ border: 1px solid #fff;
566
+ border-radius: 3px;
567
+ color: #222;
568
+ white-space: nowrap;
569
+ -webkit-user-select: none;
570
+ -moz-user-select: none;
571
+ -ms-user-select: none;
572
+ user-select: none;
573
+ pointer-events: none;
574
+ box-shadow: 0 1px 3px rgba(0,0,0,0.4);
575
+ }
576
+ .leaflet-tooltip.leaflet-clickable {
577
+ cursor: pointer;
578
+ pointer-events: auto;
579
+ }
580
+ .leaflet-tooltip-top:before,
581
+ .leaflet-tooltip-bottom:before,
582
+ .leaflet-tooltip-left:before,
583
+ .leaflet-tooltip-right:before {
584
+ position: absolute;
585
+ pointer-events: none;
586
+ border: 6px solid transparent;
587
+ background: transparent;
588
+ content: "";
589
+ }
590
+
591
+ /* Directions */
592
+
593
+ .leaflet-tooltip-bottom {
594
+ margin-top: 6px;
595
+ }
596
+ .leaflet-tooltip-top {
597
+ margin-top: -6px;
598
+ }
599
+ .leaflet-tooltip-bottom:before,
600
+ .leaflet-tooltip-top:before {
601
+ left: 50%;
602
+ margin-left: -6px;
603
+ }
604
+ .leaflet-tooltip-top:before {
605
+ bottom: 0;
606
+ margin-bottom: -12px;
607
+ border-top-color: #fff;
608
+ }
609
+ .leaflet-tooltip-bottom:before {
610
+ top: 0;
611
+ margin-top: -12px;
612
+ margin-left: -6px;
613
+ border-bottom-color: #fff;
614
+ }
615
+ .leaflet-tooltip-left {
616
+ margin-left: -6px;
617
+ }
618
+ .leaflet-tooltip-right {
619
+ margin-left: 6px;
620
+ }
621
+ .leaflet-tooltip-left:before,
622
+ .leaflet-tooltip-right:before {
623
+ top: 50%;
624
+ margin-top: -6px;
625
+ }
626
+ .leaflet-tooltip-left:before {
627
+ right: 0;
628
+ margin-right: -12px;
629
+ border-left-color: #fff;
630
+ }
631
+ .leaflet-tooltip-right:before {
632
+ left: 0;
633
+ margin-left: -12px;
634
+ border-right-color: #fff;
635
+ }
examples/lib/leaflet/leaflet.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet/leaflet.js.map ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet0.7.7/images/layers-2x.png ADDED
examples/lib/leaflet0.7.7/images/layers.png ADDED
examples/lib/leaflet0.7.7/images/marker-icon-2x.png ADDED
examples/lib/leaflet0.7.7/images/marker-icon.png ADDED
examples/lib/leaflet0.7.7/images/marker-shadow.png ADDED
examples/lib/leaflet0.7.7/leaflet-src.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/lib/leaflet0.7.7/leaflet.css ADDED
@@ -0,0 +1,479 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* required styles */
2
+
3
+ .leaflet-map-pane,
4
+ .leaflet-tile,
5
+ .leaflet-marker-icon,
6
+ .leaflet-marker-shadow,
7
+ .leaflet-tile-pane,
8
+ .leaflet-tile-container,
9
+ .leaflet-overlay-pane,
10
+ .leaflet-shadow-pane,
11
+ .leaflet-marker-pane,
12
+ .leaflet-popup-pane,
13
+ .leaflet-overlay-pane svg,
14
+ .leaflet-zoom-box,
15
+ .leaflet-image-layer,
16
+ .leaflet-layer {
17
+ position: absolute;
18
+ left: 0;
19
+ top: 0;
20
+ }
21
+ .leaflet-container {
22
+ overflow: hidden;
23
+ -ms-touch-action: none;
24
+ touch-action: none;
25
+ }
26
+ .leaflet-tile,
27
+ .leaflet-marker-icon,
28
+ .leaflet-marker-shadow {
29
+ -webkit-user-select: none;
30
+ -moz-user-select: none;
31
+ user-select: none;
32
+ -webkit-user-drag: none;
33
+ }
34
+ .leaflet-marker-icon,
35
+ .leaflet-marker-shadow {
36
+ display: block;
37
+ }
38
+ /* map is broken in FF if you have max-width: 100% on tiles */
39
+ .leaflet-container img {
40
+ max-width: none !important;
41
+ }
42
+ /* stupid Android 2 doesn't understand "max-width: none" properly */
43
+ .leaflet-container img.leaflet-image-layer {
44
+ max-width: 15000px !important;
45
+ }
46
+ .leaflet-tile {
47
+ filter: inherit;
48
+ visibility: hidden;
49
+ }
50
+ .leaflet-tile-loaded {
51
+ visibility: inherit;
52
+ }
53
+ .leaflet-zoom-box {
54
+ width: 0;
55
+ height: 0;
56
+ }
57
+ /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
58
+ .leaflet-overlay-pane svg {
59
+ -moz-user-select: none;
60
+ }
61
+
62
+ .leaflet-tile-pane { z-index: 2; }
63
+ .leaflet-objects-pane { z-index: 3; }
64
+ .leaflet-overlay-pane { z-index: 4; }
65
+ .leaflet-shadow-pane { z-index: 5; }
66
+ .leaflet-marker-pane { z-index: 6; }
67
+ .leaflet-popup-pane { z-index: 7; }
68
+
69
+ .leaflet-vml-shape {
70
+ width: 1px;
71
+ height: 1px;
72
+ }
73
+ .lvml {
74
+ behavior: url(#default#VML);
75
+ display: inline-block;
76
+ position: absolute;
77
+ }
78
+
79
+
80
+ /* control positioning */
81
+
82
+ .leaflet-control {
83
+ position: relative;
84
+ z-index: 7;
85
+ pointer-events: auto;
86
+ }
87
+ .leaflet-top,
88
+ .leaflet-bottom {
89
+ position: absolute;
90
+ z-index: 1000;
91
+ pointer-events: none;
92
+ }
93
+ .leaflet-top {
94
+ top: 0;
95
+ }
96
+ .leaflet-right {
97
+ right: 0;
98
+ }
99
+ .leaflet-bottom {
100
+ bottom: 0;
101
+ }
102
+ .leaflet-left {
103
+ left: 0;
104
+ }
105
+ .leaflet-control {
106
+ float: left;
107
+ clear: both;
108
+ }
109
+ .leaflet-right .leaflet-control {
110
+ float: right;
111
+ }
112
+ .leaflet-top .leaflet-control {
113
+ margin-top: 10px;
114
+ }
115
+ .leaflet-bottom .leaflet-control {
116
+ margin-bottom: 10px;
117
+ }
118
+ .leaflet-left .leaflet-control {
119
+ margin-left: 10px;
120
+ }
121
+ .leaflet-right .leaflet-control {
122
+ margin-right: 10px;
123
+ }
124
+
125
+
126
+ /* zoom and fade animations */
127
+
128
+ .leaflet-fade-anim .leaflet-tile,
129
+ .leaflet-fade-anim .leaflet-popup {
130
+ opacity: 0;
131
+ -webkit-transition: opacity 0.2s linear;
132
+ -moz-transition: opacity 0.2s linear;
133
+ -o-transition: opacity 0.2s linear;
134
+ transition: opacity 0.2s linear;
135
+ }
136
+ .leaflet-fade-anim .leaflet-tile-loaded,
137
+ .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
138
+ opacity: 1;
139
+ }
140
+
141
+ .leaflet-zoom-anim .leaflet-zoom-animated {
142
+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
143
+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
144
+ -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
145
+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
146
+ }
147
+ .leaflet-zoom-anim .leaflet-tile,
148
+ .leaflet-pan-anim .leaflet-tile,
149
+ .leaflet-touching .leaflet-zoom-animated {
150
+ -webkit-transition: none;
151
+ -moz-transition: none;
152
+ -o-transition: none;
153
+ transition: none;
154
+ }
155
+
156
+ .leaflet-zoom-anim .leaflet-zoom-hide {
157
+ visibility: hidden;
158
+ }
159
+
160
+
161
+ /* cursors */
162
+
163
+ .leaflet-clickable {
164
+ cursor: pointer;
165
+ }
166
+ .leaflet-container {
167
+ cursor: -webkit-grab;
168
+ cursor: -moz-grab;
169
+ }
170
+ .leaflet-popup-pane,
171
+ .leaflet-control {
172
+ cursor: auto;
173
+ }
174
+ .leaflet-dragging .leaflet-container,
175
+ .leaflet-dragging .leaflet-clickable {
176
+ cursor: move;
177
+ cursor: -webkit-grabbing;
178
+ cursor: -moz-grabbing;
179
+ }
180
+
181
+
182
+ /* visual tweaks */
183
+
184
+ .leaflet-container {
185
+ background: #ddd;
186
+ outline: 0;
187
+ }
188
+ .leaflet-container a {
189
+ color: #0078A8;
190
+ }
191
+ .leaflet-container a.leaflet-active {
192
+ outline: 2px solid orange;
193
+ }
194
+ .leaflet-zoom-box {
195
+ border: 2px dotted #38f;
196
+ background: rgba(255,255,255,0.5);
197
+ }
198
+
199
+
200
+ /* general typography */
201
+ .leaflet-container {
202
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
203
+ }
204
+
205
+
206
+ /* general toolbar styles */
207
+
208
+ .leaflet-bar {
209
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
210
+ border-radius: 4px;
211
+ }
212
+ .leaflet-bar a,
213
+ .leaflet-bar a:hover {
214
+ background-color: #fff;
215
+ border-bottom: 1px solid #ccc;
216
+ width: 26px;
217
+ height: 26px;
218
+ line-height: 26px;
219
+ display: block;
220
+ text-align: center;
221
+ text-decoration: none;
222
+ color: black;
223
+ }
224
+ .leaflet-bar a,
225
+ .leaflet-control-layers-toggle {
226
+ background-position: 50% 50%;
227
+ background-repeat: no-repeat;
228
+ display: block;
229
+ }
230
+ .leaflet-bar a:hover {
231
+ background-color: #f4f4f4;
232
+ }
233
+ .leaflet-bar a:first-child {
234
+ border-top-left-radius: 4px;
235
+ border-top-right-radius: 4px;
236
+ }
237
+ .leaflet-bar a:last-child {
238
+ border-bottom-left-radius: 4px;
239
+ border-bottom-right-radius: 4px;
240
+ border-bottom: none;
241
+ }
242
+ .leaflet-bar a.leaflet-disabled {
243
+ cursor: default;
244
+ background-color: #f4f4f4;
245
+ color: #bbb;
246
+ }
247
+
248
+ .leaflet-touch .leaflet-bar a {
249
+ width: 30px;
250
+ height: 30px;
251
+ line-height: 30px;
252
+ }
253
+
254
+
255
+ /* zoom control */
256
+
257
+ .leaflet-control-zoom-in,
258
+ .leaflet-control-zoom-out {
259
+ font: bold 18px 'Lucida Console', Monaco, monospace;
260
+ text-indent: 1px;
261
+ }
262
+ .leaflet-control-zoom-out {
263
+ font-size: 20px;
264
+ }
265
+
266
+ .leaflet-touch .leaflet-control-zoom-in {
267
+ font-size: 22px;
268
+ }
269
+ .leaflet-touch .leaflet-control-zoom-out {
270
+ font-size: 24px;
271
+ }
272
+
273
+
274
+ /* layers control */
275
+
276
+ .leaflet-control-layers {
277
+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
278
+ background: #fff;
279
+ border-radius: 5px;
280
+ }
281
+ .leaflet-control-layers-toggle {
282
+ background-image: url(images/layers.png);
283
+ width: 36px;
284
+ height: 36px;
285
+ }
286
+ .leaflet-retina .leaflet-control-layers-toggle {
287
+ background-image: url(images/layers-2x.png);
288
+ background-size: 26px 26px;
289
+ }
290
+ .leaflet-touch .leaflet-control-layers-toggle {
291
+ width: 44px;
292
+ height: 44px;
293
+ }
294
+ .leaflet-control-layers .leaflet-control-layers-list,
295
+ .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
296
+ display: none;
297
+ }
298
+ .leaflet-control-layers-expanded .leaflet-control-layers-list {
299
+ display: block;
300
+ position: relative;
301
+ }
302
+ .leaflet-control-layers-expanded {
303
+ padding: 6px 10px 6px 6px;
304
+ color: #333;
305
+ background: #fff;
306
+ }
307
+ .leaflet-control-layers-selector {
308
+ margin-top: 2px;
309
+ position: relative;
310
+ top: 1px;
311
+ }
312
+ .leaflet-control-layers label {
313
+ display: block;
314
+ }
315
+ .leaflet-control-layers-separator {
316
+ height: 0;
317
+ border-top: 1px solid #ddd;
318
+ margin: 5px -10px 5px -6px;
319
+ }
320
+
321
+
322
+ /* attribution and scale controls */
323
+
324
+ .leaflet-container .leaflet-control-attribution {
325
+ background: #fff;
326
+ background: rgba(255, 255, 255, 0.7);
327
+ margin: 0;
328
+ }
329
+ .leaflet-control-attribution,
330
+ .leaflet-control-scale-line {
331
+ padding: 0 5px;
332
+ color: #333;
333
+ }
334
+ .leaflet-control-attribution a {
335
+ text-decoration: none;
336
+ }
337
+ .leaflet-control-attribution a:hover {
338
+ text-decoration: underline;
339
+ }
340
+ .leaflet-container .leaflet-control-attribution,
341
+ .leaflet-container .leaflet-control-scale {
342
+ font-size: 11px;
343
+ }
344
+ .leaflet-left .leaflet-control-scale {
345
+ margin-left: 5px;
346
+ }
347
+ .leaflet-bottom .leaflet-control-scale {
348
+ margin-bottom: 5px;
349
+ }
350
+ .leaflet-control-scale-line {
351
+ border: 2px solid #777;
352
+ border-top: none;
353
+ line-height: 1.1;
354
+ padding: 2px 5px 1px;
355
+ font-size: 11px;
356
+ white-space: nowrap;
357
+ overflow: hidden;
358
+ -moz-box-sizing: content-box;
359
+ box-sizing: content-box;
360
+
361
+ background: #fff;
362
+ background: rgba(255, 255, 255, 0.5);
363
+ }
364
+ .leaflet-control-scale-line:not(:first-child) {
365
+ border-top: 2px solid #777;
366
+ border-bottom: none;
367
+ margin-top: -2px;
368
+ }
369
+ .leaflet-control-scale-line:not(:first-child):not(:last-child) {
370
+ border-bottom: 2px solid #777;
371
+ }
372
+
373
+ .leaflet-touch .leaflet-control-attribution,
374
+ .leaflet-touch .leaflet-control-layers,
375
+ .leaflet-touch .leaflet-bar {
376
+ box-shadow: none;
377
+ }
378
+ .leaflet-touch .leaflet-control-layers,
379
+ .leaflet-touch .leaflet-bar {
380
+ border: 2px solid rgba(0,0,0,0.2);
381
+ background-clip: padding-box;
382
+ }
383
+
384
+
385
+ /* popup */
386
+
387
+ .leaflet-popup {
388
+ position: absolute;
389
+ text-align: center;
390
+ }
391
+ .leaflet-popup-content-wrapper {
392
+ padding: 1px;
393
+ text-align: left;
394
+ border-radius: 12px;
395
+ }
396
+ .leaflet-popup-content {
397
+ margin: 13px 19px;
398
+ line-height: 1.4;
399
+ }
400
+ .leaflet-popup-content p {
401
+ margin: 18px 0;
402
+ }
403
+ .leaflet-popup-tip-container {
404
+ margin: 0 auto;
405
+ width: 40px;
406
+ height: 20px;
407
+ position: relative;
408
+ overflow: hidden;
409
+ }
410
+ .leaflet-popup-tip {
411
+ width: 17px;
412
+ height: 17px;
413
+ padding: 1px;
414
+
415
+ margin: -10px auto 0;
416
+
417
+ -webkit-transform: rotate(45deg);
418
+ -moz-transform: rotate(45deg);
419
+ -ms-transform: rotate(45deg);
420
+ -o-transform: rotate(45deg);
421
+ transform: rotate(45deg);
422
+ }
423
+ .leaflet-popup-content-wrapper,
424
+ .leaflet-popup-tip {
425
+ background: white;
426
+
427
+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
428
+ }
429
+ .leaflet-container a.leaflet-popup-close-button {
430
+ position: absolute;
431
+ top: 0;
432
+ right: 0;
433
+ padding: 4px 4px 0 0;
434
+ text-align: center;
435
+ width: 18px;
436
+ height: 14px;
437
+ font: 16px/14px Tahoma, Verdana, sans-serif;
438
+ color: #c3c3c3;
439
+ text-decoration: none;
440
+ font-weight: bold;
441
+ background: transparent;
442
+ }
443
+ .leaflet-container a.leaflet-popup-close-button:hover {
444
+ color: #999;
445
+ }
446
+ .leaflet-popup-scrolled {
447
+ overflow: auto;
448
+ border-bottom: 1px solid #ddd;
449
+ border-top: 1px solid #ddd;
450
+ }
451
+
452
+ .leaflet-oldie .leaflet-popup-content-wrapper {
453
+ zoom: 1;
454
+ }
455
+ .leaflet-oldie .leaflet-popup-tip {
456
+ width: 24px;
457
+ margin: 0 auto;
458
+
459
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
460
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
461
+ }
462
+ .leaflet-oldie .leaflet-popup-tip-container {
463
+ margin-top: -1px;
464
+ }
465
+
466
+ .leaflet-oldie .leaflet-control-zoom,
467
+ .leaflet-oldie .leaflet-control-layers,
468
+ .leaflet-oldie .leaflet-popup-content-wrapper,
469
+ .leaflet-oldie .leaflet-popup-tip {
470
+ border: 1px solid #999;
471
+ }
472
+
473
+
474
+ /* div icon */
475
+
476
+ .leaflet-div-icon {
477
+ background: #fff;
478
+ border: 1px solid #666;
479
+ }
examples/lib/leaflet0.7.7/leaflet.js ADDED
The diff for this file is too large to render. See raw diff
 
examples/monitor.html ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
+ <title>Document</title>
8
+ <script src="./lib/echarts.min.js"></script>
9
+ </head>
10
+ <body>
11
+ <div id="echarts" style="height: 600px;"></div>
12
+ <script>
13
+ window.localStorage.
14
+ // 基于准备好的dom,初始化echarts实例
15
+ var myChart = echarts.init(document.getElementById('echarts'));
16
+
17
+ // 指定图表的配置项和数据
18
+ var option = {
19
+ title: {
20
+ text: '帧率变化监测'
21
+ },
22
+ tooltip: {},
23
+ xAxis: {
24
+ data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
25
+ },
26
+ yAxis: {},
27
+ series: [{
28
+ name: '销量',
29
+ type: 'bar',
30
+ data: [5, 20, 36, 10, 10, 20]
31
+ }]
32
+ };
33
+
34
+ // 使用刚指定的配置项和数据显示图表。
35
+ myChart.setOption(option);
36
+ </script>
37
+ </body>
38
+ </html>
examples/navigation-2.png ADDED
examples/navigation-3.png ADDED
examples/navigation.png ADDED
examples/playback.png ADDED
examples/ship.png ADDED
index.html CHANGED
@@ -1,19 +1,50 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-cn">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+ <title>leaflet.trackplayback</title>
9
+ <link rel="stylesheet" href="examples/lib/leaflet/leaflet.css">
10
+ <link rel="stylesheet" href="dist/control.playback.css">
11
+ <script src="examples/lib/leaflet/leaflet.js"></script>
12
+ <script src="dist/control.trackplayback.js"></script>
13
+ <script src="dist/leaflet.trackplayback.js"></script>
14
+ </head>
15
+
16
+ <body>
17
+ <a href="https://github.com/linghuam/Leaflet.TrackPlayBack"><img style="position: absolute; top: 0; left: 0; border: 0;z-index: 999;"
18
+ src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png" alt="Fork me on GitHub"></a>
19
+ <div id='mapid' style=" position: absolute; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; overflow: hidden;"></div>
20
+ <script>
21
+ // create map and add baseLayer
22
+ const map = L.map('mapid').setView([13.8786, 100.5270], 12);
23
+ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
24
+ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
25
+ }).addTo(map);
26
+
27
+ // get data from server
28
+ const xhr = new XMLHttpRequest();
29
+ xhr.open('GET', 'examples/data/test_gps_non (7).json', true);
30
+ xhr.onreadystatechange = xhrCallback;
31
+ xhr.send();
32
+
33
+ function xhrCallback() {
34
+ if (xhr.readyState === 4 && xhr.status === 200) {
35
+ const data = JSON.parse(xhr.responseText);
36
+ const trackplayback = L.trackplayback(data, map, {
37
+ targetOptions: {
38
+ useImg: true,
39
+ imgUrl: 'examples/navigation-3.png'
40
+ }
41
+ });
42
+ const trackplaybackControl = L.trackplaybackcontrol(trackplayback);
43
+ trackplaybackControl.addTo(map);
44
+ }
45
+ }
46
+
47
+ </script>
48
+ </body>
49
+
50
  </html>