From 0d7669f8bf28300362fc0dacd5c794ff823d0297 Mon Sep 17 00:00:00 2001 From: wangrui <zephyrs0894@163.com> Date: 星期一, 14 十二月 2020 15:11:17 +0800 Subject: [PATCH] 初版 --- src/assets/images/map-pages/icon/title_icon.png | 0 public/assets/images/map-pages/icon/BluePin1LargeB.png | 0 src/styles/theme-dark/el-ui/checkbox.less | 10 public/assets/css/map/magic.min.css | 1 public/assets/images/map-pages/icon/1.png | 0 src/assets/images/map-pages/icon/ship_alarm_ref.png | 0 src/assets/images/map-pages/icon/train_alarm_ref.png | 0 src/styles/theme-dark/el-ui/form.less | 85 public/assets/images/map-pages/cosmetics/horn_bl.png | 0 src/assets/images/map-pages/icon/GreenPin1LargeB.png | 0 src/styles/theme-dark/echarts/theme.json | 502 ++ src/assets/images/map-pages/icon/topDT.png | 0 src/assets/images/map-pages/icon/car_alarm_ref.png | 0 src/assets/images/map-pages/icon/4.png | 0 public/assets/images/map-pages/icon/setting.png | 0 src/styles/theme-dark/el-ui/cascader.less | 26 public/assets/images/map-pages/icon/topDT.png | 0 src/utils/GISUtil.js | 156 src/api/map.js | 33 public/assets/images/map-pages/icon/warning_other_video.png | 0 src/assets/images/map-pages/cosmetics/horn_tl.png | 0 src/assets/images/map-pages/icon/icon_ProductOil.png | 0 public/assets/images/map-pages/icon/end.png | 0 src/assets/images/map-pages/icon/map1/4.png | 0 src/assets/images/map-pages/icon/tab.png | 0 public/assets/images/map-pages/icon/train_online.png | 0 src/assets/images/map-pages/icon/txtbackground.png | 0 public/assets/images/map-pages/icon/warning_driver_video.png | 0 public/assets/images/map-pages/icon/icon_Refinery.png | 0 src/assets/images/map-pages/icon/warning_car_no.png | 0 public/assets/images/map-pages/icon/map1/5.png | 0 src/components/plugin/magicMarker.css | 13 public/assets/images/map-pages/icon/ship_alarm.png | 0 src/assets/images/map-pages/icon/lyg_yb.gif | 0 public/assets/.DS_Store | 0 src/styles/theme-dark/el-ui/pagination.less | 51 src/assets/images/map-pages/icon/tool.png | 0 public/assets/images/map-pages/icon/map1/9.png | 0 public/assets/images/map-pages/icon/RedPin1LargeB.png | 0 public/assets/images/map-pages/icon/icon_Chemical.png | 0 src/assets/images/map-pages/xljt1.png | 0 public/assets/images/map-pages/icon/ship_mousover_ref.png | 0 public/assets/images/map-pages/icon/icon_cam.png | 0 src/api/index.js | 4 src/components/plugin/cluster-layer/leaflet.markercluster.js.map | 1 src/styles/theme-dark/el-ui/card.less | 4 src/styles/theme-dark/el-ui/radio.less | 8 public/index.html | 17 src/assets/images/map-pages/icon/title_icon3.png | 0 src/components/helpers/LayerHelper.js | 10 public/assets/images/map-pages/icon/car_online.png | 0 src/components/plugin/CanvasMarkers.js | 386 + src/assets/images/map-pages/icon/bgc2.png | 0 public/assets/images/map-pages/icon/xljt2.png | 0 babel.config.js | 5 src/assets/images/map-pages/icon/warning_allYs.png | 0 public/assets/images/map-pages/icon/4.png | 0 src/assets/images/map-pages/icon/map1/8.png | 0 src/assets/images/map-pages/icon/TrainStation.png | 0 src/assets/images/map-pages/icon/train_online.png | 0 public/assets/images/map-pages/icon/ship_offline_ref.png | 0 src/assets/images/map-pages/icon/ship_offline.png | 0 public/assets/images/map-pages/icon/map1/占位.txt | 0 src/assets/images/map-pages/icon/1.png | 0 src/assets/images/map-pages/icon/icon_Refinery.png | 0 src/assets/images/map-pages/icon/map1/占位.txt | 0 public/assets/images/map-pages/icon/car_mousover_ref.png | 0 src/styles/theme-dark/el-ui/eChartBtn.less | 39 src/assets/images/map-pages/icon/BluePin1LargeB.png | 0 src/assets/images/map-pages/icon/car_offline.png | 0 src/assets/images/map-pages/icon/warning_other_img.png | 0 src/styles/theme-dark/variable.less | 92 public/assets/images/map-pages/icon/train_online_ref.png | 0 src/assets/images/map-pages/icon/caidan.png | 0 src/assets/images/map-pages/icon/car_mousover.png | 0 public/assets/images/map-pages/icon/sl.png | 0 src/assets/images/map-pages/icon/warning_car_img.png | 0 src/assets/images/map-pages/icon/sl.png | 0 src/assets/images/map-pages/icon/map1/1.png | 0 src/assets/images/map-pages/icon/ycan.png | 0 public/assets/images/map-pages/icon/car_alarm_ref.png | 0 public/assets/images/map-pages/icon/yd.png | 0 src/components/helpers/VectorLayerHelper.js | 69 .DS_Store | 0 public/assets/images/map-pages/icon/icon_people.png | 0 public/assets/images/map-pages/icon/map1/6.png | 0 src/assets/images/map-pages/icon/warning_other_video.png | 0 src/styles/theme-dark/el-ui/tree.less | 105 src/assets/images/map-pages/icon/yd.png | 0 public/assets/images/map-pages/.DS_Store | 0 public/assets/images/map-pages/icon/map1/2.png | 0 src/assets/images/map-pages/icon/car_mousover_ref.png | 0 src/components/mapmodules/SafetyIndexLine.js | 107 public/assets/images/map-pages/icon/horn.png | 0 src/styles/theme-dark/el-ui/table.less | 56 src/assets/images/map-pages/icon/map1/5.png | 0 src/components/LayerController/BaseMapController.vue | 103 src/components/plugin/cluster-layer/leaflet.markercluster.js | 3 src/assets/images/map-pages/icon/5.png | 0 src/components/utils/GISUtil.js | 156 src/styles/theme-dark/el-ui/select.less | 29 src/styles/theme-dark/el-ui/index.less | 30 src/assets/images/map-pages/icon/.DS_Store | 0 src/assets/images/map-pages/icon/train_mousover.png | 0 src/styles/theme-dark/el-ui/loading.less | 3 public/assets/images/map-pages/icon/lyg_yb.gif | 0 public/assets/images/map-pages/icon/zkjt.png | 0 src/assets/images/map-pages/icon/icon_StoreHouse.png | 0 src/styles/theme-blue/el-ui/dialog.less | 16 public/assets/images/map-pages/icon/TrainStation.png | 0 src/styles/theme-dark/el-ui/tabs.less | 287 + src/styles/theme-blue/variable.less | 23 public/assets/images/map-pages/icon/ship_mousover.png | 0 src/assets/images/map-pages/icon/ship_online.png | 0 src/utils/MixinAuthority.js | 83 src/assets/images/map-pages/icon/ship_mousover_ref.png | 0 src/components/utils/JsonUtils.js | 48 .gitignore | 2 public/assets/images/map-pages/icon/5.png | 0 src/components/plugin/MagicMarker.js | 49 public/assets/images/map-pages/icon/.DS_Store | 0 src/assets/images/map-pages/icon/ship_alarm.png | 0 public/assets/images/map-pages/icon/warning_driver_img.png | 0 src/assets/images/map-pages/icon/train_online_ref.png | 0 src/assets/images/map-pages/icon/ship_mousover.png | 0 src/assets/images/map-pages/icon/train_mousover_ref.png | 0 public/assets/images/map-pages/icon/icon_Dock.png | 0 src/conf/MODE.js | 10 public/assets/images/map-pages/icon/warning_yzYs.png | 0 src/assets/images/map-pages/cosmetics/horn_bl.png | 0 src/assets/images/map-pages/icon/car_offline_ref.png | 0 src/assets/images/map-pages/icon/icon_Petrochemical.png | 0 src/styles/theme-dark/el-ui/select-dropdown.less | 25 src/assets/images/map-pages/icon/icon_FillingStation.png | 0 src/assets/images/map-pages/icon/ship_online_ref.png | 0 src/assets/images/map-pages/icon/train_offline_ref.png | 0 src/utils/wfsQueryUtils.js | 56 src/assets/images/map-pages/icon/map1/0.png | 0 public/assets/images/map-pages/icon/car_offline.png | 0 src/components/utils/wfsQueryUtils.js | 56 src/styles/theme-blue/el-ui/table.less | 13 public/assets/images/map-pages/icon/icon.png | 0 src/assets/images/map-pages/icon/icon_Sales.png | 0 src/assets/images/map-pages/icon/map1/9.png | 0 src/views/MapTemplate.vue | 54 src/styles/theme-blue/el-ui/input.less | 7 public/assets/images/map-pages/icon/map1/1.png | 0 src/styles/theme-dark/el-ui/input.less | 94 public/assets/images/map-pages/icon/warning_other_img.png | 0 public/assets/images/map-pages/icon/caidan.png | 0 public/assets/images/map-pages/icon/warning_yzNo.png | 0 src/conf/MapConfig.js | 241 + package.json | 65 public/assets/images/map-pages/icon/car_alarm.png | 0 public/assets/images/map-pages/setting.png | 0 src/assets/images/map-pages/.DS_Store | 0 src/styles/theme-dark/el-ui/button.less | 62 src/assets/css/map/magic.min.css | 1 src/components/helpers/BasemapHelper.js | 59 public/assets/images/map-pages/icon/bgc2.png | 0 src/App.vue | 25 src/assets/images/map-pages/setting.png | 0 src/assets/images/map-pages/icon/ship_right.png | 0 public/assets/images/map-pages/icon.png | 0 public/assets/images/map-pages/icon/warning_car_video.png | 0 src/assets/images/map-pages/icon/map1/2.png | 0 vue.config.js | 39 src/assets/images/map-pages/icon/car_alarm.png | 0 src/components/plugin/PathDashFlow.js | 43 public/assets/images/map-pages/icon/bgc.png | 0 src/assets/images/map-pages/icon/2.png | 0 src/assets/images/map-pages/icon.png | 0 src/assets/images/map-pages/icon/warning_other_no.png | 0 public/assets/images/map-pages/icon/train_alarm_ref.png | 0 src/styles/theme-dark/el-ui/dialog.less | 28 src/assets/images/map-pages/icon/icon_people.png | 0 public/assets/images/map-pages/icon/map1/3.png | 0 public/assets/images/map-pages/icon/title_icon3.png | 0 src/assets/images/map-pages/icon/ship_offline_ref.png | 0 public/assets/images/map-pages/icon/cl.png | 0 public/assets/images/map-pages/icon/car_mousover.png | 0 src/assets/images/map-pages/icon/cl.png | 0 src/assets/images/map-pages/icon/yl.png | 0 public/assets/images/map-pages/icon/GreenPin1LargeB.png | 0 public/assets/images/map-pages/icon/train_mousover_ref.png | 0 public/assets/images/map-pages/icon/icon_ProductOil.png | 0 public/assets/images/map-pages/icon/warning_allYs.png | 0 src/assets/images/map-pages/icon/train_alarm.png | 0 src/components/utils/MiscUtils.js | 118 public/assets/images/map-pages/icon/yl.png | 0 public/assets/images/map-pages/icon/icon_SalesEnterprise.png | 0 public/assets/images/map-pages/icon/xljt1.png | 0 public/assets/images/map-pages/icon/car_online_ref.png | 0 src/store/map.js | 16 src/assets/images/map-pages/icon/icon_Chemical.png | 0 src/utils/navigation.js | 324 + src/api/app.js | 246 + src/store/index.js | 36 public/assets/images/map-pages/icon/ship_left.png | 0 src/assets/images/map-pages/icon/lyg_yz.gif | 0 src/utils/constant.js | 65 public/assets/images/map-pages/icon/train_mousover.png | 0 public/assets/images/map-pages/icon/car_offline_ref.png | 0 src/components/LayerController/layerControllerPresets.js | 26 public/assets/images/map-pages/icon/ship_offline.png | 0 public/assets/images/map-pages/cosmetics/horn_tr.png | 0 src/assets/images/map-pages/icon/warning_ybNo.png | 0 public/assets/images/map-pages/icon/warning_ybYs.png | 0 src/components/mapmodules/SafetyIndexPie.js | 42 src/assets/images/.DS_Store | 0 public/assets/images/map-pages/icon/warning_driver_no.png | 0 src/assets/images/map-pages/icon/6.png | 0 src/assets/images/map-pages/icon/car_online.png | 0 src/components/plugin/Editable.js | 1963 ++++++++ src/components/mapmodules/SafetyIndexBar.js | 120 public/assets/images/map-pages/icon/ship_online.png | 0 src/assets/images/map-pages/icon/warning_yzYs.png | 0 src/utils/AjaxUtils.js | 111 public/assets/css/map/custom-popup.css | 36 public/assets/images/map-pages/xljt1.png | 0 src/components/plugin/prune-cluster/LeafletStyleSheet.css | 69 src/assets/images/map-pages/icon/warning_driver_video.png | 0 src/assets/images/map-pages/icon/zkjt.png | 0 src/components/utils/AjaxUtils.js | 101 public/assets/images/map-pages/cosmetics/horn_br.png | 0 public/assets/images/map-pages/icon/warning_ybNo.png | 0 src/assets/images/map-pages/icon/map1/6.png | 0 public/assets/images/map-pages/icon/6.png | 0 src/.DS_Store | 0 aliases.config.js | 26 src/utils/authorityAPI.js | 11 src/styles/theme-dark/index.less | 98 public/assets/images/.DS_Store | 0 src/styles/theme-dark/el-ui/tag.less | 3 public/assets/images/map-pages/icon/title_icon.png | 0 public/assets/images/map-pages/icon/map1/7.png | 0 src/components/plugin/PathDrag.js | 143 src/utils/DateUtils.js | 29 src/styles/theme-dark/el-ui/collapse.less | 19 public/assets/images/map-pages/icon/ycan.png | 0 src/components/plugin/cluster-layer/leaflet.markercluster.freezable.js | 6 public/assets/images/map-pages/icon/train_offline_ref.png | 0 src/assets/images/map-pages/icon/bgc.png | 0 src/components/plugin/cluster-layer/MarkerCluster.css | 14 src/assets/images/map-pages/icon/petro_zhanc_sel.png | 0 src/utils/MixinEmitter.js | 57 src/components/plugin/CustomPopup.js | 74 public/assets/images/map-pages/icon/map1/0.png | 0 public/assets/images/map-pages/icon/xljt12.png | 0 src/app.config.js | 20 public/assets/images/map-pages/icon/map1/4.png | 0 src/assets/images/map-pages/icon/3.png | 0 src/assets/images/map-pages/icon/icon_cam.png | 0 src/api/mapApi.js | 125 src/assets/images/map-pages/icon/icon_Dock.png | 0 public/assets/images/map-pages/cosmetics/horn_tl.png | 0 src/assets/images/map-pages/icon/warning_driver_no.png | 0 src/assets/images/map-pages/icon/xljt2.png | 0 src/utils/dictionary.js | 782 +++ src/utils/tools.js | 1154 ++++ public/assets/images/map-pages/icon/ship_alarm_ref.png | 0 public/assets/images/map-pages/icon/petro_zhanc_sel.png | 0 src/styles/theme-dark/base/BaseCard.less | 3 src/assets/images/map-pages/icon/icon.png | 0 src/components/utils/DateUtils.js | 29 public/assets/images/map-pages/icon/lyg_yz.gif | 0 src/assets/images/map-pages/icon/warning_yzNo.png | 0 src/styles/theme-dark/el-ui/popover.less | 24 src/components/plugin/cluster-layer/leaflet.markercluster-src.js.map | 1 src/utils/MiscUtils.js | 118 public/assets/images/map-pages/icon/icon_Sales.png | 0 public/assets/images/map-pages/icon/tab.png | 0 src/components/plugin/cluster-layer/MarkerCluster.Default.css | 68 public/favicon.ico | 0 public/assets/images/map-pages/icon/2.png | 0 public/assets/images/map-pages/icon/warning_car_img.png | 0 public/assets/images/map-pages/icon/txtbackground.png | 0 src/assets/images/map-pages/icon/end.png | 0 public/assets/images/map-pages/icon/warning_other_no.png | 0 public/assets/images/map-pages/icon/train_alarm.png | 0 src/assets/images/map-pages/icon/car_online_ref.png | 0 src/api/services.js | 107 src/assets/images/map-pages/icon/setting.png | 0 src/components/LayerController/LayerControllerAPI.js | 5 src/assets/images/map-pages/icon/HwBg.png | 0 public/assets/images/map-pages/icon/warning_car_no.png | 0 src/assets/images/map-pages/icon/11.png | 0 src/main.js | 28 src/components/plugin/prune-cluster/PruneCluster.js | 930 +++ src/assets/images/map-pages/icon/warning_allNo.png | 0 src/assets/images/map-pages/cosmetics/horn_br.png | 0 src/assets/images/map-pages/icon/map1/3.png | 0 src/assets/images/map-pages/icon/horn.png | 0 src/styles/theme-blue/index.less | 48 public/assets/images/map-pages/icon/HwBg.png | 0 src/styles/theme-dark/el-ui/textarea.less | 11 public/assets/images/map-pages/icon/icon_FillingStation.png | 0 src/assets/images/map-pages/icon/icon_SalesEnterprise.png | 0 src/assets/css/map/custom-popup.css | 36 src/assets/images/map-pages/icon/7.png | 0 src/assets/images/map-pages/icon/map1/7.png | 0 src/styles/theme-dark/el-ui/message.less | 12 public/assets/images/map-pages/icon/dd.png | 0 public/assets/images/map-pages/icon/start.png | 0 src/assets/images/map-pages/icon/warning_car_video.png | 0 public/assets/images/map-pages/icon/icon_Petrochemical.png | 0 public/assets/images/map-pages/icon/11.png | 0 src/assets/.DS_Store | 0 src/styles/theme-dark/el-ui/checkbox-button.less | 92 src/Sgis.js | 104 src/assets/images/map-pages/icon/train_offline.png | 0 src/assets/images/map-pages/cosmetics/horn_tr.png | 0 src/styles/theme-dark/el-ui/upload.less | 8 public/assets/images/map-pages/icon/ship_right.png | 0 src/assets/images/map-pages/icon/ship_left.png | 0 public/assets/images/map-pages/icon/7.png | 0 src/utils/axios.js | 214 public/assets/images/map-pages/icon/train_offline.png | 0 public/assets/images/map-pages/icon/3.png | 0 public/assets/images/map-pages/icon/ship_online_ref.png | 0 src/api/host.js | 6 public/assets/images/map-pages/icon/warning_allNo.png | 0 public/assets/images/map-pages/icon/tool.png | 0 src/components/LayerController/LayerController.vue | 262 + src/styles/theme-dark/el-ui/date-picker.less | 169 src/assets/images/map-pages/icon/start.png | 0 src/assets/images/map-pages/icon/xljt12.png | 0 src/utils/JsonUtils.js | 48 src/assets/images/map-pages/icon/RedPin1LargeB.png | 0 src/components/mapmodules/CommonLayerLoad.js | 82 public/assets/images/map-pages/icon/map1/8.png | 0 src/assets/images/map-pages/icon/warning_driver_img.png | 0 src/assets/images/map-pages/icon/xljt1.png | 0 src/assets/images/map-pages/icon/warning_ybYs.png | 0 src/components/plugin/cluster-layer/leaflet.markercluster-src.js | 2678 +++++++++++ public/assets/images/map-pages/icon/icon_StoreHouse.png | 0 src/assets/images/map-pages/icon/dd.png | 0 337 files changed, 14,407 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ff7ad87 --- /dev/null +++ b/.DS_Store Binary files differ diff --git a/.gitignore b/.gitignore index a4af05a..e37bd72 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ # Users Environment Variables .lock-wscript + +package-lock.json \ No newline at end of file diff --git a/aliases.config.js b/aliases.config.js new file mode 100644 index 0000000..a01418b --- /dev/null +++ b/aliases.config.js @@ -0,0 +1,26 @@ +const path = require('path') + +function resolveSrc(_path) { + return path.join(__dirname, _path) +} + +const aliases = { + '@src': 'src', + '@router': 'src/router', + '@views': 'src/views', + '@components': 'src/components', + '@assets': 'src/assets', + '@utils': 'src/utils', + '@styles': 'src/styles' +} + +module.exports = { + webpack: {}, + jest: {} +} + +for (const alias in aliases) { + module.exports.webpack[alias] = resolveSrc(aliases[alias]) + module.exports.jest['^' + alias + '/(.*)$'] = + '<rootDir>/' + aliases[alias] + '/$1' +} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..0d7053e --- /dev/null +++ b/package.json @@ -0,0 +1,65 @@ +{ + "name": "abc", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "@jiaminghi/data-view": "^2.10.0", + "axios": "^0.18.0", + "core-js": "^3.6.5", + "dayjs": "^1.9.6", + "echarts": "^4.2.1", + "element-ui": "^2.14.1", + "jquery": "^3.5.1", + "js-cookie": "^2.2.0", + "leaflet": "^1.6.0", + "leaflet-canvas-marker": "^0.2.0", + "leaflet.markercluster": "^1.4.1", + "lodash": "^4.17.10", + "nprogress": "^0.2.0", + "screenfull": "^3.3.2", + "vue": "^2.6.11", + "vue-count-to": "^1.0.13", + "vue-focus": "^2.1.0", + "vue-router": "^3.0.1", + "vuex": "^3.0.1" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "~4.5.0", + "@vue/cli-plugin-eslint": "~4.5.0", + "@vue/cli-service": "~4.5.0", + "babel-eslint": "^10.1.0", + "babel-loader": "^8.2.2", + "cache-loader": "^4.1.0", + "css-loader": "^5.0.1", + "eslint": "^6.7.2", + "eslint-plugin-vue": "^6.2.2", + "less": "^3.13.0", + "less-loader": "^7.1.0", + "vue-loader": "^15.9.5", + "vue-template-compiler": "^2.6.11" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/essential", + "eslint:recommended" + ], + "parserOptions": { + "parser": "babel-eslint" + }, + "rules": {} + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead" + ] +} diff --git a/public/assets/.DS_Store b/public/assets/.DS_Store new file mode 100644 index 0000000..66f4848 --- /dev/null +++ b/public/assets/.DS_Store Binary files differ diff --git a/public/assets/css/map/custom-popup.css b/public/assets/css/map/custom-popup.css new file mode 100644 index 0000000..cf742ef --- /dev/null +++ b/public/assets/css/map/custom-popup.css @@ -0,0 +1,36 @@ +.custom-popup .leaflet-popup-content-wrapper { + background-color: rgba(14, 45, 84, 0.9); + color: #ffffff; +} +.custom-popup .leaflet-popup-content-wrapper, .leaflet-popup-tip{ + background-color: rgba(14, 45, 84, 0.9); +} +.custom-popup a.leaflet-popup-close-button{ + /**/ + text-align: left; +} + +.custom-popup .leaflet-popup-content{ + text-align: left; +} +.leaflet-div-icon{ + background: transparent; + border:none; +} +.leaflet-popup-content-wrapper{ + background: transparent !important; +} +.custom-popup .leaflet-popup-tip{ + background-color: #3180a1 ; +} +.custom-popup .leaflet-popup-content{ + padding: 0 ; + margin: 0 ; + /*margin: -5px -5px !important;*/ +} + +.tipBgColor { + background: #F4DED4; + font-size: 10px; + /*height: 22px;*/ +} diff --git a/public/assets/css/map/magic.min.css b/public/assets/css/map/magic.min.css new file mode 100644 index 0000000..1cf6de2 --- /dev/null +++ b/public/assets/css/map/magic.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.magictime{animation-duration:1s;animation-fill-mode:both}.puffIn{animation-name:puffIn}@keyframes puffIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(2px)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}}.puffOut{animation-name:puffOut}@keyframes puffOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(2px)}}.vanishIn{animation-name:vanishIn}@keyframes vanishIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(90px)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}}.vanishOut{animation-name:vanishOut}@keyframes vanishOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(20px)}}.boingInUp{animation-name:boingInUp}@keyframes boingInUp{0%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateX(-90deg)}50%{opacity:1;transform-origin:50% 0;transform:perspective(800px) rotateX(50deg)}100%{opacity:1;transform-origin:50% 0;transform:perspective(800px) rotateX(0)}}.boingOutDown{animation-name:boingOutDown}@keyframes boingOutDown{0%{opacity:1;transform-origin:100% 100%;transform:perspective(800px) rotateX(0) rotateY(0)}20%{opacity:1;transform-origin:100% 100%;transform:perspective(800px) rotateX(0) rotateY(10deg)}30%{opacity:1;transform-origin:0 100%;transform:perspective(800px) rotateX(0) rotateY(0)}40%{opacity:1;transform-origin:0 100%;transform:perspective(800px) rotateX(10deg) rotateY(10deg)}100%{opacity:0;transform-origin:100% 100%;transform:perspective(800px) rotateX(90deg) rotateY(0)}}.bombLeftOut{animation-name:bombLeftOut}@keyframes bombLeftOut{0%{opacity:1;transform-origin:50% 50%;transform:rotate(0);filter:blur(0)}50%{opacity:1;transform-origin:-100% 50%;transform:rotate(-160deg);filter:blur(0)}100%{opacity:0;transform-origin:-100% 50%;transform:rotate(-160deg);filter:blur(20px)}}.bombRightOut{animation-name:bombRightOut}@keyframes bombRightOut{0%{opacity:1;transform-origin:50% 50%;transform:rotate(0);filter:blur(0)}50%{opacity:1;transform-origin:200% 50%;transform:rotate(160deg);filter:blur(0)}100%{opacity:0;transform-origin:200% 50%;transform:rotate(160deg);filter:blur(20px)}}.magic{animation-name:magic}@keyframes magic{0%{opacity:1;transform-origin:100% 200%;transform:scale(1,1) rotate(0)}100%{opacity:0;transform-origin:200% 500%;transform:scale(0,0) rotate(270deg)}}.swap{animation-name:swap}@keyframes swap{0%{opacity:0;transform-origin:0 100%;transform:scale(0,0) translate(-700px,0)}100%{opacity:1;transform-origin:100% 100%;transform:scale(1,1) translate(0,0)}}.twisterInDown{animation-name:twisterInDown}@keyframes twisterInDown{0%{opacity:0;transform-origin:0 100%;transform:scale(0,0) rotate(360deg) translateY(-100%)}30%{transform-origin:0 100%;transform:scale(0,0) rotate(360deg) translateY(-100%)}100%{opacity:1;transform-origin:100% 100%;transform:scale(1,1) rotate(0) translateY(0)}}.twisterInUp{animation-name:twisterInUp}@keyframes twisterInUp{0%{opacity:0;transform-origin:100% 0;transform:scale(0,0) rotate(360deg) translateY(100%)}30%{transform-origin:100% 0;transform:scale(0,0) rotate(360deg) translateY(100%)}100%{opacity:1;transform-origin:0 0;transform:scale(1,1) rotate(0) translateY(0)}}.foolishIn{animation-name:foolishIn}@keyframes foolishIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotate(360deg)}20%{opacity:1;transform-origin:0 100%;transform:scale(.5,.5) rotate(0)}40%{opacity:1;transform-origin:100% 100%;transform:scale(.5,.5) rotate(0)}60%{opacity:1;transform-origin:0;transform:scale(.5,.5) rotate(0)}80%{opacity:1;transform-origin:0 0;transform:scale(.5,.5) rotate(0)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotate(0)}}.foolishOut{animation-name:foolishOut}@keyframes foolishOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotate(360deg)}20%{opacity:1;transform-origin:0 0;transform:scale(.5,.5) rotate(0)}40%{opacity:1;transform-origin:100% 0;transform:scale(.5,.5) rotate(0)}60%{opacity:1;transform-origin:0;transform:scale(.5,.5) rotate(0)}80%{opacity:1;transform-origin:0 100%;transform:scale(.5,.5) rotate(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotate(0)}}.holeOut{animation-name:holeOut}@keyframes holeOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotateY(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotateY(180deg)}}.swashIn{animation-name:swashIn}@keyframes swashIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(0,0)}90%{opacity:1;transform-origin:50% 50%;transform:scale(.9,.9)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1)}}.swashOut{animation-name:swashOut}@keyframes swashOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1)}80%{opacity:1;transform-origin:50% 50%;transform:scale(.9,.9)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0)}}.spaceInDown{animation-name:spaceInDown}@keyframes spaceInDown{0%{opacity:0;transform-origin:50% 100%;transform:scale(.2) translate(0,200%)}100%{opacity:1;transform-origin:50% 100%;transform:scale(1) translate(0,0)}}.spaceInLeft{animation-name:spaceInLeft}@keyframes spaceInLeft{0%{opacity:0;transform-origin:0 50%;transform:scale(.2) translate(-200%,0)}100%{opacity:1;transform-origin:0 50%;transform:scale(1) translate(0,0)}}.spaceInRight{animation-name:spaceInRight}@keyframes spaceInRight{0%{opacity:0;transform-origin:100% 50%;transform:scale(.2) translate(200%,0)}100%{opacity:1;transform-origin:100% 50%;transform:scale(1) translate(0,0)}}.spaceInUp{animation-name:spaceInUp}@keyframes spaceInUp{0%{opacity:0;transform-origin:50% 0;transform:scale(.2) translate(0,-200%)}100%{opacity:1;transform-origin:50% 0;transform:scale(1) translate(0,0)}}.spaceOutDown{animation-name:spaceOutDown}@keyframes spaceOutDown{0%{opacity:1;transform-origin:50% 100%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:50% 100%;transform:scale(.2) translate(0,200%)}}.spaceOutLeft{animation-name:spaceOutLeft}@keyframes spaceOutLeft{0%{opacity:1;transform-origin:0 50%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:0 50%;transform:scale(.2) translate(-200%,0)}}.spaceOutRight{animation-name:spaceOutRight}@keyframes spaceOutRight{0%{opacity:1;transform-origin:100% 50%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:100% 50%;transform:scale(.2) translate(200%,0)}}.spaceOutUp{animation-name:spaceOutUp}@keyframes spaceOutUp{0%{opacity:1;transform-origin:50% 0;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:50% 0;transform:scale(.2) translate(0,-200%)}}.perspectiveDown{animation-name:perspectiveDown}@keyframes perspectiveDown{0%{transform-origin:0 100%;transform:perspective(800px) rotateX(0)}100%{transform-origin:0 100%;transform:perspective(800px) rotateX(-180deg)}}.perspectiveDownReturn{animation-name:perspectiveDownReturn}@keyframes perspectiveDownReturn{0%{transform-origin:0 100%;transform:perspective(800px) rotateX(-180deg)}100%{transform-origin:0 100%;transform:perspective(800px) rotateX(0)}}.perspectiveLeft{animation-name:perspectiveLeft}@keyframes perspectiveLeft{0%{transform-origin:0 0;transform:perspective(800px) rotateY(0)}100%{transform-origin:0 0;transform:perspective(800px) rotateY(-180deg)}}.perspectiveLeftReturn{animation-name:perspectiveLeftReturn}@keyframes perspectiveLeftReturn{0%{transform-origin:0 0;transform:perspective(800px) rotateY(-180deg)}100%{transform-origin:0 0;transform:perspective(800px) rotateY(0)}}.perspectiveRight{animation-name:perspectiveRight}@keyframes perspectiveRight{0%{transform-origin:100% 0;transform:perspective(800px) rotateY(0)}100%{transform-origin:100% 0;transform:perspective(800px) rotateY(180deg)}}.perspectiveRightReturn{animation-name:perspectiveRightReturn}@keyframes perspectiveRightReturn{0%{transform-origin:100% 0;transform:perspective(800px) rotateY(180deg)}100%{transform-origin:100% 0;transform:perspective(800px) rotateY(0)}}.perspectiveUp{animation-name:perspectiveUp}@keyframes perspectiveUp{0%{transform-origin:0 0;transform:perspective(800px) rotateX(0)}100%{transform-origin:0 0;transform:perspective(800px) rotateX(180deg)}}.perspectiveUpReturn{animation-name:perspectiveUpReturn}@keyframes perspectiveUpReturn{0%{transform-origin:0 0;transform:perspective(800px) rotateX(180deg)}100%{transform-origin:0 0;transform:perspective(800px) rotateX(0)}}.rotateDown{animation-name:rotateDown}@keyframes rotateDown{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateX(0) translateZ(0)}100%{opacity:0;transform-origin:50% 100%;transform:perspective(800px) rotateX(-180deg) translateZ(300px)}}.rotateLeft{animation-name:rotateLeft}@keyframes rotateLeft{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateY(0) translateZ(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateY(180deg) translateZ(300px)}}.rotateRight{animation-name:rotateRight}@keyframes rotateRight{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateY(0) translate3d(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateY(-180deg) translateZ(150px)}}.rotateUp{animation-name:rotateUp}@keyframes rotateUp{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateX(0) translateZ(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateX(180deg) translateZ(100px)}}.slideDown{animation-name:slideDown}@keyframes slideDown{0%{transform-origin:0 0;transform:translateY(0)}100%{transform-origin:0 0;transform:translateY(100%)}}.slideDownReturn{animation-name:slideDownReturn}@keyframes slideDownReturn{0%{transform-origin:0 0;transform:translateY(100%)}100%{transform-origin:0 0;transform:translateY(0)}}.slideLeft{animation-name:slideLeft}@keyframes slideLeft{0%{transform-origin:0 0;transform:translateX(0)}100%{transform-origin:0 0;transform:translateX(-100%)}}.slideLeftReturn{animation-name:slideLeftReturn}@keyframes slideLeftReturn{0%{transform-origin:0 0;transform:translateX(-100%)}100%{transform-origin:0 0;transform:translateX(0)}}.slideRight{animation-name:slideRight}@keyframes slideRight{0%{transform-origin:0 0;transform:translateX(0)}100%{transform-origin:0 0;transform:translateX(100%)}}.slideRightReturn{animation-name:slideRightReturn}@keyframes slideRightReturn{0%{transform-origin:0 0;transform:translateX(100%)}100%{transform-origin:0 0;transform:translateX(0)}}.slideUp{animation-name:slideUp}@keyframes slideUp{0%{transform-origin:0 0;transform:translateY(0)}100%{transform-origin:0 0;transform:translateY(-100%)}}.slideUpReturn{animation-name:slideUpReturn}@keyframes slideUpReturn{0%{transform-origin:0 0;transform:translateY(-100%)}100%{transform-origin:0 0;transform:translateY(0)}}.openDownLeft{animation-name:openDownLeft}@keyframes openDownLeft{0%{transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openDownLeftReturn{animation-name:openDownLeftReturn}@keyframes openDownLeftReturn{0%{transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}100%{transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}}.openDownRight{animation-name:openDownRight}@keyframes openDownRight{0%{transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openDownRightReturn{animation-name:openDownRightReturn}@keyframes openDownRightReturn{0%{transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}100%{transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}}.openUpLeft{animation-name:openUpLeft}@keyframes openUpLeft{0%{transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpLeftReturn{animation-name:openUpLeftReturn}@keyframes openUpLeftReturn{0%{transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}100%{transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}}.openUpRight{animation-name:openUpRight}@keyframes openUpRight{0%{transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openUpRightReturn{animation-name:openUpRightReturn}@keyframes openUpRightReturn{0%{transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}100%{transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}}.openDownLeftOut{animation-name:openDownLeftOut}@keyframes openDownLeftOut{0%{opacity:1;transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openDownRightOut{animation-name:openDownRightOut}@keyframes openDownRightOut{0%{opacity:1;transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpLeftOut{animation-name:openUpLeftOut}@keyframes openUpLeftOut{0%{opacity:1;transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpRightOut{animation-name:openUpRightOut}@keyframes openUpRightOut{0%{opacity:1;transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.tinDownIn{animation-name:tinDownIn}@keyframes tinDownIn{0%{opacity:0;transform:scale(1,1) translateY(900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateY(0)}}.tinDownOut{animation-name:tinDownOut}@keyframes tinDownOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateY(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%{opacity:0;transform:scale(1,1) translateY(900%)}}.tinLeftIn{animation-name:tinLeftIn}@keyframes tinLeftIn{0%{opacity:0;transform:scale(1,1) translateX(-900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateX(0)}}.tinLeftOut{animation-name:tinLeftOut}@keyframes tinLeftOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateX(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%{opacity:0;transform:scale(1,1) translateX(-900%)}}.tinRightIn{animation-name:tinRightIn}@keyframes tinRightIn{0%{opacity:0;transform:scale(1,1) translateX(900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateX(0)}}.tinRightOut{animation-name:tinRightOut}@keyframes tinRightOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateX(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%{opacity:0;transform:scale(1,1) translateX(900%)}}.tinUpIn{animation-name:tinUpIn}@keyframes tinUpIn{0%{opacity:0;transform:scale(1,1) translateY(-900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateY(0)}}.tinUpOut{animation-name:tinUpOut}@keyframes tinUpOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateY(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%{opacity:0;transform:scale(1,1) translateY(-900%)}} \ No newline at end of file diff --git a/public/assets/images/.DS_Store b/public/assets/images/.DS_Store new file mode 100644 index 0000000..7554b5e --- /dev/null +++ b/public/assets/images/.DS_Store Binary files differ diff --git a/public/assets/images/map-pages/.DS_Store b/public/assets/images/map-pages/.DS_Store new file mode 100644 index 0000000..a039990 --- /dev/null +++ b/public/assets/images/map-pages/.DS_Store Binary files differ diff --git a/public/assets/images/map-pages/cosmetics/horn_bl.png b/public/assets/images/map-pages/cosmetics/horn_bl.png new file mode 100644 index 0000000..0bc1d33 --- /dev/null +++ b/public/assets/images/map-pages/cosmetics/horn_bl.png Binary files differ diff --git a/public/assets/images/map-pages/cosmetics/horn_br.png b/public/assets/images/map-pages/cosmetics/horn_br.png new file mode 100644 index 0000000..dfab8df --- /dev/null +++ b/public/assets/images/map-pages/cosmetics/horn_br.png Binary files differ diff --git a/public/assets/images/map-pages/cosmetics/horn_tl.png b/public/assets/images/map-pages/cosmetics/horn_tl.png new file mode 100644 index 0000000..317df00 --- /dev/null +++ b/public/assets/images/map-pages/cosmetics/horn_tl.png Binary files differ diff --git a/public/assets/images/map-pages/cosmetics/horn_tr.png b/public/assets/images/map-pages/cosmetics/horn_tr.png new file mode 100644 index 0000000..02b20c9 --- /dev/null +++ b/public/assets/images/map-pages/cosmetics/horn_tr.png Binary files differ diff --git a/public/assets/images/map-pages/icon.png b/public/assets/images/map-pages/icon.png new file mode 100644 index 0000000..62d9de9 --- /dev/null +++ b/public/assets/images/map-pages/icon.png Binary files differ diff --git a/public/assets/images/map-pages/icon/.DS_Store b/public/assets/images/map-pages/icon/.DS_Store new file mode 100644 index 0000000..4911e55 --- /dev/null +++ b/public/assets/images/map-pages/icon/.DS_Store Binary files differ diff --git a/public/assets/images/map-pages/icon/1.png b/public/assets/images/map-pages/icon/1.png new file mode 100644 index 0000000..b05e971 --- /dev/null +++ b/public/assets/images/map-pages/icon/1.png Binary files differ diff --git a/public/assets/images/map-pages/icon/11.png b/public/assets/images/map-pages/icon/11.png new file mode 100644 index 0000000..33c97b5 --- /dev/null +++ b/public/assets/images/map-pages/icon/11.png Binary files differ diff --git a/public/assets/images/map-pages/icon/2.png b/public/assets/images/map-pages/icon/2.png new file mode 100644 index 0000000..07452d1 --- /dev/null +++ b/public/assets/images/map-pages/icon/2.png Binary files differ diff --git a/public/assets/images/map-pages/icon/3.png b/public/assets/images/map-pages/icon/3.png new file mode 100644 index 0000000..eea0b7a --- /dev/null +++ b/public/assets/images/map-pages/icon/3.png Binary files differ diff --git a/public/assets/images/map-pages/icon/4.png b/public/assets/images/map-pages/icon/4.png new file mode 100644 index 0000000..a6ad2eb --- /dev/null +++ b/public/assets/images/map-pages/icon/4.png Binary files differ diff --git a/public/assets/images/map-pages/icon/5.png b/public/assets/images/map-pages/icon/5.png new file mode 100644 index 0000000..c715897 --- /dev/null +++ b/public/assets/images/map-pages/icon/5.png Binary files differ diff --git a/public/assets/images/map-pages/icon/6.png b/public/assets/images/map-pages/icon/6.png new file mode 100644 index 0000000..c0d4960 --- /dev/null +++ b/public/assets/images/map-pages/icon/6.png Binary files differ diff --git a/public/assets/images/map-pages/icon/7.png b/public/assets/images/map-pages/icon/7.png new file mode 100644 index 0000000..d7deb34 --- /dev/null +++ b/public/assets/images/map-pages/icon/7.png Binary files differ diff --git a/public/assets/images/map-pages/icon/BluePin1LargeB.png b/public/assets/images/map-pages/icon/BluePin1LargeB.png new file mode 100644 index 0000000..a01a819 --- /dev/null +++ b/public/assets/images/map-pages/icon/BluePin1LargeB.png Binary files differ diff --git a/public/assets/images/map-pages/icon/GreenPin1LargeB.png b/public/assets/images/map-pages/icon/GreenPin1LargeB.png new file mode 100644 index 0000000..e75fde5 --- /dev/null +++ b/public/assets/images/map-pages/icon/GreenPin1LargeB.png Binary files differ diff --git a/public/assets/images/map-pages/icon/HwBg.png b/public/assets/images/map-pages/icon/HwBg.png new file mode 100644 index 0000000..0d0047d --- /dev/null +++ b/public/assets/images/map-pages/icon/HwBg.png Binary files differ diff --git a/public/assets/images/map-pages/icon/RedPin1LargeB.png b/public/assets/images/map-pages/icon/RedPin1LargeB.png new file mode 100644 index 0000000..b92ead5 --- /dev/null +++ b/public/assets/images/map-pages/icon/RedPin1LargeB.png Binary files differ diff --git a/public/assets/images/map-pages/icon/TrainStation.png b/public/assets/images/map-pages/icon/TrainStation.png new file mode 100644 index 0000000..57f87d8 --- /dev/null +++ b/public/assets/images/map-pages/icon/TrainStation.png Binary files differ diff --git a/public/assets/images/map-pages/icon/bgc.png b/public/assets/images/map-pages/icon/bgc.png new file mode 100644 index 0000000..3d402a4 --- /dev/null +++ b/public/assets/images/map-pages/icon/bgc.png Binary files differ diff --git a/public/assets/images/map-pages/icon/bgc2.png b/public/assets/images/map-pages/icon/bgc2.png new file mode 100644 index 0000000..27f844f --- /dev/null +++ b/public/assets/images/map-pages/icon/bgc2.png Binary files differ diff --git a/public/assets/images/map-pages/icon/caidan.png b/public/assets/images/map-pages/icon/caidan.png new file mode 100644 index 0000000..d50246c --- /dev/null +++ b/public/assets/images/map-pages/icon/caidan.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_alarm.png b/public/assets/images/map-pages/icon/car_alarm.png new file mode 100644 index 0000000..946a724 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_alarm.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_alarm_ref.png b/public/assets/images/map-pages/icon/car_alarm_ref.png new file mode 100644 index 0000000..e320783 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_alarm_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_mousover.png b/public/assets/images/map-pages/icon/car_mousover.png new file mode 100644 index 0000000..aa3bae2 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_mousover.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_mousover_ref.png b/public/assets/images/map-pages/icon/car_mousover_ref.png new file mode 100644 index 0000000..78a539c --- /dev/null +++ b/public/assets/images/map-pages/icon/car_mousover_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_offline.png b/public/assets/images/map-pages/icon/car_offline.png new file mode 100644 index 0000000..5effc33 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_offline.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_offline_ref.png b/public/assets/images/map-pages/icon/car_offline_ref.png new file mode 100644 index 0000000..db0001b --- /dev/null +++ b/public/assets/images/map-pages/icon/car_offline_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_online.png b/public/assets/images/map-pages/icon/car_online.png new file mode 100644 index 0000000..06da197 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_online.png Binary files differ diff --git a/public/assets/images/map-pages/icon/car_online_ref.png b/public/assets/images/map-pages/icon/car_online_ref.png new file mode 100644 index 0000000..ea36dc4 --- /dev/null +++ b/public/assets/images/map-pages/icon/car_online_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/cl.png b/public/assets/images/map-pages/icon/cl.png new file mode 100644 index 0000000..1337a11 --- /dev/null +++ b/public/assets/images/map-pages/icon/cl.png Binary files differ diff --git a/public/assets/images/map-pages/icon/dd.png b/public/assets/images/map-pages/icon/dd.png new file mode 100644 index 0000000..dbb603f --- /dev/null +++ b/public/assets/images/map-pages/icon/dd.png Binary files differ diff --git a/public/assets/images/map-pages/icon/end.png b/public/assets/images/map-pages/icon/end.png new file mode 100644 index 0000000..7eb9720 --- /dev/null +++ b/public/assets/images/map-pages/icon/end.png Binary files differ diff --git a/public/assets/images/map-pages/icon/horn.png b/public/assets/images/map-pages/icon/horn.png new file mode 100644 index 0000000..213f9cb --- /dev/null +++ b/public/assets/images/map-pages/icon/horn.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon.png b/public/assets/images/map-pages/icon/icon.png new file mode 100644 index 0000000..62d9de9 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_Chemical.png b/public/assets/images/map-pages/icon/icon_Chemical.png new file mode 100644 index 0000000..4feedcb --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_Chemical.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_Dock.png b/public/assets/images/map-pages/icon/icon_Dock.png new file mode 100644 index 0000000..b8f037e --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_Dock.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_FillingStation.png b/public/assets/images/map-pages/icon/icon_FillingStation.png new file mode 100644 index 0000000..0e2937a --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_FillingStation.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_Petrochemical.png b/public/assets/images/map-pages/icon/icon_Petrochemical.png new file mode 100644 index 0000000..bc21876 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_Petrochemical.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_ProductOil.png b/public/assets/images/map-pages/icon/icon_ProductOil.png new file mode 100644 index 0000000..1a4d3c9 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_ProductOil.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_Refinery.png b/public/assets/images/map-pages/icon/icon_Refinery.png new file mode 100644 index 0000000..bf4579d --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_Refinery.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_Sales.png b/public/assets/images/map-pages/icon/icon_Sales.png new file mode 100644 index 0000000..1fa93d4 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_Sales.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_SalesEnterprise.png b/public/assets/images/map-pages/icon/icon_SalesEnterprise.png new file mode 100644 index 0000000..1fa93d4 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_SalesEnterprise.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_StoreHouse.png b/public/assets/images/map-pages/icon/icon_StoreHouse.png new file mode 100644 index 0000000..005e52d --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_StoreHouse.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_cam.png b/public/assets/images/map-pages/icon/icon_cam.png new file mode 100644 index 0000000..863ac06 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_cam.png Binary files differ diff --git a/public/assets/images/map-pages/icon/icon_people.png b/public/assets/images/map-pages/icon/icon_people.png new file mode 100644 index 0000000..f22eb41 --- /dev/null +++ b/public/assets/images/map-pages/icon/icon_people.png Binary files differ diff --git a/public/assets/images/map-pages/icon/lyg_yb.gif b/public/assets/images/map-pages/icon/lyg_yb.gif new file mode 100644 index 0000000..7713c0a --- /dev/null +++ b/public/assets/images/map-pages/icon/lyg_yb.gif Binary files differ diff --git a/public/assets/images/map-pages/icon/lyg_yz.gif b/public/assets/images/map-pages/icon/lyg_yz.gif new file mode 100644 index 0000000..71fdfc2 --- /dev/null +++ b/public/assets/images/map-pages/icon/lyg_yz.gif Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/0.png b/public/assets/images/map-pages/icon/map1/0.png new file mode 100644 index 0000000..640b990 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/0.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/1.png b/public/assets/images/map-pages/icon/map1/1.png new file mode 100644 index 0000000..ae250a1 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/1.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/2.png b/public/assets/images/map-pages/icon/map1/2.png new file mode 100644 index 0000000..69ec43c --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/2.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/3.png b/public/assets/images/map-pages/icon/map1/3.png new file mode 100644 index 0000000..97f8827 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/3.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/4.png b/public/assets/images/map-pages/icon/map1/4.png new file mode 100644 index 0000000..6815eeb --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/4.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/5.png b/public/assets/images/map-pages/icon/map1/5.png new file mode 100644 index 0000000..eb8416f --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/5.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/6.png b/public/assets/images/map-pages/icon/map1/6.png new file mode 100644 index 0000000..6fece73 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/6.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/7.png b/public/assets/images/map-pages/icon/map1/7.png new file mode 100644 index 0000000..17a4d81 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/7.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/8.png b/public/assets/images/map-pages/icon/map1/8.png new file mode 100644 index 0000000..4168fbe --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/8.png Binary files differ diff --git a/public/assets/images/map-pages/icon/map1/9.png b/public/assets/images/map-pages/icon/map1/9.png new file mode 100644 index 0000000..df7fda3 --- /dev/null +++ b/public/assets/images/map-pages/icon/map1/9.png Binary files differ diff --git "a/public/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" "b/public/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/public/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" diff --git a/public/assets/images/map-pages/icon/petro_zhanc_sel.png b/public/assets/images/map-pages/icon/petro_zhanc_sel.png new file mode 100644 index 0000000..800146b --- /dev/null +++ b/public/assets/images/map-pages/icon/petro_zhanc_sel.png Binary files differ diff --git a/public/assets/images/map-pages/icon/setting.png b/public/assets/images/map-pages/icon/setting.png new file mode 100644 index 0000000..be27321 --- /dev/null +++ b/public/assets/images/map-pages/icon/setting.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_alarm.png b/public/assets/images/map-pages/icon/ship_alarm.png new file mode 100644 index 0000000..fa4c6ed --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_alarm.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_alarm_ref.png b/public/assets/images/map-pages/icon/ship_alarm_ref.png new file mode 100644 index 0000000..6b48c70 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_alarm_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_left.png b/public/assets/images/map-pages/icon/ship_left.png new file mode 100644 index 0000000..d955a55 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_left.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_mousover.png b/public/assets/images/map-pages/icon/ship_mousover.png new file mode 100644 index 0000000..2cad529 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_mousover.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_mousover_ref.png b/public/assets/images/map-pages/icon/ship_mousover_ref.png new file mode 100644 index 0000000..5868e55 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_mousover_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_offline.png b/public/assets/images/map-pages/icon/ship_offline.png new file mode 100644 index 0000000..373e5a4 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_offline.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_offline_ref.png b/public/assets/images/map-pages/icon/ship_offline_ref.png new file mode 100644 index 0000000..b5e93a9 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_offline_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_online.png b/public/assets/images/map-pages/icon/ship_online.png new file mode 100644 index 0000000..d4c2237 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_online.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_online_ref.png b/public/assets/images/map-pages/icon/ship_online_ref.png new file mode 100644 index 0000000..e6cd828 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_online_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ship_right.png b/public/assets/images/map-pages/icon/ship_right.png new file mode 100644 index 0000000..ba62a38 --- /dev/null +++ b/public/assets/images/map-pages/icon/ship_right.png Binary files differ diff --git a/public/assets/images/map-pages/icon/sl.png b/public/assets/images/map-pages/icon/sl.png new file mode 100644 index 0000000..39ca8f8 --- /dev/null +++ b/public/assets/images/map-pages/icon/sl.png Binary files differ diff --git a/public/assets/images/map-pages/icon/start.png b/public/assets/images/map-pages/icon/start.png new file mode 100644 index 0000000..2bf91db --- /dev/null +++ b/public/assets/images/map-pages/icon/start.png Binary files differ diff --git a/public/assets/images/map-pages/icon/tab.png b/public/assets/images/map-pages/icon/tab.png new file mode 100644 index 0000000..db144e5 --- /dev/null +++ b/public/assets/images/map-pages/icon/tab.png Binary files differ diff --git a/public/assets/images/map-pages/icon/title_icon.png b/public/assets/images/map-pages/icon/title_icon.png new file mode 100644 index 0000000..6fece73 --- /dev/null +++ b/public/assets/images/map-pages/icon/title_icon.png Binary files differ diff --git a/public/assets/images/map-pages/icon/title_icon3.png b/public/assets/images/map-pages/icon/title_icon3.png new file mode 100644 index 0000000..97f8827 --- /dev/null +++ b/public/assets/images/map-pages/icon/title_icon3.png Binary files differ diff --git a/public/assets/images/map-pages/icon/tool.png b/public/assets/images/map-pages/icon/tool.png new file mode 100644 index 0000000..8edc1b6 --- /dev/null +++ b/public/assets/images/map-pages/icon/tool.png Binary files differ diff --git a/public/assets/images/map-pages/icon/topDT.png b/public/assets/images/map-pages/icon/topDT.png new file mode 100644 index 0000000..449130f --- /dev/null +++ b/public/assets/images/map-pages/icon/topDT.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_alarm.png b/public/assets/images/map-pages/icon/train_alarm.png new file mode 100644 index 0000000..63fc0ff --- /dev/null +++ b/public/assets/images/map-pages/icon/train_alarm.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_alarm_ref.png b/public/assets/images/map-pages/icon/train_alarm_ref.png new file mode 100644 index 0000000..87d776d --- /dev/null +++ b/public/assets/images/map-pages/icon/train_alarm_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_mousover.png b/public/assets/images/map-pages/icon/train_mousover.png new file mode 100644 index 0000000..803438e --- /dev/null +++ b/public/assets/images/map-pages/icon/train_mousover.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_mousover_ref.png b/public/assets/images/map-pages/icon/train_mousover_ref.png new file mode 100644 index 0000000..492d1d0 --- /dev/null +++ b/public/assets/images/map-pages/icon/train_mousover_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_offline.png b/public/assets/images/map-pages/icon/train_offline.png new file mode 100644 index 0000000..00eb508 --- /dev/null +++ b/public/assets/images/map-pages/icon/train_offline.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_offline_ref.png b/public/assets/images/map-pages/icon/train_offline_ref.png new file mode 100644 index 0000000..45ff10f --- /dev/null +++ b/public/assets/images/map-pages/icon/train_offline_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_online.png b/public/assets/images/map-pages/icon/train_online.png new file mode 100644 index 0000000..174f4f6 --- /dev/null +++ b/public/assets/images/map-pages/icon/train_online.png Binary files differ diff --git a/public/assets/images/map-pages/icon/train_online_ref.png b/public/assets/images/map-pages/icon/train_online_ref.png new file mode 100644 index 0000000..2f4f260 --- /dev/null +++ b/public/assets/images/map-pages/icon/train_online_ref.png Binary files differ diff --git a/public/assets/images/map-pages/icon/txtbackground.png b/public/assets/images/map-pages/icon/txtbackground.png new file mode 100644 index 0000000..bb6dd5f --- /dev/null +++ b/public/assets/images/map-pages/icon/txtbackground.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_allNo.png b/public/assets/images/map-pages/icon/warning_allNo.png new file mode 100644 index 0000000..076baf9 --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_allNo.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_allYs.png b/public/assets/images/map-pages/icon/warning_allYs.png new file mode 100644 index 0000000..780fdfd --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_allYs.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_car_img.png b/public/assets/images/map-pages/icon/warning_car_img.png new file mode 100644 index 0000000..2b6782e --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_car_img.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_car_no.png b/public/assets/images/map-pages/icon/warning_car_no.png new file mode 100644 index 0000000..8c7a55f --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_car_no.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_car_video.png b/public/assets/images/map-pages/icon/warning_car_video.png new file mode 100644 index 0000000..3a4f6bf --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_car_video.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_driver_img.png b/public/assets/images/map-pages/icon/warning_driver_img.png new file mode 100644 index 0000000..a1b3fd0 --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_driver_img.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_driver_no.png b/public/assets/images/map-pages/icon/warning_driver_no.png new file mode 100644 index 0000000..805a3f1 --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_driver_no.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_driver_video.png b/public/assets/images/map-pages/icon/warning_driver_video.png new file mode 100644 index 0000000..7d04a6c --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_driver_video.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_other_img.png b/public/assets/images/map-pages/icon/warning_other_img.png new file mode 100644 index 0000000..bd3c84e --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_other_img.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_other_no.png b/public/assets/images/map-pages/icon/warning_other_no.png new file mode 100644 index 0000000..33278ee --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_other_no.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_other_video.png b/public/assets/images/map-pages/icon/warning_other_video.png new file mode 100644 index 0000000..3273ecd --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_other_video.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_ybNo.png b/public/assets/images/map-pages/icon/warning_ybNo.png new file mode 100644 index 0000000..224e9fa --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_ybNo.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_ybYs.png b/public/assets/images/map-pages/icon/warning_ybYs.png new file mode 100644 index 0000000..d75bd3c --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_ybYs.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_yzNo.png b/public/assets/images/map-pages/icon/warning_yzNo.png new file mode 100644 index 0000000..1e6c0d2 --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_yzNo.png Binary files differ diff --git a/public/assets/images/map-pages/icon/warning_yzYs.png b/public/assets/images/map-pages/icon/warning_yzYs.png new file mode 100644 index 0000000..4d1143f --- /dev/null +++ b/public/assets/images/map-pages/icon/warning_yzYs.png Binary files differ diff --git a/public/assets/images/map-pages/icon/xljt1.png b/public/assets/images/map-pages/icon/xljt1.png new file mode 100644 index 0000000..9227215 --- /dev/null +++ b/public/assets/images/map-pages/icon/xljt1.png Binary files differ diff --git a/public/assets/images/map-pages/icon/xljt12.png b/public/assets/images/map-pages/icon/xljt12.png new file mode 100644 index 0000000..d3b5e52 --- /dev/null +++ b/public/assets/images/map-pages/icon/xljt12.png Binary files differ diff --git a/public/assets/images/map-pages/icon/xljt2.png b/public/assets/images/map-pages/icon/xljt2.png new file mode 100644 index 0000000..364a4d3 --- /dev/null +++ b/public/assets/images/map-pages/icon/xljt2.png Binary files differ diff --git a/public/assets/images/map-pages/icon/ycan.png b/public/assets/images/map-pages/icon/ycan.png new file mode 100644 index 0000000..1bbde9c --- /dev/null +++ b/public/assets/images/map-pages/icon/ycan.png Binary files differ diff --git a/public/assets/images/map-pages/icon/yd.png b/public/assets/images/map-pages/icon/yd.png new file mode 100644 index 0000000..b7bcf6d --- /dev/null +++ b/public/assets/images/map-pages/icon/yd.png Binary files differ diff --git a/public/assets/images/map-pages/icon/yl.png b/public/assets/images/map-pages/icon/yl.png new file mode 100644 index 0000000..c00ef79 --- /dev/null +++ b/public/assets/images/map-pages/icon/yl.png Binary files differ diff --git a/public/assets/images/map-pages/icon/zkjt.png b/public/assets/images/map-pages/icon/zkjt.png new file mode 100644 index 0000000..3612065 --- /dev/null +++ b/public/assets/images/map-pages/icon/zkjt.png Binary files differ diff --git a/public/assets/images/map-pages/setting.png b/public/assets/images/map-pages/setting.png new file mode 100644 index 0000000..be27321 --- /dev/null +++ b/public/assets/images/map-pages/setting.png Binary files differ diff --git a/public/assets/images/map-pages/xljt1.png b/public/assets/images/map-pages/xljt1.png new file mode 100644 index 0000000..9227215 --- /dev/null +++ b/public/assets/images/map-pages/xljt1.png Binary files differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..df36fcf --- /dev/null +++ b/public/favicon.ico Binary files differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..4123528 --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width,initial-scale=1.0"> + <link rel="icon" href="<%= BASE_URL %>favicon.ico"> + <title><%= htmlWebpackPlugin.options.title %></title> + </head> + <body> + <noscript> + <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> + </noscript> + <div id="app"></div> + <!-- built files will be auto injected --> + </body> +</html> diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..c521892 --- /dev/null +++ b/src/.DS_Store Binary files differ diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..3061c15 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,25 @@ +<template> + <div id="app"> + <map-template></map-template> + </div> +</template> + +<script> +import MapTemplate from './views/MapTemplate.vue' +export default { + name: 'App', + components: {MapTemplate} +} +</script> + +<style> +#app { + font-family: Avenir, Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + color: #2c3e50; + padding: 0px; + margin: 0px; +} +</style> diff --git a/src/Sgis.js b/src/Sgis.js new file mode 100644 index 0000000..9bedeb6 --- /dev/null +++ b/src/Sgis.js @@ -0,0 +1,104 @@ +import * as L from 'leaflet' +import BasemapHelper from '@components/helpers/BasemapHelper' +import VectorLayerHelper from '@components/helpers/VectorLayerHelper' + +import Editable from '@components/plugin/Editable' +import PathDrag from '@components/plugin/PathDrag' +import CanvasIcon from '@components/plugin/CanvasMarkers' +import MagicMarker from '@components/plugin/MagicMarker' +import 'leaflet.markercluster' + +import MapConfig from '@/conf/MapConfig' +import CommonLayerLoad from '@components/mapmodules/CommonLayerLoad' +import DashFlow from '@components/plugin/PathDashFlow' +import AjaxUtils from '@/utils/AjaxUtils' +let map = null +let baseMapGroup = null +let commonLayerLoad = null +const initMap = (div) => { + if (map != null) { + map.remove() + baseMapGroup = null + commonLayerLoad = null + } + + Editable.init(L) + PathDrag.init(L) + MagicMarker.init(L) + CanvasIcon.init(L) + + // CustomPopup.init(L) + // DashFlow.DashFlow(L) + map = L.map(div, MapConfig.mapOptions) + DashFlow.DashFlow(L, map) + commonLayerLoad = new CommonLayerLoad() + const blueMap = commonLayerLoad.loadBlueMap() + // const imgMapm = commonLayerLoad.loadImgMapm() + // const imgMapa = commonLayerLoad.loadImgMapa() + // L.layerGroup([normalMapm, normalMapa]).addTo(map) + baseMapGroup = L.layerGroup([blueMap]).addTo(map) + getToken() + // L.control.scale({ maxWidth: 200, metric: true, imperial: false }).addTo(map) + // L.control.layers(SgisConfig.baseLayers, SgisConfig.overlayLayers, { position: 'bottomright' }).addTo(map) + // 鍔犺浇鍥界晫鍜岄搧璺� + const nationalBoundaries = commonLayerLoad.loadGuoJie() + const railWay = commonLayerLoad.loadRailWay() + nationalBoundaries.addTo(map) + railWay.addTo(map) + window.map = map + window.L = L + + // showLngLat() + return { map: map, L: L } +} + +let getToken = () => { + let params = MapConfig.TokenConfig + AjaxUtils.GetDataAsynByUrl(params.url, params.option, function(token) { + showTdt(token) + }) +} +let showTdt = (token) => { + const imgMapm = commonLayerLoad.loadIntranetImgMap(token) + const imgMapa = commonLayerLoad.loadIntranetImgMapCia(token) + baseMapGroup.addLayer(imgMapm) + baseMapGroup.addLayer(imgMapa) +} +/** + * 鐡︾墖搴曞浘鍒濆鍖� + * @param map + */ +const initBasemaps = (map, L) => { + // todo 杩欓噷杩涜搴曞浘鍦板浘鐨勫垵濮嬪寲 + var basemapHelper = new BasemapHelper(map, L) + return basemapHelper +} + +/** + * 鐭㈤噺鍦板浘鍒濆鍖� + * @param map + */ +/** + * + * @param map + * @param L + * @param obj { name: 'trackPlayer', ref: this.$refs.trackPlayer } 缁勪欢鐨勫悕绉� 鍜� 缁勪欢鐨勫紩鐢� + * @param loadMethodNames + */ +const initLayers = (map, L, obj, env) => { + // todo 杩欓噷杩涜鍦板浘鐨勫垵濮嬪寲 + var vectorLayerHelper = new VectorLayerHelper(map, L, env) + if (obj != null) { + vectorLayerHelper.setVueRef(obj.name, obj.ref) + } + // let loadMethodNames = ['dock', 'petro', 'fillingStation', 'storeHouse', 'productOil', 'transDisplay', 'ship', 'train', 'warningCar', 'trackQuery', 'weather'] + vectorLayerHelper.initVectorLayers() + window.vectorLayerHelper = vectorLayerHelper + return vectorLayerHelper +} + +export default { + initMap, + initBasemaps, + initLayers +} diff --git a/src/api/app.js b/src/api/app.js new file mode 100644 index 0000000..94e9562 --- /dev/null +++ b/src/api/app.js @@ -0,0 +1,246 @@ +import { $HOST } from './host' + +/** + * 妗嗘灦鐢╝pi,涓嶇敤care,鎵撳寘鐢熶骇鐜鐨勫満鏅嚜鍔ㄥ幓闄� + * + * API鍛藉悕瑙勫垯 + * {妯″潡鍚峿_{璇锋眰鏂规硶}_{鍏蜂綋涓氬姟鍔熻兘鎻忚堪}_{缁撴瀯鎻忚堪} + * + * {妯″潡鍚峿锛� + * 渚嬪锛歟mdm emew + * {璇锋眰鏂规硶}锛� + * 1.涓�涓猘pi瀵瑰簲涓�涓姹傛柟娉� + * 渚嬪 get post delete put + * 2.涓�涓猘pi瀵瑰簲澶氫釜璇锋眰鏂规硶 // todo 濡備綍鑳界湅鍑烘槸浠�涔堣姹� + * 鈶� get post delete put =銆� all + * 鈶� post delete put =銆� pdp + * 鈶� post delete=銆� pd + * 鈶� delete put =銆媎p + * 鈶� get post delete => gpd + * + * {鍏蜂綋涓氬姟鍔熻兘鎻忚堪}: + * + * {缁撴瀯鎻忚堪}: + * 杩斿洖澶氭潯鏁版嵁鐢� list + * 杩斿洖涓�鏉℃暟鎹敤 detail 鎴栨槸 one + * + */ +// 鑿滃崟 +export const BASE_GET_MENU = $HOST + '/v1/permissions/menu' + +/** + * AAA鏉冮檺鐩稿叧 + * + */ +// 鐢ㄦ埛鐧诲叆 +export const AAA_POST_USER_LOGIN = $HOST + '/api/public/v1/permissions/user/login' +// 鐢ㄦ埛鐧诲嚭 +export const AAA_POST_USER_LOGOUT = $HOST + '/api/public/v1/permissions/user/logout' +// 鑾峰彇鐢ㄦ埛淇℃伅 +export const AAA_GET_USER_INFO = $HOST + '/api/public/v1/permissions/user/info' +// 鑾峰彇椤甸潰璧勬簮 +export const AAA_GET_PAGES_RESOURCE = $HOST + '/api/public/v1/permissions/pagesResource' +// 鑾峰彇鍏ㄩ儴浜哄憳鍒楄〃 +export const AAA_GET_USER_LIST = $HOST + '/api/public/v1/permissions/user/list' + +/************************************************************************************************************ + * 涓氬姟api鍖哄煙 + * + ************************************************************************************************************/ + +/** + * 涓绘暟鎹鐞� + * + */ +// 鏂囦欢涓嬭浇涓婁紶 +export const MDM_POST_FILE_UPLOAD = $HOST + '/hcstms/client/file/upload' + +// 鑾峰彇褰撳墠鐧诲綍鐨勬墍灞炰紒涓� +export const MDM_GET_USER_ORG = $HOST + '/hcstms/client/organization/getUserOrg' + +// 鍏ㄩ儴鐨勬壙杩愬晢銆佽鍗稿彴銆佸嵄搴熷悕褰曘�佷紒涓氬嵄搴熶俊鎭�佷紒涓氬嵄鍖栧搧淇℃伅 +export const MDM_GET_CARRIER_TOTAL = $HOST + '/hcstms/client/carriers/list' +export const MDM_GET_LOADDOCK_TOTAL = $HOST + '/hcstms/client/load-dock/list' +export const MDM_GET_HWSITEMS_TOTAL = $HOST + '/hcstms/client/hws-items/list' +export const MDM_GET_COMPANY_HWS_ITEMS = $HOST + '/hcstms/client/company-hws-items/list/' +export const MDM_GET_COMPANY_HCS_ITEMS = $HOST + '/hcstms/client/company-hcs-items/list/' + +// 鑾峰彇浼佷笟璧勬簮搴撳叧鑱旀壙杩愬晢鎴栬�呭缃晢 resourceType浼佷笟璧勬簮搴撶被鍨� +export const MDM_GET_COMPANY_RESOURCE_LIB_ITEMS = $HOST + '/hcstms/client/company-resource-lib/resource/list' + +// 鑾峰彇鐧诲綍浜虹浉鍏虫壙杩愬晢 +export const MDM_GET_USER_CARRIERS = $HOST + '/hcstms/client/company-resource-lib/user/carriers' + +// 璧勬簮搴撶鐞� +export const MDM_GET_HWSITEMS_PAGINATION = $HOST + '/hcstms/client/hws-items/pager' +export const MDM_GET_HWSITEMS_DETAIL = $HOST + '/hcstms/client/hws-items/id/{$hwsItemId}' +export const MDM_DELETE_HWSITEMS = $HOST + '/hcstms/client/hws-items/batch' +export const MDM_ALL_HWSITEMS = $HOST + '/hcstms/client/hws-items/item' +export const MDM_POST_IMPORT_HWSITEMS = $HOST + '/hcstms/client/hws-items/importExcel' +// 杞Щ搴� +export const MDM_GET_TRANSTOR_LIST = $HOST + '/hcstms/client/hws-transit-depot/pager' +export const MDM_GET_TRANSTOR_DETAIL = $HOST + '/hcstms/client/hws-transit-depot/id/{$hwsTransitId}' +export const MDM_DELETE_TRANSTOR = $HOST + '/hcstms/client/hws-transit-depot/batch' +export const MDM_ALL_TRANSTOR = $HOST + '/hcstms/client/hws-transit-depot/item' +export const MDM_GET_IMPORT_TRANSTOR = $HOST + '/hcstms/client/hws-transit-depot/import/excel' +export const MDM_GET_EXPORT_TRANSTOR = $HOST + '/hcstms/client/hws-transit-depot/export/excel/template' +// 澶勭疆鍟� +export const MDM_GET_DISPONER_LIST = $HOST + '/hcstms/client/hws-disposal-agent/pager' +export const MDM_GET_DISPONER_DETAIL = $HOST + '/hcstms/client/hws-disposal-agent/id/{$hwsAgentId}' +export const MDM_DELETE_DISPONER = $HOST + '/hcstms/client/hws-disposal-agent/batch' +export const MDM_ALL_DISPONER = $HOST + '/hcstms/client/hws-disposal-agent/item' +// 鎵胯繍鍟� +export const MDM_GET_CARRIER_LIST = $HOST + '/hcstms/client/carriers/pager' +export const MDM_GET_CARRIER_DETAIL = $HOST + '/hcstms/client/carriers/id/{$carrierId}' +export const MDM_DELETE_CARRIER = $HOST + '/hcstms/client/carriers/batch' +export const MDM_ALL_CARRIER = $HOST + '/hcstms/client/carriers/item' +// 杞﹁締 +export const MDM_GET_VEHICLES_LIST = $HOST + '/hcstms/client/vehicles/pager' +export const MDM_GET_VEHICLES_DETAIL = $HOST + '/hcstms/client/vehicles/id/{$vehicleId}' +export const MDM_DELETE_VEHICLES = $HOST + '/hcstms/client/vehicles/batch' +export const MDM_ALL_VEHICLES = $HOST + '/hcstms/client/vehicles/item' +export const MDM_POST_IMPORT_VEHICLES = $HOST + '/hcstms/client/vehicles/import/excel' +export const MDM_GET_EXPORT_VEHICLES = $HOST + '/hcstms/client/vehicles/export/excel' +// 鑸硅埗 +export const MDM_GET_SHIPS_LIST = $HOST + '/hcstms/client/ships/pager' +export const MDM_GET_SHIPS_DETAIL = $HOST + '/hcstms/client/ships/id/{$shipId}' +export const MDM_DELETE_SHIPS = $HOST + '/hcstms/client/ships/batch' +export const MDM_ALL_SHIPS = $HOST + '/hcstms/client/ships/item' +export const MDM_POST_IMPORT_SHIPS = $HOST + '/hcstms/client/ships/import/excel' +export const MDM_GET_EXPORT_SHIPS = $HOST + '/hcstms/client/ships/export/excel' +// 閾佽矾鑷杞� +export const MDM_GET_TRAINSOWNED_LIST = $HOST + '/hcstms/client/trains-owned/pager' +export const MDM_GET_TRAINSOWNED_DETAIL = $HOST + '/hcstms/client/trains-owned/id/{$trainsId}' +export const MDM_DELETE_TRAINSOWNED = $HOST + '/hcstms/client/trains-owned/batch' +export const MDM_ALL_TRAINSOWNED = $HOST + '/hcstms/client/trains-owned/item' +export const MDM_GET_IMPORT_TRAINSOWNED = $HOST + '/hcstms/client/trains-owned/importExcel' +export const MDM_GET_EXPORT_TRAINSOWNED = $HOST + '/hcstms/client/trains-owned/exportExcel' +// 椹炬娂浜哄憳 +export const MDM_GET_DRIVERS_LIST = $HOST + '/hcstms/client/drivers/pager' +export const MDM_GET_DRIVERS_DETAIL = $HOST + '/hcstms/client/drivers/id/{$driverId}' +export const MDM_DELETE_DRIVERS = $HOST + '/hcstms/client/drivers/batch' +export const MDM_ALL_DRIVERS = $HOST + '/hcstms/client/drivers/item' +export const MDM_GET_IMPORT_DRIVERS = $HOST + '/hcstms/client/drivers/importExcel' +export const MDM_GET_EXPORT_DRIVERS = $HOST + '/hcstms/client/drivers/exportExcel' +// 瑁呭嵏鍙扮淮鎶� +export const MDM_GET_LOADDOCK_LIST = $HOST + '/hcstms/client/load-dock/pager' +export const MDM_GET_LOADDOCK_DETAIL = $HOST + '/hcstms/client/load-dock/id/{$loadDockId}' +export const MDM_DELETE_LOADDOCK = $HOST + '/hcstms/client/load-dock/batch' +export const MDM_ALL_LOADDOCK = $HOST + '/hcstms/client/load-dock/item' +export const MDM_GET_IMPORT_LOADDOCK = $HOST + '/hcstms/client/load-dock/importExcel' +export const MDM_GET_EXPORT_LOADDOCK = $HOST + '/hcstms/client/load-dock/exportExcel' +// 瑙嗛鐩戞帶 +export const MDM_GET_VIDEOMON_LIST = $HOST + '/hcstms/client/video-monitor/pager' +export const MDM_GET_VIDEOMON_DETAIL = $HOST + '/hcstms/client/video-monitor/id/{$videoMonitorId}' +export const MDM_DELETE_VIDEOMON = $HOST + '/hcstms/client/video-monitor/batch' +export const MDM_ALL_VIDEOMON = $HOST + '/hcstms/client/video-monitor/item' +// 浼佷笟璧勬簮搴� +export const MDM_GET_COMPANYLIB = $HOST + '/hcstms/client/company-resource-lib/pager' +export const MDM_POST_COMPANYLIB = $HOST + '/hcstms/client/company-resource-lib/item' +export const MDM_DELETE_COMPANYLIB = $HOST + '/hcstms/client/company-resource-lib/batch' +export const MDM_GET_COMPANY_BLACKLIST = $HOST + '/hcstms/client/company-blacklist/id' +export const MDM_GET_COMPANY_BLACKLISTHISTORY = $HOST + '/hcstms/client/company-blacklist-history/pager' +export const MDM_GET_BLACKLISTHISTORY = $HOST + '/hcstms/client/company-blacklist-history/id/' +export const MDM_GET_BLACKLISTHISTORY_DETAIL = $HOST + '/hcstms/client/company-blacklist-history/id/{$companyBlacklistId}' +export const MDM_POST_COMPANY_BLACKLIST = $HOST + '/hcstms/client/company-blacklist/item' +export const MDM_DELETE_COMPANY_BLACKLIST = $HOST + '/hcstms/client/company-blacklist/batch' +export const MDM_DELETE_COMPANY_FOCUS = $HOST + '/hcstms/client/company-resource-lib/focus' +// 缁勭粐鏈烘瀯 +export const MDM_GET_ORGANIZATION = $HOST + '/hcstms/client/organization/list' +export const MDM_GET_ORGANIZATION_TABLE = $HOST + '/hcstms/client/organization/pager' +export const HWM_GET_ORGANIZATION_DETAIL = $HOST + '/hcstms/client/organization/id/{$orgId}' +export const MDM_ALL_ORGANIZATION = $HOST + '/hcstms/client/organization/item' +export const MDM_DELETE_ORGANIZATION = $HOST + '/hcstms/client/organization/batch' +export const MDM_GET_CHECKORGCODE = $HOST + '/hcstms/client/organization/checkOrgCode' + +// 杩愯緭瀹夊叏绠$悊---鏁忔劅鍖哄煙绠$悊 +export const HWM_GET_SENSITIVE_AREA_LIST = $HOST + '/hcstms/client/hws-sensitive-area/pager' +export const HWM_GET_SENSITIVE_AREA_DETAIL = $HOST + '/hcstms/client/hws-sensitive-area/id/{$hwsSensitiveAreaId}' +export const HWM_GET_SENSITIVE_AREA_CAR = $HOST + '/hcstms/client/hws-sensitive-area/findVehiclePage' +export const HWM_GET_SENSITIVE_AREA_SHIP = $HOST + '/hcstms/client/hws-sensitive-area/findShipsPage' + +export const HWM_ALL_SENSITIVE_AREA = $HOST + '/hcstms/client/hws-sensitive-area/item' +export const HWM_DELETE_SENSITIVE_AREA = $HOST + '/hcstms/client/hws-sensitive-area/batch' +export const HWM_GET_SENSITIVE_TRANSINFO = $HOST + '/hcstms/client/hws-sensitive-area/getTransInfo' + +// 杩愯緭瀹夊叏绠$悊---杩愬崟绠$悊 +export const HWM_GET_TRANSORDER_LIST = $HOST + '/hcstms/client/trans-order/pager' +export const HWM_GET_TRANSORDER_DETAIL = $HOST + '/hcstms/client/trans-order/id/{$id}' +export const HWM_ALL_TRANSORDER = $HOST + '/hcstms/client/trans-order/item' +export const HWM_DELETE_TRANSORDER = $HOST + '/hcstms/client/trans-order/batch' + +// 鍗卞簾---鏁忔劅鍖哄煙鎻愰啋 +export const HWM_GET_SENSITIVE_AREA_WARN_LIST = $HOST + '/hcstms/client/sensitive-area-warn/pager' +export const HWM_EXPORT_SENSITIVE_AREA_WARN = $HOST + '/hcstms/client/sensitive-area-warn/export/excel' +export const HWM_GET_SENSITIVE_AREA_WARN = $HOST + '/hcstms/client/sensitive-area-warn /item' + +// 鍗卞簾---琛岄┒璺緞绠$悊 +export const HWM_GET_TRAVELPATH_LIST = $HOST + '/hcstms/client/hws-travel-path/pager' +export const HWM_GET_TRAVELPATH_DETAIL = $HOST + '/hcstms/client/hws-travel-path/id/{$hwsTravelPathId}' +export const HWM_DELETE_TRAVELPATH = $HOST + '/hcstms/client/hws-travel-path/batch' +export const HWM_ALL_TRAVELPATH = $HOST + '/hcstms/client/hws-travel-path/item' +export const HWM_GET_TRAVELPATH_CAR = $HOST + '/hcstms/client/hws-travel-path/findVehiclePage' +export const HWM_GET_TRAVELPATH_SHIP = $HOST + '/hcstms/client/hws-travel-path/findShipsPage' +// 鍗卞簾---琛岄┒璺緞鎻愰啋 +export const HWM_GET_TRAVEL_PATH_REMIND_LIST = $HOST + '/hcstms/client/travel-path-warn/pager' +export const HWM_EXPORT_TRAVEL_PATH_REMIND = $HOST + '/hcstms/client/travel-path-warn/export/excel' + +// 鏁忔劅鍖哄煙鎻愰啋锛岃椹惰矾缁忔彁閱掕繍鍗曡鎯� +export const HWM_GET_TRANS_ORDER = $HOST + '/hcstms/client/trans-order/list' + +// 鐢ㄦ埛绠$悊 +export const MDM_GET_USER_MANAGE_LIST = $HOST + '/hcstms/client/users/pager' +export const MDM_GET_USER_MANAGE_DETAIL = $HOST + '/hcstms/client/users/id/{$userId}' +export const MDM_GET_USER_ACCOUNT_DETAIL = $HOST + '/hcstms/client/users/account/{$account}' +export const MDM_ALL_USER_MANAGE = $HOST + '/hcstms/client/users/item' +export const MDM_DELETE_USER_MANAGE = $HOST + '/hcstms/client/users/batch' +export const MDM_POST_USER_MANAGE = $HOST + '/hcstms/client/users/importExcel' +export const MDM_GET_USER_MANAGE = $HOST + '/hcstms/client/users/importExcelTemp' + +// 閫氱煡閰嶇疆 +export const MDM_GET_NOTICE_CONFIG_LIST = $HOST + '/hcstms/client/notice-config/pager' +export const MDM_GET_NOTICE_CONFIG_DETAIL = $HOST + '/hcstms/client/notice-config/id/{$noticeConfigId}' +export const MDM_ALL_NOTICE_CONFIG = $HOST + '/hcstms/client/notice-config/item' +export const MDM_DELETE_NOTICE_CONFIG = $HOST + '/hcstms/client/notice-config/batch' +// export const MDM_GET_USER_MANAGE = $HOST + '/hcstms/client/users/importExcelTemp' + +// 浼佷笟鍗卞簾淇℃伅 +export const MDM_GET_COMHWSITEMS_LIST = $HOST + '/hcstms/client/company-hws-items/pager' +export const MDM_GET_COMHWSITEMS_DETAIL = $HOST + '/hcstms/client/company-hws-items/id/{$companyHwsItemId}' +export const MDM_ALL_COMHWSITEMS = $HOST + '/hcstms/client/company-hws-items/item' +export const MDM_DELETE_COMHWSITEMS = $HOST + '/hcstms/client/company-hws-items/batch' + +// 鍗卞寲鍝佸悕褰� +export const MDM_GET_HAZARDOUS_CHEMICALS_LIST = $HOST + '/hcstms/client/hcs-items/pager' +export const MDM_GET_HAZARDOUS_CHEMICALS_DETAIL = $HOST + '/hcstms/client/hcs-items/id/{$hcsItemId}' +export const MDM_ALL_HAZARDOUS_CHEMICALS = $HOST + '/hcstms/client/hcs-items/item' +export const MDM_DELETE_HAZARDOUS_CHEMICALS = $HOST + '/hcstms/client/hcs-items/batch' +export const MDM_POST_IMPORT_HAZARDOUS_CHEMICALS = $HOST + '/hcstms/client/hcs-items/importExcel' +export const MDM_GET_HAZARDOUS_CHEMICALS_CAS = $HOST + '/hcstms/client/hcs-items/list' + +// 浼佷笟鍗卞寲鍝佷俊鎭� +export const MDM_GET_HAZARDOUS_CHEMICALS_ENTERPRISES_LIST = $HOST + '/hcstms/client/company-hcs-items/pager' +export const MDM_GET_HAZARDOUS_CHEMICALS_ENTERPRISES_DETAIL = $HOST + '/hcstms/client/company-hcs-items/id/{$companyHcsItemId}' +export const MDM_ALL_HAZARDOUS_CHEMICALS_ENTERPRISES = $HOST + '/hcstms/client/company-hcs-items/item' +export const MDM_DELETE_HAZARDOUS_CHEMICALS_ENTERPRISES = $HOST + '/hcstms/client/company-hcs-items/batch' + +// 杞Щ鑱斿崟绠$悊 +export const MDM_GET_HWSTRANSFER_LIST = $HOST + '/hcstms/client/hws-transfer-order/pager' +export const MDM_GET_HWSTRANSFER_DETAIL = $HOST + '/hcstms/client/hws-transfer-order/id/{$hwsTransferOrderId}' +export const MDM_ALL_HWSTRANSFER = $HOST + '/hcstms/client/hws-transfer-order/item' +export const MDM_DELETE_HWSTRANSFER = $HOST + '/hcstms/client/hws-transfer-order/batch' +// 鏍规嵁鎵胯繍鍟唅d鏌ヨ杞﹂噺鏁版嵁 +export const MDM_GET_HWSTRANSFER_VEHICLES_DETAIL = $HOST + '/hcstms/client/vehicles/list' + +// 鍗卞簾杩愯緭棣栭〉 +export const HWS_GET_TRANSPORTATION = $HOST + '/hcstms/client/statistics/hws/transportation' +export const HWS_GET_TRANSFER_TREND = $HOST + '/hcstms/client/statistics/hws/trend' +export const HWS_GET_KIND = $HOST + '/hcstms/client/statistics/hws/kind' +export const HWS_GET_SGIS = $HOST + '/hcstms/data/hws-sgis/groupByOrgCode' + +// 缁煎悎鏌ヨ +export const TMM_GET_ACCESS = $HOST + '/hcstms/client/organization/link/pager' +export const TMM_GET_CAR = $HOST + '/hcstms/client/company-resource-lib/transport/pager' +export const TMM_GET_BUSINESS = $HOST + '/hcstms/client/company-resource-lib/transport/pager' +export const TMM_GET_ALERT = $HOST + '/hcstms/client/alarm/vehicle/statistics/pager' +export const TMM_GET_LEVEL = $HOST + '/hcstms/client/company-resource-lib/qualification/pager' diff --git a/src/api/host.js b/src/api/host.js new file mode 100644 index 0000000..952df8f --- /dev/null +++ b/src/api/host.js @@ -0,0 +1,6 @@ +/** + * 鏈嶅姟HOST瀹氫箟 + */ +export const $HOST = process.env.VUE_APP_API_HOST +// map鏈嶅姟 +export const $HOST_MAP_SERVICE = process.env.VUE_APP_MAP_SERVICE diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 0000000..ebe4694 --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,4 @@ +import * as map from './map' +import * as app from './app' + +export default Object.assign({}, map, app) diff --git a/src/api/map.js b/src/api/map.js new file mode 100644 index 0000000..d09fe71 --- /dev/null +++ b/src/api/map.js @@ -0,0 +1,33 @@ +import { $HOST } from './host' + +/** + * 妗嗘灦鐢╝pi,涓嶇敤care,鎵撳寘鐢熶骇鐜鐨勫満鏅嚜鍔ㄥ幓闄� + * + * API鍛藉悕瑙勫垯 + * {妯″潡鍚峿_{璇锋眰鏂规硶}_{鍏蜂綋涓氬姟鍔熻兘鎻忚堪}_{缁撴瀯鎻忚堪} + * + * {妯″潡鍚峿锛� + * 渚嬪锛歟mdm emew + * {璇锋眰鏂规硶}锛� + * 1.涓�涓猘pi瀵瑰簲涓�涓姹傛柟娉� + * 渚嬪 get post delete put + * 2.涓�涓猘pi瀵瑰簲澶氫釜璇锋眰鏂规硶 // todo 濡備綍鑳界湅鍑烘槸浠�涔堣姹� + * 鈶� get post delete put =銆� all + * 鈶� post delete put =銆� pdp + * 鈶� post delete=銆� pd + * 鈶� delete put =銆媎p + * 鈶� get post delete => gpd + * + * {鍏蜂綋涓氬姟鍔熻兘鎻忚堪}: + * + * {缁撴瀯鎻忚堪}: + * 杩斿洖澶氭潯鏁版嵁鐢� list + * 杩斿洖涓�鏉℃暟鎹敤 detail 鎴栨槸 one + * + */ + +// map鍦板浘 +export const MAP_GET_TRANSPORTATION = $HOST + '/hcstms/client/hws-statistics/transportation/getBySector' +export const MAP_GET_TRANSFER_TREND = $HOST + '/hcstms/client/hws-statistics/trend/groupBySector' +export const MAP_GET_KIND = $HOST + '/hcstms/client/hws-statistics/stats/groupBySector?orgSector=' +export const MAP_GET_SGIS = $HOST + '/hcstms/data/hws-sgis/groupByOrgCode' diff --git a/src/api/mapApi.js b/src/api/mapApi.js new file mode 100644 index 0000000..555d1c5 --- /dev/null +++ b/src/api/mapApi.js @@ -0,0 +1,125 @@ +import $http from '@utils/axios' +import * as Service from './services' +// const $HOST = 'http://10.238.221.113' +// 娴嬭瘯鐜IP锛歨ttp://10.238.221.113 +export default { + + /** **************** 涓�銆佽椹惰矾寰勭鐞嗘帴鍙o細*****************/ + // 1銆� 鍒嗛〉鏌ヨ琛岄┒璺緞鏁版嵁 + getTravelPath(data) { + return $http.get(Service.HcstmsClientHwsTravelPathPager, data) + }, + // 2.鏍规嵁ID鏌ヨ琛岄┒璺緞鏁版嵁 hwsTravelPathId + getTravelPathByID(id) { + return $http.get(Service.HcstmsClientHwsTravelPathId + id, {}) + // return $http.get($HOST + '/hcstms/client/hws-travel-path/id/', data) + }, + // 3. 鑾峰彇杞﹁締鍜岃埞鑸朵俊鎭暟鎹� transType carriersName + getTravelPathTransInfo(data) { + return $http.get(Service.HcstmsClientHwsTravelPathGetTransInfo, data) + }, + // 4. 鍒嗛〉鑾峰彇鍏宠仈杞﹁締淇℃伅鏁版嵁 current=1&size=10&hwsTravelPathId=21 + getTravelPathFindVehiclePage(data) { + return $http.get(Service.HcstmsClientHwsTravePathFindVehiclePage, data) + }, + // 5. 鍒嗛〉鑾峰彇鍏宠仈鑸硅埗淇℃伅鏁版嵁 current=1&size=10&hwsTravelPathId=18 + getTravelPathFindShipsPage(data) { + return $http.get(Service.HcstmsClientHwsTravelPathFindShipsPage, data) + }, + /** ******************************* 浜屻�佽椹惰矾寰勬彁閱掓帴鍙o細*********************************/ + // 1.鍒嗛〉鏌ヨ琛岄┒璺緞鎻愰啋鏁版嵁 current=1&size=10 + getTravelPathWarnPager(data) { + return $http.get(Service.HcstmsClientTravelPathWarnPager, data) + }, + // 2.娣诲姞琛岄┒璺緞鎻愰啋鏁版嵁 transNumber transType hwsTravelPathName warnReason enterTime + postTravelPathItem(data) { + return $http.post(Service.HcstmsClientTravelPathItem, data) + }, + + /* ******************************** 涓夈�佺粍缁囨満鏋勬帴鍙o細*********************************/ + // 1銆佹牴鎹澘鍧楃紪鐮佹煡璇紒涓氬垪琛ㄤ俊鎭帴鍙� sector=1111& serviceType=1111 + getOrganizationCompanyList(data) { + return $http.get(Service.GetOrganizationCompanyList, data) + }, + /* ******************************** 鍥涖�佹�婚儴-鍗卞寲鍝侀椤垫帴鍙o細*********************************/ + // 1銆佹煡璇㈠湪閫旇浇鍏枫�佸綋鏃ヨ繍閲忋�佸綋鏃ヨ繍鍗曘�侀璀︽暟閲忔帴鍙� sector=111&orgCode=1111 + getStatistics(data) { + return $http.get(Service.GetStatistics, data) + }, + // 2銆佹煡璇㈡澘鍧楃殑杞﹁締鏈�鏂颁綅缃俊鎭� ?sector=111&orgCode=1111 + getVehiclePositionReal(data) { + return $http.get(Service.GetVehiclePositionReal, data) + }, + // 3銆佹煡璇㈣溅杈嗗巻鍙茶建杩逛俊鎭� ?vehicleNumber =111&queryDate =2020-11-20 + getVehiclePositionHistory(data) { + return $http.get(Service.GetVehiclePositionHistory, data) + }, + // 4銆佽溅杈嗘帴鍏ユ儏鍐电粺璁℃帴鍙� + getStatisticsVehiclePosition(data) { + return $http.get(Service.GetStatisticsVehiclePosition, data) + }, + // 5銆佹姤璀︾骇鍒粺璁℃帴鍙� startDate endDate + getStatisticsAlarmTrend(data) { + return $http.get(Service.GetStatisticsAlarmTrend, data) + }, + // 6銆佹姤璀︿簨浠�(澶х被)缁熻鎺ュ彛 startDate endDate + getStatisticsAlarmEventType(data) { + return $http.get(Service.GetStatisticsAlarmEventType, data) + }, + // 7銆佹澘鍧楁姤璀︾粺璁℃帴鍙� startDate endDate + getStatisticsVehicleAlarm(data) { + return $http.get(Service.GetStatisticsVehicleAlarm, data) + }, + + /* ******************************** 浜斻�佺患鍚堢洃鎺ч椤�-鍗卞寲鍝侊細******************************** */ + // 1銆佹牴鎹溅杈嗙姸鎬佹煡璇㈣溅杈嗕俊鎭� 鏍规嵁杞﹁締鐘舵��(姝e父銆佹姤璀︺�佺绾�)鏌ヨ杩愬崟杞﹁締浣嶇疆淇℃伅 orgSector orgCode vehicleStatus + + getTransOrderVehiclePosition(data) { // todo 杩欓噷鐨勬帴鍙i厤缃病鏈夌悊鏄庣櫧 + return $http.get(Service.vehiclePosition, data) + // return $http.get($HOST + '/hcstms/client/trans-order/vehicle/position', data) + }, + // 2銆佹煡璇㈠嵄鍖栧搧鍦ㄩ�旇溅杈嗐�佸綋鏃ヨ繍閲忋�佸綋鏃ヨ繍鍗曘�侀璀︽暟閲忔帴鍙� 鎺ュ彛鍜屾�婚儴-鍗卞寲鍝侀椤电1涓帴鍙d竴鏍� + + // 3銆佸垎椤垫煡璇㈠嵄鍖栧搧杩愬崟淇℃伅 transNo=111&carrierName=1111&transMode=1&vehicleNo=111&orderState=1 + // transNo carrierName transMode vehicleNo orderState size current + getTransOrderlist(data) { // todo 杩欓噷鐨勬帴鍙i厤缃病鏈夌悊鏄庣櫧 + return $http.get(Service.HcstmsClientTransOrderPager, data) + // return $http.get($HOST + '/hcstms/client/trans-order/pager', data) + }, + + getTransOrderlists(data) { // todo 杩欓噷鐨勬帴鍙i厤缃病鏈夌悊鏄庣櫧 + return $http.get(Service.HcstmsClientTransOrderPagers, data) + // return $http.get($HOST + '/hcstms/client/trans-order/pager', data) + }, + + /* ******************************** 鍏�� 瀹夊叏棰勮鎶ヨ锛�******************************** */ + // 1銆佹牴鎹姤璀﹀ぇ灏忕被銆佺骇鍒煡璇㈡姤璀︿俊鎭� ?alarmCategory=1&alarmType=1&alarmlevel=3 + getVehicleAlarmList(data) { + return $http.get(Service.HcstmsClientAlarmVehicleRealPager, data) + // return $http.get($HOST + '/hcstms/client/vehicle/alarm/list', data) + }, + // 2銆佹姤璀︽暟閲忕粺璁℃帴鍙� startDate:String endDate:String orgCode:String orgSector:String + getAlarmVehicleReal(data) { + return $http.get(Service.HcstmsClientAlarmVehicleRealPager, data) + }, + // 3銆佹牴鎹溅鐗屽彿鏌ヨ杞﹁締鏈�鏂拌建杩逛俊鎭帴鍙� ?vehicleNumber =111 + getRealVehiclePosition(data) { + return $http.get(Service.HcstmsClientPositionVehicleRealVehiclePosition, data) + }, + // 4銆佹牴鎹溅鐗屽彿鏌ヨ杩愬崟(杩愯緭涓�)鎺ュ彛 ?vehicleNo=3&orderState= + getTransOrderList(data) { + return $http.get(Service.HcstmsClientTransorderList, data) + }, + // 5銆佹牴鎹溅鐗屽彿鏌ヨ瀹炴椂鎶ヨ淇℃伅鎺ュ彛 ?vehicleNo=娌狣86519 + getAlarmVehicleRealDetail(data) { + return $http.get(Service.HcstmsClientAlarmVehicleRealDetail, data) + }, + + /* ******************************** 涓冦�佸嵄搴熻繍杈撻椤碉細******************************** */ + // 1銆佹煡璇㈠湪閫旇浇鍏枫�佽浆绉婚噺銆佽浆绉诲崟鏁版嵁 orgSector orgCode + getStatisticsSgisGroupByOrgCode(data) { + // return $http.get($HOST + '/hcstms/client/hws-statistics/sgis/groupByOrgCode', data) + return $http.get(Service.HcstmsClientStatisticsHwsSgis, data) + } + +} diff --git a/src/api/services.js b/src/api/services.js new file mode 100644 index 0000000..a2426ed --- /dev/null +++ b/src/api/services.js @@ -0,0 +1,107 @@ +import { $HOST } from './host' + +const $TESTHOST = $HOST + +let $MAIN_HOST = $TESTHOST +// let $MAIN_HOST = $HOST + +export const WAYBILL = $HOST + '/hcstms/client/trans-order/list' +export const FENCELIST = $HOST + '/route/select' +// 浜嬩欢绫诲瀷 /hcstms/client/hcs-statistics/alarm/eventType +export const eventTypeList = $TESTHOST + '/hcstms/client/hcs-statistics/alarm/eventType' +// 鏉垮潡缁熻 /hcstms/client/hcs-statistics/vehicle/alarm +export const vehicleAlarmList = $TESTHOST + '/hcstms/client/hcs-statistics/vehicle/alarm' + +/** * 椤堕儴闈㈡澘 缁熻淇℃伅 */ +// 鍦ㄩ�旇繍杞藉伐鍏锋�绘暟 +// export const CountRoadVehicle = $HOST + '/warning/warningStats/getCountRoadVehicle' +// 褰撴棩杩愰噺缁熻 +// export const CountDayVolume = $HOST + '/warning/warningStats/getCountDayVolume' +// 褰撴棩杩愬崟缁熻 +// export const CountDayWaybill = $HOST + '/warning/warningStats/getCountDayWaybill' +// 棰勮鎬绘暟 +// export const CountTotal = $HOST + '/warning/warningStats/getCountTotal' + +// 鏂版帴鍙� +export const Summary = $TESTHOST + '/hcstms/client/hws/statistics' +// 杞﹁締鎺ュ叆鎯呭喌缁熻鎺ュ彛 +export const VehicleAccessStatisticsInterface = $TESTHOST + '/hcstms/client/hcs-statistics/vehicle/position' +// 鍦ㄩ�旇溅杈� +export const SysAuthCode = '0' +export const WarningInit = $HOST + '/warning/rewrite/transOrder/getWarningInit' +// 杞﹁締鎶ヨ淇℃伅鏌ヨ鎺ュ彛 +export const alarmInfo = $TESTHOST + '/hcstms/client/vehicle/alarm/list' + +// 鍗卞寲浼佷笟鎺ュ彛 +export const CompanyList = $TESTHOST + '/hcstms/client/organization/company/list' +// 杞﹁締鎺ュ彛 +export const vehiclePosition = $TESTHOST + '/hcstms/client/trans-order/vehicle/position' + +// 浼佷笟瀹屾垚杞Щ閲� +export const CorpTransVolumeUrl = $HOST + '/hcstms/client/hws-statistics/sgis/groupByOrgCode' +// 鍒嗛〉鏌ヨ鍗卞寲鍝佽繍鍗曚俊鎭� +export const TransOrder = $TESTHOST + '/hcstms/client/trans-order/list' + +export const alarmTrend = $TESTHOST + '/hcstms/client/hcs-statistics/alarm/trend' + +// 鏂扮増API鍦板潃閰嶇疆 20201126鐗� --鐜嬮攼 +/* ********************************* 1銆佽椹惰矾寰勭鐞嗘帴鍙� *********************************** */ +// 1.1. 鍒嗛〉鏌ヨ琛岄┒璺緞鏁版嵁 +export const HcstmsClientHwsTravelPathPager = $MAIN_HOST + '/hcstms/client/hws-travel-path/pager' +// 1.2. 鏍规嵁ID鏌ヨ琛岄┒璺緞鏁版嵁 +export const HcstmsClientHwsTravelPathId = $MAIN_HOST + '/hcstms/client/hws-travel-path/id/' +// 1.3. 鑾峰彇杞﹁締鍜岃埞鑸朵俊鎭暟鎹� +export const HcstmsClientHwsTravelPathGetTransInfo = $MAIN_HOST + '/hcstms/client/hws-travel-path/getTransInfo' +// 1.4. 鍒嗛〉鑾峰彇鍏宠仈杞﹁締淇℃伅鏁版嵁 +export const HcstmsClientHwsTravePathFindVehiclePage = $MAIN_HOST + '/hcstms/client/hws-travel-path/findVehiclePage' +// 1.5. 鍒嗛〉鑾峰彇鍏宠仈鑸硅埗淇℃伅鏁版嵁 +export const HcstmsClientHwsTravelPathFindShipsPage = $MAIN_HOST + '/hcstms/client/hws-travel-path/findShipsPage' + +/* ********************************* 2銆佽椹惰矾寰勬彁閱掓帴鍙� *********************************** */ +// 2.1.鍒嗛〉鏌ヨ琛岄┒璺緞鎻愰啋鏁版嵁 +export const HcstmsClientTravelPathWarnPager = $MAIN_HOST + '/hsctms/client/travel-path-warn/pager' +// 2.2.娣诲姞琛岄┒璺緞鎻愰啋鏁版嵁 +export const HcstmsClientTravelPathItem = $MAIN_HOST + '/hcstms/client/hws-travel-path/item' + +/* ********************************* 3銆佺粍缁囨満鏋勬帴鍙o細*********************************/ +export const GetOrganizationCompanyList = $MAIN_HOST + '/hcstms/client/organization/company/list' + +/* ******************************** 4銆佹�婚儴-鍗卞寲鍝侀椤垫帴鍙o細*********************************/ +// 1銆佹牴鎹澘鍧楃紪鐮佹煡璇紒涓氬垪琛ㄤ俊鎭帴鍙� orgSector orgCode queryAlarm +export const GetStatistics = $MAIN_HOST + '/hcstms/client/statistics/hcs/sgis' +// 2銆佹煡璇㈡澘鍧楃殑杞﹁締鏈�鏂颁綅缃俊鎭� orgSector orgCode +export const GetVehiclePositionReal = $MAIN_HOST + '/hcstms/client/position/vehicle/real' +// 3銆佹煡璇㈣溅杈嗗巻鍙茶建杩逛俊鎭� ?vehicleNumber =111&queryDate =2020-11-20 +export const GetVehiclePositionHistory = $MAIN_HOST + '/hcstms/client/position/vehicle/history/pager' +// 4銆佽溅杈嗘帴鍏ユ儏鍐电粺璁℃帴鍙� +export const GetStatisticsVehiclePosition = $MAIN_HOST + '/hcstms/client/statistics/hcs/position/vehicle/sector' +// 5銆佽溅杈嗘姤璀︾骇鍒粺璁℃帴鍙� startDate endDate +export const GetStatisticsAlarmTrend = $MAIN_HOST + '/hcstms/client/statistics/hcs/alarm/vehicle/level' +// 6銆佹姤璀︿簨浠�(澶х被)缁熻鎺ュ彛 startDate endDate +export const GetStatisticsAlarmEventType = $MAIN_HOST + '/hcstms/client/statistics/hcs/alarm/vehicle/category' +// 7銆佹澘鍧楁姤璀︾粺璁℃帴鍙� startDate endDate +export const GetStatisticsVehicleAlarm = $MAIN_HOST + '/hcstms/client/statistics/hcs/alarm/vehicle/sector' +// 8銆丼GIS鍦板浘鏌ヨ涓嶅悓棰滆壊杞﹁締鎺ュ彛 鍚�5.2鎺ュ彛 + +/* ******************************** 5銆佹�婚儴-鍗卞寲鍝侀椤垫帴鍙o細*********************************/ +// 1銆佹煡璇㈠嵄鍖栧搧鍦ㄩ�旇溅杈嗐�佸綋鏃ヨ繍閲忋�佸綋鏃ヨ繍鍗曘�侀璀︽暟閲忔帴鍙� ?transNo=111&carrierName=1111&transMode=1&vehicleNo=111&orderState=1 +export const HcstmsClientStatisticsHcsSgis = $MAIN_HOST + '/hcstms/client/statistics/hcs/sgis' +// 2銆佸垎椤垫煡璇㈠嵄鍖栧搧杩愬崟鍙婅溅杈嗕俊鎭� ?transNo=111&carrierName=1111&transMode=1&vehicleNo=111&orderState=1 +export const HcstmsClientTransOrderPager = $MAIN_HOST + '/hcstms/client/trans-order/pager' +export const HcstmsClientTransOrderPagers = $MAIN_HOST + '/hcstms/client/trans-order/pagers' + +/* ********************************* 6銆佸畨鍏ㄩ璀︽姤璀� *********************************** */ +// 1. 鏍规嵁鎶ヨ澶у皬绫汇�佺骇鍒煡璇㈡姤璀︿俊鎭� +export const HcstmsClientAlarmVehicleRealPager = $MAIN_HOST + '/hcstms/client/alarm/vehicle/real/pager' +// 2. 鎶ヨ浜嬩欢(澶х被)缁熻鎺ュ彛 +export const HcstmsClientStatisticsHcsAlarmVehicleCategory = $MAIN_HOST + '/hcstms/client/statistics/hcs/alarm/vehicle/category' +// 3. 鏍规嵁杞︾墝鍙锋煡璇㈣溅杈嗘渶鏂拌建杩逛俊鎭帴鍙� +export const HcstmsClientPositionVehicleRealVehiclePosition = $MAIN_HOST + '/hcstms/client/position/vehicle/real/vehiclePosition' +// 4. 鏍规嵁杞︾墝鍙锋煡璇㈣繍鍗�(杩愯緭涓�)鎺ュ彛 +export const HcstmsClientTransorderList = $MAIN_HOST + '/hcstms/client/trans-order/list' +// 5. 鏍规嵁杞︾墝鍙锋煡璇㈠疄鏃舵姤璀︿俊鎭帴鍙� +export const HcstmsClientAlarmVehicleRealDetail = $MAIN_HOST + '/hcstms/client/alarm/vehicle/real/detail' + +/* ********************************* 7銆佹�婚儴-鍗卞簾杩愯緭棣栭〉 *********************************** */ +// 1. 鏌ヨ鍦ㄩ�旇浇鍏枫�佽浆绉婚噺銆佽浆绉诲崟鏁版嵁 +export const HcstmsClientStatisticsHwsSgis = $MAIN_HOST + '/hcstms/client/statistics/hws/sgis' diff --git a/src/app.config.js b/src/app.config.js new file mode 100644 index 0000000..d220b0d --- /dev/null +++ b/src/app.config.js @@ -0,0 +1,20 @@ +module.exports = { + title: '姹℃按闆ㄦ按绠$綉绠$悊', + version: 'V1.0', + projectName: 'sarn', + description: 'PC绔揩閫熷紑鍙戞鏋�', + useI18n: false, + cookieExpires: 1, + plugin: { + 'error-store': { + showInHeader: true, // 璁句负false鍚庝笉浼氬湪椤堕儴鏄剧ず閿欒鏃ュ織寰芥爣 + developmentOff: true // 璁句负true鍚庡湪寮�鍙戠幆澧冧笉浼氭敹闆嗛敊璇俊鎭� + } + }, + homeRouterName: 'Home', + loginRouteName: 'Login', + routeMode: 'history', + isProMACE: false, + tagNavCache: false, + defaultTheme: 'blue' +} diff --git a/src/assets/.DS_Store b/src/assets/.DS_Store new file mode 100644 index 0000000..66f4848 --- /dev/null +++ b/src/assets/.DS_Store Binary files differ diff --git a/src/assets/css/map/custom-popup.css b/src/assets/css/map/custom-popup.css new file mode 100644 index 0000000..cf742ef --- /dev/null +++ b/src/assets/css/map/custom-popup.css @@ -0,0 +1,36 @@ +.custom-popup .leaflet-popup-content-wrapper { + background-color: rgba(14, 45, 84, 0.9); + color: #ffffff; +} +.custom-popup .leaflet-popup-content-wrapper, .leaflet-popup-tip{ + background-color: rgba(14, 45, 84, 0.9); +} +.custom-popup a.leaflet-popup-close-button{ + /**/ + text-align: left; +} + +.custom-popup .leaflet-popup-content{ + text-align: left; +} +.leaflet-div-icon{ + background: transparent; + border:none; +} +.leaflet-popup-content-wrapper{ + background: transparent !important; +} +.custom-popup .leaflet-popup-tip{ + background-color: #3180a1 ; +} +.custom-popup .leaflet-popup-content{ + padding: 0 ; + margin: 0 ; + /*margin: -5px -5px !important;*/ +} + +.tipBgColor { + background: #F4DED4; + font-size: 10px; + /*height: 22px;*/ +} diff --git a/src/assets/css/map/magic.min.css b/src/assets/css/map/magic.min.css new file mode 100644 index 0000000..1cf6de2 --- /dev/null +++ b/src/assets/css/map/magic.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.magictime{animation-duration:1s;animation-fill-mode:both}.puffIn{animation-name:puffIn}@keyframes puffIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(2px)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}}.puffOut{animation-name:puffOut}@keyframes puffOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(2px)}}.vanishIn{animation-name:vanishIn}@keyframes vanishIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(90px)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}}.vanishOut{animation-name:vanishOut}@keyframes vanishOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1);filter:blur(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(2,2);filter:blur(20px)}}.boingInUp{animation-name:boingInUp}@keyframes boingInUp{0%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateX(-90deg)}50%{opacity:1;transform-origin:50% 0;transform:perspective(800px) rotateX(50deg)}100%{opacity:1;transform-origin:50% 0;transform:perspective(800px) rotateX(0)}}.boingOutDown{animation-name:boingOutDown}@keyframes boingOutDown{0%{opacity:1;transform-origin:100% 100%;transform:perspective(800px) rotateX(0) rotateY(0)}20%{opacity:1;transform-origin:100% 100%;transform:perspective(800px) rotateX(0) rotateY(10deg)}30%{opacity:1;transform-origin:0 100%;transform:perspective(800px) rotateX(0) rotateY(0)}40%{opacity:1;transform-origin:0 100%;transform:perspective(800px) rotateX(10deg) rotateY(10deg)}100%{opacity:0;transform-origin:100% 100%;transform:perspective(800px) rotateX(90deg) rotateY(0)}}.bombLeftOut{animation-name:bombLeftOut}@keyframes bombLeftOut{0%{opacity:1;transform-origin:50% 50%;transform:rotate(0);filter:blur(0)}50%{opacity:1;transform-origin:-100% 50%;transform:rotate(-160deg);filter:blur(0)}100%{opacity:0;transform-origin:-100% 50%;transform:rotate(-160deg);filter:blur(20px)}}.bombRightOut{animation-name:bombRightOut}@keyframes bombRightOut{0%{opacity:1;transform-origin:50% 50%;transform:rotate(0);filter:blur(0)}50%{opacity:1;transform-origin:200% 50%;transform:rotate(160deg);filter:blur(0)}100%{opacity:0;transform-origin:200% 50%;transform:rotate(160deg);filter:blur(20px)}}.magic{animation-name:magic}@keyframes magic{0%{opacity:1;transform-origin:100% 200%;transform:scale(1,1) rotate(0)}100%{opacity:0;transform-origin:200% 500%;transform:scale(0,0) rotate(270deg)}}.swap{animation-name:swap}@keyframes swap{0%{opacity:0;transform-origin:0 100%;transform:scale(0,0) translate(-700px,0)}100%{opacity:1;transform-origin:100% 100%;transform:scale(1,1) translate(0,0)}}.twisterInDown{animation-name:twisterInDown}@keyframes twisterInDown{0%{opacity:0;transform-origin:0 100%;transform:scale(0,0) rotate(360deg) translateY(-100%)}30%{transform-origin:0 100%;transform:scale(0,0) rotate(360deg) translateY(-100%)}100%{opacity:1;transform-origin:100% 100%;transform:scale(1,1) rotate(0) translateY(0)}}.twisterInUp{animation-name:twisterInUp}@keyframes twisterInUp{0%{opacity:0;transform-origin:100% 0;transform:scale(0,0) rotate(360deg) translateY(100%)}30%{transform-origin:100% 0;transform:scale(0,0) rotate(360deg) translateY(100%)}100%{opacity:1;transform-origin:0 0;transform:scale(1,1) rotate(0) translateY(0)}}.foolishIn{animation-name:foolishIn}@keyframes foolishIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotate(360deg)}20%{opacity:1;transform-origin:0 100%;transform:scale(.5,.5) rotate(0)}40%{opacity:1;transform-origin:100% 100%;transform:scale(.5,.5) rotate(0)}60%{opacity:1;transform-origin:0;transform:scale(.5,.5) rotate(0)}80%{opacity:1;transform-origin:0 0;transform:scale(.5,.5) rotate(0)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotate(0)}}.foolishOut{animation-name:foolishOut}@keyframes foolishOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotate(360deg)}20%{opacity:1;transform-origin:0 0;transform:scale(.5,.5) rotate(0)}40%{opacity:1;transform-origin:100% 0;transform:scale(.5,.5) rotate(0)}60%{opacity:1;transform-origin:0;transform:scale(.5,.5) rotate(0)}80%{opacity:1;transform-origin:0 100%;transform:scale(.5,.5) rotate(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotate(0)}}.holeOut{animation-name:holeOut}@keyframes holeOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1) rotateY(0)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0) rotateY(180deg)}}.swashIn{animation-name:swashIn}@keyframes swashIn{0%{opacity:0;transform-origin:50% 50%;transform:scale(0,0)}90%{opacity:1;transform-origin:50% 50%;transform:scale(.9,.9)}100%{opacity:1;transform-origin:50% 50%;transform:scale(1,1)}}.swashOut{animation-name:swashOut}@keyframes swashOut{0%{opacity:1;transform-origin:50% 50%;transform:scale(1,1)}80%{opacity:1;transform-origin:50% 50%;transform:scale(.9,.9)}100%{opacity:0;transform-origin:50% 50%;transform:scale(0,0)}}.spaceInDown{animation-name:spaceInDown}@keyframes spaceInDown{0%{opacity:0;transform-origin:50% 100%;transform:scale(.2) translate(0,200%)}100%{opacity:1;transform-origin:50% 100%;transform:scale(1) translate(0,0)}}.spaceInLeft{animation-name:spaceInLeft}@keyframes spaceInLeft{0%{opacity:0;transform-origin:0 50%;transform:scale(.2) translate(-200%,0)}100%{opacity:1;transform-origin:0 50%;transform:scale(1) translate(0,0)}}.spaceInRight{animation-name:spaceInRight}@keyframes spaceInRight{0%{opacity:0;transform-origin:100% 50%;transform:scale(.2) translate(200%,0)}100%{opacity:1;transform-origin:100% 50%;transform:scale(1) translate(0,0)}}.spaceInUp{animation-name:spaceInUp}@keyframes spaceInUp{0%{opacity:0;transform-origin:50% 0;transform:scale(.2) translate(0,-200%)}100%{opacity:1;transform-origin:50% 0;transform:scale(1) translate(0,0)}}.spaceOutDown{animation-name:spaceOutDown}@keyframes spaceOutDown{0%{opacity:1;transform-origin:50% 100%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:50% 100%;transform:scale(.2) translate(0,200%)}}.spaceOutLeft{animation-name:spaceOutLeft}@keyframes spaceOutLeft{0%{opacity:1;transform-origin:0 50%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:0 50%;transform:scale(.2) translate(-200%,0)}}.spaceOutRight{animation-name:spaceOutRight}@keyframes spaceOutRight{0%{opacity:1;transform-origin:100% 50%;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:100% 50%;transform:scale(.2) translate(200%,0)}}.spaceOutUp{animation-name:spaceOutUp}@keyframes spaceOutUp{0%{opacity:1;transform-origin:50% 0;transform:scale(1) translate(0,0)}100%{opacity:0;transform-origin:50% 0;transform:scale(.2) translate(0,-200%)}}.perspectiveDown{animation-name:perspectiveDown}@keyframes perspectiveDown{0%{transform-origin:0 100%;transform:perspective(800px) rotateX(0)}100%{transform-origin:0 100%;transform:perspective(800px) rotateX(-180deg)}}.perspectiveDownReturn{animation-name:perspectiveDownReturn}@keyframes perspectiveDownReturn{0%{transform-origin:0 100%;transform:perspective(800px) rotateX(-180deg)}100%{transform-origin:0 100%;transform:perspective(800px) rotateX(0)}}.perspectiveLeft{animation-name:perspectiveLeft}@keyframes perspectiveLeft{0%{transform-origin:0 0;transform:perspective(800px) rotateY(0)}100%{transform-origin:0 0;transform:perspective(800px) rotateY(-180deg)}}.perspectiveLeftReturn{animation-name:perspectiveLeftReturn}@keyframes perspectiveLeftReturn{0%{transform-origin:0 0;transform:perspective(800px) rotateY(-180deg)}100%{transform-origin:0 0;transform:perspective(800px) rotateY(0)}}.perspectiveRight{animation-name:perspectiveRight}@keyframes perspectiveRight{0%{transform-origin:100% 0;transform:perspective(800px) rotateY(0)}100%{transform-origin:100% 0;transform:perspective(800px) rotateY(180deg)}}.perspectiveRightReturn{animation-name:perspectiveRightReturn}@keyframes perspectiveRightReturn{0%{transform-origin:100% 0;transform:perspective(800px) rotateY(180deg)}100%{transform-origin:100% 0;transform:perspective(800px) rotateY(0)}}.perspectiveUp{animation-name:perspectiveUp}@keyframes perspectiveUp{0%{transform-origin:0 0;transform:perspective(800px) rotateX(0)}100%{transform-origin:0 0;transform:perspective(800px) rotateX(180deg)}}.perspectiveUpReturn{animation-name:perspectiveUpReturn}@keyframes perspectiveUpReturn{0%{transform-origin:0 0;transform:perspective(800px) rotateX(180deg)}100%{transform-origin:0 0;transform:perspective(800px) rotateX(0)}}.rotateDown{animation-name:rotateDown}@keyframes rotateDown{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateX(0) translateZ(0)}100%{opacity:0;transform-origin:50% 100%;transform:perspective(800px) rotateX(-180deg) translateZ(300px)}}.rotateLeft{animation-name:rotateLeft}@keyframes rotateLeft{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateY(0) translateZ(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateY(180deg) translateZ(300px)}}.rotateRight{animation-name:rotateRight}@keyframes rotateRight{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateY(0) translate3d(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateY(-180deg) translateZ(150px)}}.rotateUp{animation-name:rotateUp}@keyframes rotateUp{0%{opacity:1;transform-origin:0 0;transform:perspective(800px) rotateX(0) translateZ(0)}100%{opacity:0;transform-origin:50% 0;transform:perspective(800px) rotateX(180deg) translateZ(100px)}}.slideDown{animation-name:slideDown}@keyframes slideDown{0%{transform-origin:0 0;transform:translateY(0)}100%{transform-origin:0 0;transform:translateY(100%)}}.slideDownReturn{animation-name:slideDownReturn}@keyframes slideDownReturn{0%{transform-origin:0 0;transform:translateY(100%)}100%{transform-origin:0 0;transform:translateY(0)}}.slideLeft{animation-name:slideLeft}@keyframes slideLeft{0%{transform-origin:0 0;transform:translateX(0)}100%{transform-origin:0 0;transform:translateX(-100%)}}.slideLeftReturn{animation-name:slideLeftReturn}@keyframes slideLeftReturn{0%{transform-origin:0 0;transform:translateX(-100%)}100%{transform-origin:0 0;transform:translateX(0)}}.slideRight{animation-name:slideRight}@keyframes slideRight{0%{transform-origin:0 0;transform:translateX(0)}100%{transform-origin:0 0;transform:translateX(100%)}}.slideRightReturn{animation-name:slideRightReturn}@keyframes slideRightReturn{0%{transform-origin:0 0;transform:translateX(100%)}100%{transform-origin:0 0;transform:translateX(0)}}.slideUp{animation-name:slideUp}@keyframes slideUp{0%{transform-origin:0 0;transform:translateY(0)}100%{transform-origin:0 0;transform:translateY(-100%)}}.slideUpReturn{animation-name:slideUpReturn}@keyframes slideUpReturn{0%{transform-origin:0 0;transform:translateY(-100%)}100%{transform-origin:0 0;transform:translateY(0)}}.openDownLeft{animation-name:openDownLeft}@keyframes openDownLeft{0%{transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openDownLeftReturn{animation-name:openDownLeftReturn}@keyframes openDownLeftReturn{0%{transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}100%{transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}}.openDownRight{animation-name:openDownRight}@keyframes openDownRight{0%{transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openDownRightReturn{animation-name:openDownRightReturn}@keyframes openDownRightReturn{0%{transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}100%{transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}}.openUpLeft{animation-name:openUpLeft}@keyframes openUpLeft{0%{transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpLeftReturn{animation-name:openUpLeftReturn}@keyframes openUpLeftReturn{0%{transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}100%{transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}}.openUpRight{animation-name:openUpRight}@keyframes openUpRight{0%{transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}100%{transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openUpRightReturn{animation-name:openUpRightReturn}@keyframes openUpRightReturn{0%{transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}100%{transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}}.openDownLeftOut{animation-name:openDownLeftOut}@keyframes openDownLeftOut{0%{opacity:1;transform-origin:bottom left;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:bottom left;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.openDownRightOut{animation-name:openDownRightOut}@keyframes openDownRightOut{0%{opacity:1;transform-origin:bottom right;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:bottom right;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpLeftOut{animation-name:openUpLeftOut}@keyframes openUpLeftOut{0%{opacity:1;transform-origin:top left;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:top left;transform:rotate(110deg);animation-timing-function:ease-in-out}}.openUpRightOut{animation-name:openUpRightOut}@keyframes openUpRightOut{0%{opacity:1;transform-origin:top right;transform:rotate(0);animation-timing-function:ease-out}100%{opacity:0;transform-origin:top right;transform:rotate(-110deg);animation-timing-function:ease-in-out}}.tinDownIn{animation-name:tinDownIn}@keyframes tinDownIn{0%{opacity:0;transform:scale(1,1) translateY(900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateY(0)}}.tinDownOut{animation-name:tinDownOut}@keyframes tinDownOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateY(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%{opacity:0;transform:scale(1,1) translateY(900%)}}.tinLeftIn{animation-name:tinLeftIn}@keyframes tinLeftIn{0%{opacity:0;transform:scale(1,1) translateX(-900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateX(0)}}.tinLeftOut{animation-name:tinLeftOut}@keyframes tinLeftOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateX(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%{opacity:0;transform:scale(1,1) translateX(-900%)}}.tinRightIn{animation-name:tinRightIn}@keyframes tinRightIn{0%{opacity:0;transform:scale(1,1) translateX(900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateX(0)}}.tinRightOut{animation-name:tinRightOut}@keyframes tinRightOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateX(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateX(0)}100%{opacity:0;transform:scale(1,1) translateX(900%)}}.tinUpIn{animation-name:tinUpIn}@keyframes tinUpIn{0%{opacity:0;transform:scale(1,1) translateY(-900%)}50%,70%,90%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%,60%,80%{opacity:1;transform:scale(1,1) translateY(0)}}.tinUpOut{animation-name:tinUpOut}@keyframes tinUpOut{0%,20%,40%,50%{opacity:1;transform:scale(1,1) translateY(0)}10%,30%{opacity:1;transform:scale(1.1,1.1) translateY(0)}100%{opacity:0;transform:scale(1,1) translateY(-900%)}} \ No newline at end of file diff --git a/src/assets/images/.DS_Store b/src/assets/images/.DS_Store new file mode 100644 index 0000000..7554b5e --- /dev/null +++ b/src/assets/images/.DS_Store Binary files differ diff --git a/src/assets/images/map-pages/.DS_Store b/src/assets/images/map-pages/.DS_Store new file mode 100644 index 0000000..a039990 --- /dev/null +++ b/src/assets/images/map-pages/.DS_Store Binary files differ diff --git a/src/assets/images/map-pages/cosmetics/horn_bl.png b/src/assets/images/map-pages/cosmetics/horn_bl.png new file mode 100644 index 0000000..0bc1d33 --- /dev/null +++ b/src/assets/images/map-pages/cosmetics/horn_bl.png Binary files differ diff --git a/src/assets/images/map-pages/cosmetics/horn_br.png b/src/assets/images/map-pages/cosmetics/horn_br.png new file mode 100644 index 0000000..dfab8df --- /dev/null +++ b/src/assets/images/map-pages/cosmetics/horn_br.png Binary files differ diff --git a/src/assets/images/map-pages/cosmetics/horn_tl.png b/src/assets/images/map-pages/cosmetics/horn_tl.png new file mode 100644 index 0000000..317df00 --- /dev/null +++ b/src/assets/images/map-pages/cosmetics/horn_tl.png Binary files differ diff --git a/src/assets/images/map-pages/cosmetics/horn_tr.png b/src/assets/images/map-pages/cosmetics/horn_tr.png new file mode 100644 index 0000000..02b20c9 --- /dev/null +++ b/src/assets/images/map-pages/cosmetics/horn_tr.png Binary files differ diff --git a/src/assets/images/map-pages/icon.png b/src/assets/images/map-pages/icon.png new file mode 100644 index 0000000..62d9de9 --- /dev/null +++ b/src/assets/images/map-pages/icon.png Binary files differ diff --git a/src/assets/images/map-pages/icon/.DS_Store b/src/assets/images/map-pages/icon/.DS_Store new file mode 100644 index 0000000..4911e55 --- /dev/null +++ b/src/assets/images/map-pages/icon/.DS_Store Binary files differ diff --git a/src/assets/images/map-pages/icon/1.png b/src/assets/images/map-pages/icon/1.png new file mode 100644 index 0000000..b05e971 --- /dev/null +++ b/src/assets/images/map-pages/icon/1.png Binary files differ diff --git a/src/assets/images/map-pages/icon/11.png b/src/assets/images/map-pages/icon/11.png new file mode 100644 index 0000000..33c97b5 --- /dev/null +++ b/src/assets/images/map-pages/icon/11.png Binary files differ diff --git a/src/assets/images/map-pages/icon/2.png b/src/assets/images/map-pages/icon/2.png new file mode 100644 index 0000000..07452d1 --- /dev/null +++ b/src/assets/images/map-pages/icon/2.png Binary files differ diff --git a/src/assets/images/map-pages/icon/3.png b/src/assets/images/map-pages/icon/3.png new file mode 100644 index 0000000..eea0b7a --- /dev/null +++ b/src/assets/images/map-pages/icon/3.png Binary files differ diff --git a/src/assets/images/map-pages/icon/4.png b/src/assets/images/map-pages/icon/4.png new file mode 100644 index 0000000..a6ad2eb --- /dev/null +++ b/src/assets/images/map-pages/icon/4.png Binary files differ diff --git a/src/assets/images/map-pages/icon/5.png b/src/assets/images/map-pages/icon/5.png new file mode 100644 index 0000000..c715897 --- /dev/null +++ b/src/assets/images/map-pages/icon/5.png Binary files differ diff --git a/src/assets/images/map-pages/icon/6.png b/src/assets/images/map-pages/icon/6.png new file mode 100644 index 0000000..c0d4960 --- /dev/null +++ b/src/assets/images/map-pages/icon/6.png Binary files differ diff --git a/src/assets/images/map-pages/icon/7.png b/src/assets/images/map-pages/icon/7.png new file mode 100644 index 0000000..d7deb34 --- /dev/null +++ b/src/assets/images/map-pages/icon/7.png Binary files differ diff --git a/src/assets/images/map-pages/icon/BluePin1LargeB.png b/src/assets/images/map-pages/icon/BluePin1LargeB.png new file mode 100644 index 0000000..a01a819 --- /dev/null +++ b/src/assets/images/map-pages/icon/BluePin1LargeB.png Binary files differ diff --git a/src/assets/images/map-pages/icon/GreenPin1LargeB.png b/src/assets/images/map-pages/icon/GreenPin1LargeB.png new file mode 100644 index 0000000..e75fde5 --- /dev/null +++ b/src/assets/images/map-pages/icon/GreenPin1LargeB.png Binary files differ diff --git a/src/assets/images/map-pages/icon/HwBg.png b/src/assets/images/map-pages/icon/HwBg.png new file mode 100644 index 0000000..0d0047d --- /dev/null +++ b/src/assets/images/map-pages/icon/HwBg.png Binary files differ diff --git a/src/assets/images/map-pages/icon/RedPin1LargeB.png b/src/assets/images/map-pages/icon/RedPin1LargeB.png new file mode 100644 index 0000000..b92ead5 --- /dev/null +++ b/src/assets/images/map-pages/icon/RedPin1LargeB.png Binary files differ diff --git a/src/assets/images/map-pages/icon/TrainStation.png b/src/assets/images/map-pages/icon/TrainStation.png new file mode 100644 index 0000000..57f87d8 --- /dev/null +++ b/src/assets/images/map-pages/icon/TrainStation.png Binary files differ diff --git a/src/assets/images/map-pages/icon/bgc.png b/src/assets/images/map-pages/icon/bgc.png new file mode 100644 index 0000000..3d402a4 --- /dev/null +++ b/src/assets/images/map-pages/icon/bgc.png Binary files differ diff --git a/src/assets/images/map-pages/icon/bgc2.png b/src/assets/images/map-pages/icon/bgc2.png new file mode 100644 index 0000000..27f844f --- /dev/null +++ b/src/assets/images/map-pages/icon/bgc2.png Binary files differ diff --git a/src/assets/images/map-pages/icon/caidan.png b/src/assets/images/map-pages/icon/caidan.png new file mode 100644 index 0000000..d50246c --- /dev/null +++ b/src/assets/images/map-pages/icon/caidan.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_alarm.png b/src/assets/images/map-pages/icon/car_alarm.png new file mode 100644 index 0000000..946a724 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_alarm.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_alarm_ref.png b/src/assets/images/map-pages/icon/car_alarm_ref.png new file mode 100644 index 0000000..e320783 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_alarm_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_mousover.png b/src/assets/images/map-pages/icon/car_mousover.png new file mode 100644 index 0000000..aa3bae2 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_mousover.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_mousover_ref.png b/src/assets/images/map-pages/icon/car_mousover_ref.png new file mode 100644 index 0000000..78a539c --- /dev/null +++ b/src/assets/images/map-pages/icon/car_mousover_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_offline.png b/src/assets/images/map-pages/icon/car_offline.png new file mode 100644 index 0000000..5effc33 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_offline.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_offline_ref.png b/src/assets/images/map-pages/icon/car_offline_ref.png new file mode 100644 index 0000000..db0001b --- /dev/null +++ b/src/assets/images/map-pages/icon/car_offline_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_online.png b/src/assets/images/map-pages/icon/car_online.png new file mode 100644 index 0000000..06da197 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_online.png Binary files differ diff --git a/src/assets/images/map-pages/icon/car_online_ref.png b/src/assets/images/map-pages/icon/car_online_ref.png new file mode 100644 index 0000000..ea36dc4 --- /dev/null +++ b/src/assets/images/map-pages/icon/car_online_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/cl.png b/src/assets/images/map-pages/icon/cl.png new file mode 100644 index 0000000..1337a11 --- /dev/null +++ b/src/assets/images/map-pages/icon/cl.png Binary files differ diff --git a/src/assets/images/map-pages/icon/dd.png b/src/assets/images/map-pages/icon/dd.png new file mode 100644 index 0000000..dbb603f --- /dev/null +++ b/src/assets/images/map-pages/icon/dd.png Binary files differ diff --git a/src/assets/images/map-pages/icon/end.png b/src/assets/images/map-pages/icon/end.png new file mode 100644 index 0000000..7eb9720 --- /dev/null +++ b/src/assets/images/map-pages/icon/end.png Binary files differ diff --git a/src/assets/images/map-pages/icon/horn.png b/src/assets/images/map-pages/icon/horn.png new file mode 100644 index 0000000..213f9cb --- /dev/null +++ b/src/assets/images/map-pages/icon/horn.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon.png b/src/assets/images/map-pages/icon/icon.png new file mode 100644 index 0000000..62d9de9 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_Chemical.png b/src/assets/images/map-pages/icon/icon_Chemical.png new file mode 100644 index 0000000..4feedcb --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_Chemical.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_Dock.png b/src/assets/images/map-pages/icon/icon_Dock.png new file mode 100644 index 0000000..b8f037e --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_Dock.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_FillingStation.png b/src/assets/images/map-pages/icon/icon_FillingStation.png new file mode 100644 index 0000000..0e2937a --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_FillingStation.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_Petrochemical.png b/src/assets/images/map-pages/icon/icon_Petrochemical.png new file mode 100644 index 0000000..bc21876 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_Petrochemical.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_ProductOil.png b/src/assets/images/map-pages/icon/icon_ProductOil.png new file mode 100644 index 0000000..1a4d3c9 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_ProductOil.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_Refinery.png b/src/assets/images/map-pages/icon/icon_Refinery.png new file mode 100644 index 0000000..bf4579d --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_Refinery.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_Sales.png b/src/assets/images/map-pages/icon/icon_Sales.png new file mode 100644 index 0000000..1fa93d4 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_Sales.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_SalesEnterprise.png b/src/assets/images/map-pages/icon/icon_SalesEnterprise.png new file mode 100644 index 0000000..1fa93d4 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_SalesEnterprise.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_StoreHouse.png b/src/assets/images/map-pages/icon/icon_StoreHouse.png new file mode 100644 index 0000000..005e52d --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_StoreHouse.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_cam.png b/src/assets/images/map-pages/icon/icon_cam.png new file mode 100644 index 0000000..863ac06 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_cam.png Binary files differ diff --git a/src/assets/images/map-pages/icon/icon_people.png b/src/assets/images/map-pages/icon/icon_people.png new file mode 100644 index 0000000..f22eb41 --- /dev/null +++ b/src/assets/images/map-pages/icon/icon_people.png Binary files differ diff --git a/src/assets/images/map-pages/icon/lyg_yb.gif b/src/assets/images/map-pages/icon/lyg_yb.gif new file mode 100644 index 0000000..7713c0a --- /dev/null +++ b/src/assets/images/map-pages/icon/lyg_yb.gif Binary files differ diff --git a/src/assets/images/map-pages/icon/lyg_yz.gif b/src/assets/images/map-pages/icon/lyg_yz.gif new file mode 100644 index 0000000..71fdfc2 --- /dev/null +++ b/src/assets/images/map-pages/icon/lyg_yz.gif Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/0.png b/src/assets/images/map-pages/icon/map1/0.png new file mode 100644 index 0000000..640b990 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/0.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/1.png b/src/assets/images/map-pages/icon/map1/1.png new file mode 100644 index 0000000..ae250a1 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/1.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/2.png b/src/assets/images/map-pages/icon/map1/2.png new file mode 100644 index 0000000..69ec43c --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/2.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/3.png b/src/assets/images/map-pages/icon/map1/3.png new file mode 100644 index 0000000..97f8827 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/3.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/4.png b/src/assets/images/map-pages/icon/map1/4.png new file mode 100644 index 0000000..6815eeb --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/4.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/5.png b/src/assets/images/map-pages/icon/map1/5.png new file mode 100644 index 0000000..eb8416f --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/5.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/6.png b/src/assets/images/map-pages/icon/map1/6.png new file mode 100644 index 0000000..6fece73 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/6.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/7.png b/src/assets/images/map-pages/icon/map1/7.png new file mode 100644 index 0000000..17a4d81 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/7.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/8.png b/src/assets/images/map-pages/icon/map1/8.png new file mode 100644 index 0000000..4168fbe --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/8.png Binary files differ diff --git a/src/assets/images/map-pages/icon/map1/9.png b/src/assets/images/map-pages/icon/map1/9.png new file mode 100644 index 0000000..df7fda3 --- /dev/null +++ b/src/assets/images/map-pages/icon/map1/9.png Binary files differ diff --git "a/src/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" "b/src/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/src/assets/images/map-pages/icon/map1/\345\215\240\344\275\215.txt" diff --git a/src/assets/images/map-pages/icon/petro_zhanc_sel.png b/src/assets/images/map-pages/icon/petro_zhanc_sel.png new file mode 100644 index 0000000..800146b --- /dev/null +++ b/src/assets/images/map-pages/icon/petro_zhanc_sel.png Binary files differ diff --git a/src/assets/images/map-pages/icon/setting.png b/src/assets/images/map-pages/icon/setting.png new file mode 100644 index 0000000..be27321 --- /dev/null +++ b/src/assets/images/map-pages/icon/setting.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_alarm.png b/src/assets/images/map-pages/icon/ship_alarm.png new file mode 100644 index 0000000..fa4c6ed --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_alarm.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_alarm_ref.png b/src/assets/images/map-pages/icon/ship_alarm_ref.png new file mode 100644 index 0000000..6b48c70 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_alarm_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_left.png b/src/assets/images/map-pages/icon/ship_left.png new file mode 100644 index 0000000..d955a55 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_left.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_mousover.png b/src/assets/images/map-pages/icon/ship_mousover.png new file mode 100644 index 0000000..2cad529 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_mousover.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_mousover_ref.png b/src/assets/images/map-pages/icon/ship_mousover_ref.png new file mode 100644 index 0000000..5868e55 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_mousover_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_offline.png b/src/assets/images/map-pages/icon/ship_offline.png new file mode 100644 index 0000000..373e5a4 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_offline.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_offline_ref.png b/src/assets/images/map-pages/icon/ship_offline_ref.png new file mode 100644 index 0000000..b5e93a9 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_offline_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_online.png b/src/assets/images/map-pages/icon/ship_online.png new file mode 100644 index 0000000..d4c2237 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_online.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_online_ref.png b/src/assets/images/map-pages/icon/ship_online_ref.png new file mode 100644 index 0000000..e6cd828 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_online_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ship_right.png b/src/assets/images/map-pages/icon/ship_right.png new file mode 100644 index 0000000..ba62a38 --- /dev/null +++ b/src/assets/images/map-pages/icon/ship_right.png Binary files differ diff --git a/src/assets/images/map-pages/icon/sl.png b/src/assets/images/map-pages/icon/sl.png new file mode 100644 index 0000000..39ca8f8 --- /dev/null +++ b/src/assets/images/map-pages/icon/sl.png Binary files differ diff --git a/src/assets/images/map-pages/icon/start.png b/src/assets/images/map-pages/icon/start.png new file mode 100644 index 0000000..2bf91db --- /dev/null +++ b/src/assets/images/map-pages/icon/start.png Binary files differ diff --git a/src/assets/images/map-pages/icon/tab.png b/src/assets/images/map-pages/icon/tab.png new file mode 100644 index 0000000..db144e5 --- /dev/null +++ b/src/assets/images/map-pages/icon/tab.png Binary files differ diff --git a/src/assets/images/map-pages/icon/title_icon.png b/src/assets/images/map-pages/icon/title_icon.png new file mode 100644 index 0000000..6fece73 --- /dev/null +++ b/src/assets/images/map-pages/icon/title_icon.png Binary files differ diff --git a/src/assets/images/map-pages/icon/title_icon3.png b/src/assets/images/map-pages/icon/title_icon3.png new file mode 100644 index 0000000..97f8827 --- /dev/null +++ b/src/assets/images/map-pages/icon/title_icon3.png Binary files differ diff --git a/src/assets/images/map-pages/icon/tool.png b/src/assets/images/map-pages/icon/tool.png new file mode 100644 index 0000000..8edc1b6 --- /dev/null +++ b/src/assets/images/map-pages/icon/tool.png Binary files differ diff --git a/src/assets/images/map-pages/icon/topDT.png b/src/assets/images/map-pages/icon/topDT.png new file mode 100644 index 0000000..449130f --- /dev/null +++ b/src/assets/images/map-pages/icon/topDT.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_alarm.png b/src/assets/images/map-pages/icon/train_alarm.png new file mode 100644 index 0000000..63fc0ff --- /dev/null +++ b/src/assets/images/map-pages/icon/train_alarm.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_alarm_ref.png b/src/assets/images/map-pages/icon/train_alarm_ref.png new file mode 100644 index 0000000..87d776d --- /dev/null +++ b/src/assets/images/map-pages/icon/train_alarm_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_mousover.png b/src/assets/images/map-pages/icon/train_mousover.png new file mode 100644 index 0000000..803438e --- /dev/null +++ b/src/assets/images/map-pages/icon/train_mousover.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_mousover_ref.png b/src/assets/images/map-pages/icon/train_mousover_ref.png new file mode 100644 index 0000000..492d1d0 --- /dev/null +++ b/src/assets/images/map-pages/icon/train_mousover_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_offline.png b/src/assets/images/map-pages/icon/train_offline.png new file mode 100644 index 0000000..00eb508 --- /dev/null +++ b/src/assets/images/map-pages/icon/train_offline.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_offline_ref.png b/src/assets/images/map-pages/icon/train_offline_ref.png new file mode 100644 index 0000000..45ff10f --- /dev/null +++ b/src/assets/images/map-pages/icon/train_offline_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_online.png b/src/assets/images/map-pages/icon/train_online.png new file mode 100644 index 0000000..174f4f6 --- /dev/null +++ b/src/assets/images/map-pages/icon/train_online.png Binary files differ diff --git a/src/assets/images/map-pages/icon/train_online_ref.png b/src/assets/images/map-pages/icon/train_online_ref.png new file mode 100644 index 0000000..2f4f260 --- /dev/null +++ b/src/assets/images/map-pages/icon/train_online_ref.png Binary files differ diff --git a/src/assets/images/map-pages/icon/txtbackground.png b/src/assets/images/map-pages/icon/txtbackground.png new file mode 100644 index 0000000..bb6dd5f --- /dev/null +++ b/src/assets/images/map-pages/icon/txtbackground.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_allNo.png b/src/assets/images/map-pages/icon/warning_allNo.png new file mode 100644 index 0000000..076baf9 --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_allNo.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_allYs.png b/src/assets/images/map-pages/icon/warning_allYs.png new file mode 100644 index 0000000..780fdfd --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_allYs.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_car_img.png b/src/assets/images/map-pages/icon/warning_car_img.png new file mode 100644 index 0000000..2b6782e --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_car_img.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_car_no.png b/src/assets/images/map-pages/icon/warning_car_no.png new file mode 100644 index 0000000..8c7a55f --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_car_no.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_car_video.png b/src/assets/images/map-pages/icon/warning_car_video.png new file mode 100644 index 0000000..3a4f6bf --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_car_video.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_driver_img.png b/src/assets/images/map-pages/icon/warning_driver_img.png new file mode 100644 index 0000000..a1b3fd0 --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_driver_img.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_driver_no.png b/src/assets/images/map-pages/icon/warning_driver_no.png new file mode 100644 index 0000000..805a3f1 --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_driver_no.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_driver_video.png b/src/assets/images/map-pages/icon/warning_driver_video.png new file mode 100644 index 0000000..7d04a6c --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_driver_video.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_other_img.png b/src/assets/images/map-pages/icon/warning_other_img.png new file mode 100644 index 0000000..bd3c84e --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_other_img.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_other_no.png b/src/assets/images/map-pages/icon/warning_other_no.png new file mode 100644 index 0000000..33278ee --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_other_no.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_other_video.png b/src/assets/images/map-pages/icon/warning_other_video.png new file mode 100644 index 0000000..3273ecd --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_other_video.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_ybNo.png b/src/assets/images/map-pages/icon/warning_ybNo.png new file mode 100644 index 0000000..224e9fa --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_ybNo.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_ybYs.png b/src/assets/images/map-pages/icon/warning_ybYs.png new file mode 100644 index 0000000..d75bd3c --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_ybYs.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_yzNo.png b/src/assets/images/map-pages/icon/warning_yzNo.png new file mode 100644 index 0000000..1e6c0d2 --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_yzNo.png Binary files differ diff --git a/src/assets/images/map-pages/icon/warning_yzYs.png b/src/assets/images/map-pages/icon/warning_yzYs.png new file mode 100644 index 0000000..4d1143f --- /dev/null +++ b/src/assets/images/map-pages/icon/warning_yzYs.png Binary files differ diff --git a/src/assets/images/map-pages/icon/xljt1.png b/src/assets/images/map-pages/icon/xljt1.png new file mode 100644 index 0000000..9227215 --- /dev/null +++ b/src/assets/images/map-pages/icon/xljt1.png Binary files differ diff --git a/src/assets/images/map-pages/icon/xljt12.png b/src/assets/images/map-pages/icon/xljt12.png new file mode 100644 index 0000000..d3b5e52 --- /dev/null +++ b/src/assets/images/map-pages/icon/xljt12.png Binary files differ diff --git a/src/assets/images/map-pages/icon/xljt2.png b/src/assets/images/map-pages/icon/xljt2.png new file mode 100644 index 0000000..364a4d3 --- /dev/null +++ b/src/assets/images/map-pages/icon/xljt2.png Binary files differ diff --git a/src/assets/images/map-pages/icon/ycan.png b/src/assets/images/map-pages/icon/ycan.png new file mode 100644 index 0000000..1bbde9c --- /dev/null +++ b/src/assets/images/map-pages/icon/ycan.png Binary files differ diff --git a/src/assets/images/map-pages/icon/yd.png b/src/assets/images/map-pages/icon/yd.png new file mode 100644 index 0000000..b7bcf6d --- /dev/null +++ b/src/assets/images/map-pages/icon/yd.png Binary files differ diff --git a/src/assets/images/map-pages/icon/yl.png b/src/assets/images/map-pages/icon/yl.png new file mode 100644 index 0000000..c00ef79 --- /dev/null +++ b/src/assets/images/map-pages/icon/yl.png Binary files differ diff --git a/src/assets/images/map-pages/icon/zkjt.png b/src/assets/images/map-pages/icon/zkjt.png new file mode 100644 index 0000000..3612065 --- /dev/null +++ b/src/assets/images/map-pages/icon/zkjt.png Binary files differ diff --git a/src/assets/images/map-pages/setting.png b/src/assets/images/map-pages/setting.png new file mode 100644 index 0000000..be27321 --- /dev/null +++ b/src/assets/images/map-pages/setting.png Binary files differ diff --git a/src/assets/images/map-pages/xljt1.png b/src/assets/images/map-pages/xljt1.png new file mode 100644 index 0000000..9227215 --- /dev/null +++ b/src/assets/images/map-pages/xljt1.png Binary files differ diff --git a/src/components/LayerController/BaseMapController.vue b/src/components/LayerController/BaseMapController.vue new file mode 100644 index 0000000..b47c1d8 --- /dev/null +++ b/src/components/LayerController/BaseMapController.vue @@ -0,0 +1,103 @@ +<template> +<div class="floatPanel frontMap basemapLayer"> + <div v-for="item in basemapLayers" :key="item.id" class="basemapLayerItem">{{item.text}}</div> +</div> +</template> + +<script> +export default { + name: 'BaseMapController', + mixins: [], + components: [], + data() { + return { + basemapLayers: [ + { + id: 1, + colorImgUrl: '', + bwImgUrl: '', + text: '1', + layerId: '' + }, + { + id: 2, + colorImgUrl: '', + bwImgUrl: '', + text: '2', + layerId: '' + }, + { + id: 3, + colorImgUrl: '', + bwImgUrl: '', + text: '3', + layerId: '' + } + ] + } + }, + props: { + /** + * 鍥惧眰鎺у埗灞曞紑鏂瑰悜 + */ + direction: { + type: String, + custom: true, + default: () => 'top' + }, + /** + * 璐磋竟鐨勮窛绂� + */ + padding: { + type: [Number, String], + custom: true, + default: () => '5' + }, + /** + * 鎸夐挳灏哄 + */ + size: { + type: [Number, Array], + custom: true, + default: () => [50, 50] + }, + cls: { + type: String, + custom: true, + default: () => this + 'basemap-controller' + }, + /** + * The bounds of the map, supports .sync modifier + */ + layers: { + type: Array, + custom: true, + default: null + } + } +} +</script> + +<style scoped lang="less"> + .frontMap{ + z-index: 1000; + } + .floatPanel{ + position: absolute; + top: 5px; + left: 5px; + width: 94px; + height: 32px; + } + .basemapLayer{ + border: lightgray 1px solid; + } + .basemapLayerItem{ + width: 26px; + height: 26px; + margin: 2px; + + float: left; + background-color: white; + } +</style> diff --git a/src/components/LayerController/LayerController.vue b/src/components/LayerController/LayerController.vue new file mode 100644 index 0000000..1255f2a --- /dev/null +++ b/src/components/LayerController/LayerController.vue @@ -0,0 +1,262 @@ +<template> + <div class="floatPanel"> + <!-- <i class="horn horn-tl"></i> --> + <!-- <i class="horn horn-tr"></i> --> + <i class="horn horn-br"></i> + <i class="horn horn-bl"></i> + + <div class="head titleBorder"> + <div class="titleTextBorder"> + <div class="titleIcon"></div> + <div class="titleText">涓氬姟鐪嬫澘</div> + <div class="titleButton" :class="{switchHeadUp:true, switchHeadDown: !panelSwitch.main}" @click="switchPanel"> + <!-- <i class="el-icon-arrow-down"></i> --> + </div> + </div> + </div> + <div class="body" id="panelContent"> + <div id="panelInnerContent" style="height: auto; overflow: hidden;"> + + + </div> + </div> + </div> +</template> + +<script> +import api from './LayerControllerAPI' +import { mapState, mapMutations } from 'vuex' +import '@assets/css/map/magic.min.css' +import presets from './layerControllerPresets' +import $ from 'jquery' + +export default { + name: 'LayerController', + components: { }, + props: { + preset: { + type: String, + default: 'default' + } + }, + computed: { + ...mapState({ + map: state => state.map, + L: state => state.L, + layerHelper: state => state.layerHelper, + layerControllerVisible: state => state.layerControllerVisible + }) + }, + data() { + return { + panelSwitch: { + main: true // 涓荤獥鍙� + } + } + }, + mounted() { + this.$nextTick(function() { + this.init() + console.log(api) + }) + }, + methods: { + ...mapMutations(['updateLayerControllerVisible']), + async init() { + this.initPreset() + }, + initPreset() { + if (this.preset !== 'default') { + let prmPreset = presets[this.preset] + Object.assign(this.layerControllerVisible, prmPreset) // 闃叉棰勮鍙傛暟涓庨粯璁ゅ弬鏁颁笉涓�鑷村鑷存姤閿欙紝濡傛灉娌℃湁鎸夌収鎮ㄧ殑閰嶇疆鍙戠敓鏀瑰彉锛岃妫�鏌ユ嫾鍐欐槸鍚︽纭� + if (prmPreset === 'undefined') { + console.log('璇ュ浘灞傛帶鍒堕潰鏉跨殑棰勮娌℃湁鎵惧埌锛岃妫�鏌ラ璁惧悕绉版槸鍚︽纭紒') + } else { + this.updateLayerControllerVisible(this.layerControllerVisible) + } + } + }, + switchPanel() { + this.panelSwitch.main = !this.panelSwitch.main + if (this.panelSwitch.main) { + $('#panelInnerContent').animate({ height: '500px' }, 'fast', 'swing', () => { + $('#panelInnerContent').css('height', 'auto') + $('#panelContent').css('height', 'auto') + }) + } else { + $('#panelInnerContent').animate({ height: '0px' }, 'fast', 'swing') + } + }, + } +} +</script> + +<style lang="less"> + +.floatPanel{ + position: absolute; + left: 10px; + bottom: 10px; + width: 230px; + height: auto; + font-size: 11px; + z-index: 1000; + div{ + color:#90c8e0; + } + .titleBorder{ + width: 100%; + height: 28px; + background: #10488c; + -webkit-clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); + clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); + position: relative; + } + .titleBorder:before { + content: ""; + display: block; + position: absolute; + width: 6px; + height: 6px; + top: 0; + left: 0; + background-color: #38c8ef; + } + .titleBorder:after { + content: ""; + display: block; + position: absolute; + width: 6px; + height: 6px; + top: 9px; + right: 0; + background-color: #38c8ef; + -webkit-clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); + clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); + } + .titleTextBorder { + width: 100%; + height: 28px; + background: #091331; + -webkit-clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); + clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); + } + .titleIcon{ + float: left; + width: 22px; + height: 22px; + margin-top: 4px; + margin-left: 2px; + background: url(/assets/images/map-page/icon/setting.png); + } + .titleText{ + float: left; + width: 150px; + color: #00d0f9; + margin-left: 4px; + line-height: 20px; + font-weight: bold; + margin-top: 6px; + filter: brightness(100%); + text-shadow: 0 0 5px #00d0f9, 0 0 0 #00d0f9, 0 0 0 #00d0f9, 0 0 0 #0258c5, 0 0 0 #0258c5, 0 0 2px #0258c5, 0 0 5px #0258c5, 0 0 15px #0258c5; + } + .titleline{ + display: inline-block; + width: 120px; + height: 1px; + // margin-top: 14px; + margin-left: 4px; + background-color: #04527f; + line-height: 5px; + vertical-align: middle; + } + .titlepoint{ + display: inline-block; + width: 5px; + height: 5px; + // margin-top: 12px; + background-color: #04527f; + line-height: 5px; + vertical-align: middle; + } + .titleButton{ + float: right; + width: 28px; + height: 28px; + cursor: pointer; + :hover{ + font-weight: bold; + color: white; + } + } + .switchHeadUp{ + width: 22px; + height: 16px; + float: right; + margin-top: 10px; + margin-right: 10px; + cursor: pointer; + background: url(/assets/images/map-page/icon/xljt1.png); + transform: rotateX(0deg); + transform-origin: 50% 50%; + transition: transform 0.5s linear 0s; + } + .switchHeadDown{ + transform: rotateX(180deg); + transform-origin: 50% 50%; + transition: transform 0.5s linear 0s; + } + select{ + background: transparent; + margin: 6px; + border: .5px solid #569EB7; + width: 150px; + color: #569EB7; + padding: 0 16px; + } + .horn{ + width: 6px; + height: 6px; + float: left; + position: absolute; + } + .horn-tl{ + background: url(/assets/images/map-page/cosmetics/horn_tl.png) center center no-repeat; + left: -1px; + top: -1px; + } + .horn-tr{ + background: url(/assets/images/map-page/cosmetics/horn_tr.png) center center no-repeat; + right: -1px; + top: -1px; + } + .horn-bl{ + background: url(/assets/images/map-page/cosmetics/horn_bl.png) center center no-repeat; + left: -1px; + bottom: -1px; + } + .horn-br{ + background: url(/assets/images/map-page/cosmetics/horn_br.png) center center no-repeat; + right: -1px; + bottom: -1px; + } + ::-webkit-scrollbar{ + width: 7px; + height: 5px !important; + } + ::-webkit-scrollbar-thumb { + /*婊氬姩鏉¢噷闈㈠皬鏂瑰潡*/ + border-radius: 10px; + box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); + background : #0661AE; + border: 1px solid transparent; + } + ::-webkit-scrollbar-track { + /*婊氬姩鏉¢噷闈㈣建閬�*/ + // box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); + border-radius: 0px; + background : #0E3565; + } +} + +</style> diff --git a/src/components/LayerController/LayerControllerAPI.js b/src/components/LayerController/LayerControllerAPI.js new file mode 100644 index 0000000..c342984 --- /dev/null +++ b/src/components/LayerController/LayerControllerAPI.js @@ -0,0 +1,5 @@ +import mapApi from '@/api/mapApi' +console.log(mapApi) + +export default { +} diff --git a/src/components/LayerController/layerControllerPresets.js b/src/components/LayerController/layerControllerPresets.js new file mode 100644 index 0000000..386a6cc --- /dev/null +++ b/src/components/LayerController/layerControllerPresets.js @@ -0,0 +1,26 @@ +/** + * 澶у浘鍥惧眰鎺у埗闈㈡澘鐨勬樉绀洪璁� + */ +let bigmapPreset = { // 鍥惧眰鎺у埗闈㈡澘鐨勬樉绀虹姸鎬佲�衡�� + layerController: true, // 鐖哥埜鏍忕洰锛氭槸鍚︽樉绀哄浘灞傛帶鍒堕潰鏉� +} + +/** + * 缁煎悎鎶ヨ鍥惧眰鎺у埗闈㈡澘鐨勬樉绀洪璁� + */ +let warningPreset = { // 鍥惧眰鎺у埗闈㈡澘鐨勬樉绀虹姸鎬佲�衡�� + layerController: true, // 鐖哥埜鏍忕洰锛氭槸鍚︽樉绀哄浘灞傛帶鍒堕潰鏉� +} + +/** + * 缁煎悎鎶ヨ鍥惧眰鎺у埗闈㈡澘鐨勬樉绀洪璁� + */ +let vehicleWarningPreset = { // 鍥惧眰鎺у埗闈㈡澘鐨勬樉绀虹姸鎬佲�衡�� + layerController: true, // 鐖哥埜鏍忕洰锛氭槸鍚︽樉绀哄浘灞傛帶鍒堕潰鏉� +} + +export default { + bigmapPreset, + warningPreset, + vehicleWarningPreset +} diff --git a/src/components/helpers/BasemapHelper.js b/src/components/helpers/BasemapHelper.js new file mode 100644 index 0000000..d608cf8 --- /dev/null +++ b/src/components/helpers/BasemapHelper.js @@ -0,0 +1,59 @@ +/** + * 搴曞浘绠$悊鍔╂墜锛岃礋璐e簳鍥惧垱寤哄強寮�鍏� + */ +function BasemapHelper(map, L) { + this.map = map + this.L = L + this.basemapList = [] + + /** + * 璇ユ柟娉曡礋璐e悇绉嶅簳鍥惧姞杞藉埌鍦板浘涓� + * @param map + * @param defBasemapName 鍒濆鍖栧畬鎴愬悗锛岄粯璁ゆ樉绀虹殑鍥惧眰 + */ + this.initBasemap = (map, defBasemapName) => { + console.log(map, defBasemapName) + // todo 鍒涘缓瀹屼互鍚庯紝鎶婂浘灞傞兘鏀惧埌basemapList瀵硅薄淇濆瓨璧锋潵锛屾柟渚垮叾浠栨帴鍙h皟鐢� + + return null + } + + /** + * 鑾峰彇鎵�鏈夌殑搴曞浘鍒楄〃 + * @returns {null} 缁撴瀯锛歔{鍚嶇О, 鍥惧眰寮曠敤}] + */ + this.getBasemapList = (map) => { + console.log(map) + return null + } + + /** + * 閫氳繃鍚嶇О鑾峰彇搴曞浘瀵硅薄 + * @param map 缁撴瀯锛歔{鍚嶇О, 鍥惧眰寮曠敤}] + * @param name 鍚嶇О + */ + this.getBasemap = (map, name) => { + console.log(map, name) + } + + /** + * 鏄剧ず鏌愪釜鍥惧眰 + * @param map 鍦板浘瀵硅薄 + * @param layer 寰呮樉绀哄浘灞傚紩鐢� + * @param isHideOthers 鏄惁鍏堝叧闂叾浠栧浘灞傦紝榛樿鏄痶rue + */ + this.showBasemap = (map, layer, isHideOthers) => { + console.log(map, layer, isHideOthers) + } + + /** + * 闅愯棌鏌愪釜鍥惧眰 + * @param map 鍦板浘瀵硅薄 + * @param layer 寰呭叧闂浘灞傚紩鐢� + */ + this.hideBasemap = (map, layer) => { + console.log(map, layer) + } +} + +export default BasemapHelper diff --git a/src/components/helpers/LayerHelper.js b/src/components/helpers/LayerHelper.js new file mode 100644 index 0000000..326da20 --- /dev/null +++ b/src/components/helpers/LayerHelper.js @@ -0,0 +1,10 @@ +/** + * 鍒涘缓鍥惧眰鐩稿叧鐨勭被 + */ +import L from 'leaflet' +class LayerHelper { + loadTileLayer(options) { + return L.tileLayer(options.url + '?x={x}&y={y}&z={z}', options) + } +} +export default LayerHelper diff --git a/src/components/helpers/VectorLayerHelper.js b/src/components/helpers/VectorLayerHelper.js new file mode 100644 index 0000000..2917146 --- /dev/null +++ b/src/components/helpers/VectorLayerHelper.js @@ -0,0 +1,69 @@ +/** + * 涓氬姟鐩稿叧鐭㈤噺鍥剧鐞嗗姪鎵嬶紝璐熻矗涓氬姟鐩稿叧鐭㈤噺鍥惧垱寤哄強寮�鍏� + */ +function VectorLayerHelper(map, L, env) { + this.map = map + this.L = L + this.vectorLayerMap = {} + this.vectorLayerList = [] + this.vueRefMap = {} + this.functionMap = {} + this.env = env + /** + * 璇ユ柟娉曡礋璐e悇绉嶅簳鍥惧姞杞藉埌鍦板浘涓� + * 涓嶅悓椤甸潰鍔犺浇鍥惧眰涓嶅悓鏍规嵁妯″潡绫诲瀷閫夋嫨鍔犺浇涓嶅悓鍥惧眰 + * @param map + * @param methodNames 闇�瑕佸姞杞界殑鏂规硶鍚嶇О + */ + this.initVectorLayers = (methodNames) => { + // todo 鍒涘缓瀹屼互鍚庯紝鎶婂浘灞傞兘鏀惧埌vectorLayerMap瀵硅薄淇濆瓨璧锋潵锛屾柟渚垮叾浠栨帴鍙h皟鐢� + // todo 鍦╩apmodules鏂囦欢澶瑰畾涔夌浉鍏冲浘灞傜殑瀹炵幇浠g爜銆� + this.loadFunction(methodNames) + // todo 浼佷笟鍥惧眰閮藉彲浠ュ悗闈㈠姞鍏ワ紝鐒跺悗缁熶竴鐢盚elper绋嬪簭鏉ョ鐞嗗浘灞傜殑寮�鍏炽�� + return null + } + // 鎸夐渶鍔犺浇瀵瑰簲鏂规硶鍒涘缓鍥惧眰 + this.loadFunction = (methodNames) => { + console.log(methodNames) + } + + + + this.setVueRef = (vueName, ref) => { + this.vueRefMap[vueName] = ref + } + + /** + * 鑾峰彇鎵�鏈夌殑鍥惧眰鍒楄〃 + * @returns {null} 缁撴瀯锛歔{鍚嶇О, 鍥惧眰寮曠敤}] + */ + this.getVectorLayerList = () => { + return this.vectorLayerList + } + + /** + * 閫氳繃鍚嶇О鑾峰彇鍥惧眰瀵硅薄 + * @param name 鍚嶇О + */ + this.getVectorLayer = (name) => { + return this.vectorLayerMap[name] + } + + /** + * 鏄剧ず鏌愪釜鍥惧眰 + * @param name 鍥惧眰鍚嶇О + */ + this.showVectorLayer = (name, vuexStat) => { + console.log(map, vuexStat) + } + + /** + * 闅愯棌鏌愪釜鍥惧眰 + * @param name 鍥惧眰鍚嶇О + */ + this.hideVectorLayer = (name, vuexStat) => { + console.log(map, vuexStat) + } +} + +export default VectorLayerHelper diff --git a/src/components/mapmodules/CommonLayerLoad.js b/src/components/mapmodules/CommonLayerLoad.js new file mode 100644 index 0000000..d078640 --- /dev/null +++ b/src/components/mapmodules/CommonLayerLoad.js @@ -0,0 +1,82 @@ +/** + * 鍔犺浇鍏叡鐨勫浘灞傦紝渚嬪鍥界晫锛岄搧璺紝钃濊壊鍦板浘绛夊浘灞� + */ +import L from 'leaflet' +import MapConfig from '@/conf/MapConfig' +import LayerHelper from '@components/helpers/LayerHelper' +import { $HOST } from '@/api/host' +const tokenStr = 'tk=' + 'f1b72b5e7cb1175acddfa485f1bc9770' + '&' +class CommonLayerLoad { + loadBlueMap() { + return L.tileLayer($HOST + '/server/ogcserver/whp_basemap_tile/wmts?x={x}&y={y}&z={z}', { + maxZoom: 7, + minZoom: 1, + zoomOffset: 1 + + }) + } + loadNormalMap() { + return L.tileLayer('http://t0.tianditu.gov.cn/vec_c/wmts?' + tokenStr + + 'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + + }) + } + loadNormalMapa() { + return L.tileLayer('http://t0.tianditu.gov.cn/cva_c/wmts?' + tokenStr + + 'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + + }) + } + loadImgMapm() { + return L.tileLayer('http://t0.tianditu.gov.cn/img_c/wmts?' + tokenStr + + 'layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + }) + } + loadImgMapa() { + return L.tileLayer('http://t0.tianditu.gov.cn/cia_c/wmts?' + tokenStr + + 'layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + }) + } + loadIntranetImgMap(token) { + return L.tileLayer('http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-image-globe/WMTS?token=' + token + '&' + + 'layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + }) + } + + loadIntranetImgMapCia(token) { + return L.tileLayer('http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-label-image/WMTS?token=' + token + '&' + + 'layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', { + maxZoom: 18, + minZoom: 7, + zoomOffset: 1 + }) + } + loadGuoJie() { + return new LayerHelper().loadTileLayer({ + url: MapConfig.mapConfig.ChinaGj, + zoomOffset: 1 + }) + } + loadRailWay() { + return new LayerHelper().loadTileLayer({ + url: MapConfig.mapConfig.RailwayUrl, + zoomOffset: 1 + }) + } +} +export default CommonLayerLoad diff --git a/src/components/mapmodules/SafetyIndexBar.js b/src/components/mapmodules/SafetyIndexBar.js new file mode 100644 index 0000000..5e306cc --- /dev/null +++ b/src/components/mapmodules/SafetyIndexBar.js @@ -0,0 +1,120 @@ +import echarts from 'echarts' + +function drawSafetyBar(carDataArray, shipDataArray, plateDataArray) { + let myChart = echarts.init(document.getElementById('safetyBarIndex')) + myChart.setOption({ + color: ['#3398DB'], + tooltip: { + trigger: 'axis', + axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥 + type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow' + }, + textStyle: { + color: '#33FF90' + }, + extraCssText: 'background-color: rgba(73,177,231, 0.1);' + }, + legend: { + data: ['鑸硅埗', '杞﹁締'], + top: '6%', + right: '4%', + textStyle: { + color: '#33FFF8' + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: plateDataArray, + axisTick: { + alignWithLabel: true + }, + axisLabel: { + color: '#33FFF8' + }, + splitLine: { + show: false + } + } + ], + yAxis: [ + { + type: 'value', + axisLabel: { + color: '#33FFF8' + }, + splitLine: { + show: true, + lineStyle: { + color: [ '#315070' ], + width: 1, + type: 'dashed' + } + } + } + ], + series: [ + { + name: '鑸硅埗', + type: 'bar', + barWidth: '12%', + color: 'rgb(88,228,239)', + itemStyle: { + normal: { + label: { + show: true, // 寮�鍚樉绀� + position: 'top', // 鍦ㄤ笂鏂规樉绀� + textStyle: { // 鏁板�兼牱寮� + color: '#ffffff', + fontSize: 12 + } + }, + barBorderRadius: [15, 15, 0, 0], + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#00ACFE' }, + { offset: 0.5, color: '#034B88' }, + { offset: 1, color: '#051A4C' } + ]) + } + }, + data: shipDataArray + }, + { + name: '杞﹁締', + type: 'bar', + barWidth: '12%', + color: 'rgb(73,117,231)', + itemStyle: { + normal: { + label: { + show: true, // 寮�鍚樉绀� + position: 'top', // 鍦ㄤ笂鏂规樉绀� + textStyle: { // 鏁板�兼牱寮� + color: '#ffffff', + fontSize: 12 + } + }, + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#FED700' }, + { offset: 0.5, color: '#846B03' }, + { offset: 1, color: '#423105' } + ]), + barBorderRadius: [ 15, 15, 0, 0 ] + } + }, + data: carDataArray + } + ] + }) + window.addEventListener('resize', () => { myChart.resize() }) +} + +export default { + drawSafetyBar +} diff --git a/src/components/mapmodules/SafetyIndexLine.js b/src/components/mapmodules/SafetyIndexLine.js new file mode 100644 index 0000000..9706043 --- /dev/null +++ b/src/components/mapmodules/SafetyIndexLine.js @@ -0,0 +1,107 @@ +import echarts from 'echarts' +import dayjs from 'dayjs' + +function drawSafetyLine() { + let myChart = echarts.init(document.getElementById('safetyIndex')) + let yyyy = dayjs().format('YYYY') + '-' + let resDate = ['07-10', '07-11', '07-12', '07-13', '07-14', '07-15', '07-16'] + let resValue = [35, 20, 10, 20, 40, 30, 10] + let safetyStandardValue = 20 + myChart.setOption({ + tooltip: { + trigger: 'axis', + formatter: '<span style="text-align: center;display:block; color: #33FF90">' + yyyy + '{b0}</span>' + + '<span style="color: #33FF90">{a0}锛歿c0}</span><br/>' + + '<span style="color: #33FF90">瀹夊叏鏍囧噯鎸囨暟锛�' + safetyStandardValue + '</span>', // 鑷畾涔塼ip鏍煎紡 + backgroundColor: 'rgba(73,177,231, 0.1)', + axisPointer: { + lineStyle: { + color: 'rgba(73,177,231, 0.5)', + type: 'dashed' + } + } + }, + grid: { + left: '4%', + right: '10%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: resDate, + axisLine: { + show: false, + lineStyle: { + color: '#33FFF8' + } + }, + axisTick: { // x杞村埢搴︾嚎 + show: false + } + }, + yAxis: { + type: 'value', + splitLine: { + lineStyle: { + type: 'dotted', // 璁剧疆缃戞牸绾跨被鍨� dotted:铏氱嚎 solid:瀹炵嚎 + color: 'rgb(73,177,231, 0.3)' + }, + show: true + }, + axisLine: { + show: false, + lineStyle: { + color: '#33FFF8' + } + }, + axisTick: { // y杞村埢搴︾嚎 + show: false + }, + nameTextStyle: { + lineHeight: 20 + } + }, + series: [ + { + name: '瀹夊叏鎸囨暟', + type: 'line', + data: resValue, + itemStyle: { + normal: { + lineStyle: { + color: 'rgb(233,209,74)', + width: 2 // 璁剧疆绾挎潯绮楃粏 + } + } + }, + markLine: { + symbol: 'none', // 鍘绘帀鏍囧噯绾跨澶� + data: [ + { + label: { + normal: { + position: 'end', + formatter: '' + } + }, + name: '鏍囧噯鍊�', + yAxis: 20, + lineStyle: { + type: 'solid', + color: '#33FFF8', + width: 1 + } + } + ] + } + } + ] + }) + window.addEventListener('resize', () => { myChart.resize() }) +} + +export default { + drawSafetyLine +} diff --git a/src/components/mapmodules/SafetyIndexPie.js b/src/components/mapmodules/SafetyIndexPie.js new file mode 100644 index 0000000..44993aa --- /dev/null +++ b/src/components/mapmodules/SafetyIndexPie.js @@ -0,0 +1,42 @@ +import echarts from 'echarts' + +function drawSafetyPie(options) { + let id = options.id + // var title = options.title + let series = options.series + let legend = getLegend(series) + series = setSeriesLabel(series) + let myChart = echarts.init(document.getElementById(id)) + console.log(series) + console.log(legend) + // 鎸囧畾鍥捐〃鐨勯厤缃」鍜屾暟鎹� + myChart.setOption({ + series: series + }) + window.addEventListener('resize', () => { myChart.resize() }) +} + +function setSeriesLabel(series) { + for (var i = 0; i < series.length; i++) { + series[i]['label'] = { + position: 'inside', + formatter: '{d}%', + color: '#090607' + } + } + return series +} + +function getLegend(series) { + var legend = [] + for (var i = 0; i < series.length; i++) { + var datas = series[i].data + for (var j = 0; j < datas.length; j++) { + legend[legend.length] = datas[j].name + } + } + return legend +} +export default { + drawSafetyPie +} diff --git a/src/components/plugin/CanvasMarkers.js b/src/components/plugin/CanvasMarkers.js new file mode 100644 index 0000000..b2693df --- /dev/null +++ b/src/components/plugin/CanvasMarkers.js @@ -0,0 +1,386 @@ +'use strict' +import Rbush from 'rbush' + +function init(L) { + var CanvasIconLayer = (L.Layer ? L.Layer : L.Class).extend({ + + // Add event listeners to initialized section. + initialize: function(options) { + L.setOptions(this, options) + this._onClickListeners = [] + this._onHoverListeners = [] + }, + + setOptions: function(options) { + L.setOptions(this, options) + return this.redraw() + }, + redraw: function() { + this._redraw(true) + }, + + // Multiple layers at a time for rBush performance + addMarkers: function(markers) { + var self = this + var tmpMark = [] + var tmpLatLng = [] + + markers.forEach(function(marker) { + if (!((marker.options.pane === 'markerPane') && marker.options.icon)) { + console.error('Layer isn\'t a marker') + return + } + + var latlng = marker.getLatLng() + var isDisplaying = self._map.getBounds().contains(latlng) + var s = self._addMarker(marker, latlng, isDisplaying) + + // Only add to Point Lookup if we are on map + if (isDisplaying === true) tmpMark.push(s[0]) + + tmpLatLng.push(s[1]) + }) + + self._markers.load(tmpMark) + self._latlngMarkers.load(tmpLatLng) + }, + + // Adds single layer at a time. Less efficient for rBush + addMarker: function(marker) { + var self = this + var latlng = marker.getLatLng() + var isDisplaying = self._map.getBounds().contains(latlng) + var dat = self._addMarker(marker, latlng, isDisplaying) + + // Only add to Point Lookup if we are on map + if (isDisplaying === true) self._markers.insert(dat[0]) + + self._latlngMarkers.insert(dat[1]) + }, + + addLayer: function(layer) { + if ((layer.options.pane === 'markerPane') && layer.options.icon) this.addMarker(layer) + else console.error('Layer isn\'t a marker') + }, + + addLayers: function(layers) { + this.addMarkers(layers) + }, + + removeLayer: function(layer) { + this.removeMarker(layer, true) + }, + + removeMarker: function(marker, redraw) { + var self = this + + // If we are removed point + if (marker['minX']) marker = marker.data + + var latlng = marker.getLatLng() + var isDisplaying = self._map.getBounds().contains(latlng) + + var markerData = { + + minX: latlng.lng, + minY: latlng.lat, + maxX: latlng.lng, + maxY: latlng.lat, + data: marker + } + + self._latlngMarkers.remove(markerData, function(a, b) { + return a.data._leaflet_id === b.data._leaflet_id + }) + + self._latlngMarkers.total-- + self._latlngMarkers.dirty++ + + if (isDisplaying === true && redraw === true) { + self._redraw(true) + } + }, + + onAdd: function(map) { + this._map = map + + if (!this._canvas) this._initCanvas() + + if (this.options.pane) this.getPane().appendChild(this._canvas) + else map._panes.overlayPane.appendChild(this._canvas) + + map.on('moveend', this._reset, this) + map.on('resize', this._reset, this) + + map.on('click', this._executeListeners, this) + map.on('mousemove', this._executeListeners, this) + map.on('zoomstart', this._canvasHide, this) + map.on('zoomend', this._canvasShow, this) + }, + + onRemove: function(map) { + if (this.options.pane) this.getPane().removeChild(this._canvas) + else map.getPanes().overlayPane.removeChild(this._canvas) + + map.off('click', this._executeListeners, this) + map.off('mousemove', this._executeListeners, this) + + map.off('moveend', this._reset, this) + map.off('resize', this._reset, this) + map.off('zoomstart', this._canvasHide, this) + map.off('zoomend', this._canvasShow, this) + }, + + addTo: function(map) { + map.addLayer(this) + return this + }, + + clearLayers: function() { + this._latlngMarkers = null + this._markers = null + this._redraw(true) + }, + _canvasHide: function() { + this._canvas.style.visibility = 'hidden' + }, + _canvasShow: function() { + this._canvas.style.visibility = 'visible' + }, + _addMarker: function(marker, latlng, isDisplaying) { + var self = this + // Needed for pop-up & tooltip to work. + marker._map = self._map + + // _markers contains Points of markers currently displaying on map + if (!self._markers) self._markers = new Rbush() + + // _latlngMarkers contains Lat\Long coordinates of all markers in layer. + if (!self._latlngMarkers) { + self._latlngMarkers = new Rbush() + self._latlngMarkers.dirty = 0 + self._latlngMarkers.total = 0 + } + + L.Util.stamp(marker) + + var pointPos = self._map.latLngToContainerPoint(latlng) + var iconSize = marker.options.icon.options.iconSize + + var adjX = iconSize[0] / 2 + var adjY = iconSize[1] / 2 + var ret = [({ + minX: (pointPos.x - adjX), + minY: (pointPos.y - adjY), + maxX: (pointPos.x + adjX), + maxY: (pointPos.y + adjY), + data: marker + }), ({ + minX: latlng.lng, + minY: latlng.lat, + maxX: latlng.lng, + maxY: latlng.lat, + data: marker + })] + + self._latlngMarkers.dirty++ + self._latlngMarkers.total++ + + // Only draw if we are on map + if (isDisplaying === true) self._drawMarker(marker, pointPos) + + return ret + }, + + _drawMarker: function(marker, pointPos) { + var self = this + + if (!this._imageLookup) this._imageLookup = {} + if (!pointPos) { + pointPos = self._map.latLngToContainerPoint(marker.getLatLng()) + } + + var iconUrl = marker.options.icon.options.iconUrl + + if (marker.canvas_img) { + self._drawImage(marker, pointPos) + } else { + if (self._imageLookup[iconUrl]) { + marker.canvas_img = self._imageLookup[iconUrl][0] + + if (self._imageLookup[iconUrl][1] === false) { + self._imageLookup[iconUrl][2].push([marker, pointPos]) + } else { + self._drawImage(marker, pointPos) + } + } else { + var i = new Image() + i.src = iconUrl + marker.canvas_img = i + + // Image,isLoaded,marker\pointPos ref + self._imageLookup[iconUrl] = [i, false, [[marker, pointPos]]] + + i.onload = function() { + self._imageLookup[iconUrl][1] = true + self._imageLookup[iconUrl][2].forEach(function(e) { + self._drawImage(e[0], e[1]) + }) + } + } + } + }, + + _drawImage: function(marker, pointPos) { + var options = marker.options.icon.options + + this._context.drawImage( + marker.canvas_img, + pointPos.x - options.iconAnchor[0], + pointPos.y - options.iconAnchor[1], + options.iconSize[0], + options.iconSize[1] + ) + }, + + _reset: function() { + var topLeft = this._map.containerPointToLayerPoint([0, 0]) + L.DomUtil.setPosition(this._canvas, topLeft) + + var size = this._map.getSize() + + this._canvas.width = size.x + this._canvas.height = size.y + + this._redraw() + }, + + _redraw: function(clear) { + var self = this + + if (clear) this._context.clearRect(0, 0, this._canvas.width, this._canvas.height) + if (!this._map || !this._latlngMarkers) return + + var tmp = [] + + // If we are 10% individual inserts\removals, reconstruct lookup for efficiency + if (self._latlngMarkers.dirty / self._latlngMarkers.total >= 0.1) { + self._latlngMarkers.all().forEach(function(e) { + tmp.push(e) + }) + + self._latlngMarkers.clear() + self._latlngMarkers.load(tmp) + self._latlngMarkers.dirty = 0 + tmp = [] + } + + var mapBounds = self._map.getBounds() + + // Only re-draw what we are showing on the map. + + var mapBoxCoords = { + + minX: mapBounds.getWest(), + minY: mapBounds.getSouth(), + maxX: mapBounds.getEast(), + maxY: mapBounds.getNorth() + } + + self._latlngMarkers.search(mapBoxCoords).forEach(function(e) { + // Readjust Point Map + var pointPos = self._map.latLngToContainerPoint(e.data.getLatLng()) + + var iconSize = e.data.options.icon.options.iconSize + var adjX = iconSize[0] / 2 + var adjY = iconSize[1] / 2 + + var newCoords = { + minX: (pointPos.x - adjX), + minY: (pointPos.y - adjY), + maxX: (pointPos.x + adjX), + maxY: (pointPos.y + adjY), + data: e.data + } + + tmp.push(newCoords) + + // Redraw points + self._drawMarker(e.data, pointPos) + }) + + // Clear rBush & Bulk Load for performance + this._markers.clear() + this._markers.load(tmp) + }, + + _initCanvas: function() { + this._canvas = L.DomUtil.create('canvas', 'leaflet-canvas-icon-layer leaflet-layer') + var originProp = L.DomUtil.testProp(['transformOrigin', 'WebkitTransformOrigin', 'msTransformOrigin']) + this._canvas.style[originProp] = '50% 50%' + + var size = this._map.getSize() + this._canvas.width = size.x + this._canvas.height = size.y + + this._context = this._canvas.getContext('2d') + + var animated = this._map.options.zoomAnimation && L.Browser.any3d + L.DomUtil.addClass(this._canvas, 'leaflet-zoom-' + (animated ? 'animated' : 'hide')) + }, + + addOnClickListener: function(listener) { + this._onClickListeners.push(listener) + }, + + addOnHoverListener: function(listener) { + this._onHoverListeners.push(listener) + }, + + _executeListeners: function(event) { + if (!this._markers) return + + var me = this + var x = event.containerPoint.x + var y = event.containerPoint.y + + if (me._openToolTip) { + me._openToolTip.closeTooltip() + delete me._openToolTip + } + + var ret = this._markers.search({ minX: x, minY: y, maxX: x, maxY: y }) + + if (ret && ret.length > 0) { + me._map._container.style.cursor = 'pointer' + + if (event.type === 'click') { + var hasPopup = ret[0].data.getPopup() + if (hasPopup) ret[0].data.openPopup() + + me._onClickListeners.forEach(function(listener) { listener(event, ret) }) + } + + if (event.type === 'mousemove') { + var hasTooltip = ret[0].data.getTooltip() + if (hasTooltip) { + me._openToolTip = ret[0].data + ret[0].data.openTooltip() + } + + me._onHoverListeners.forEach(function(listener) { listener(event, ret) }) + } + } else { + me._map._container.style.cursor = '' + } + } + }) + + L.canvasIconLayer = function(options) { + return new CanvasIconLayer(options) + } +} + +export default { + init +} diff --git a/src/components/plugin/CustomPopup.js b/src/components/plugin/CustomPopup.js new file mode 100644 index 0000000..1ea6b84 --- /dev/null +++ b/src/components/plugin/CustomPopup.js @@ -0,0 +1,74 @@ +'use strict' + +const init = (L) => { + L.CustomPopup = L.Popup.extend({ + _initLayout: () => { + // 姝ゅ鐢熸垚鐨勫鍣紝Leaflet浼氭牴鎹叾绫诲悕鑷姩閫傞厤Transform锛屽尮閰嶆牱寮忥紝鎵�浠ュ鏋滆鑷畾涔夌殑璇濓紝璇ラ儴鍒嗘牱寮忚鑷繁閲嶅啓锛屾垜杩欓噷鍙В鍐充簡鑷�傚簲瀹瑰櫒鐨勯棶棰橈紝浠ヤ笅閲囩敤鍘熺敓瀹瑰櫒锛屾墍浠ュ悗闈㈡垜浼氬姞涓婃牱寮忚鐩栥�� + let prefix = 'leaflet-popup' + let container = (this._container = L.DomUtil.create( + 'div', + prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-animated' + )) + let wrapper = container + this._contentNode = L.DomUtil.create('div', prefix + '-content', wrapper) + L.DomEvent.disableClickPropagation(wrapper) + .disableScrollPropagation(this._contentNode) + .on(wrapper, 'contextmenu', L.DomEvent.stopPropagation) + this._tipContainer = L.DomUtil.create( + 'div', + prefix + '-tip-container', + container + ) + this._tip = L.DomUtil.create('div', prefix + '-tip', this._tipContainer) + }, + // 浣嶇疆鏇存柊 + _updatePosition: () => { + if (!this._map) { + return + } + let pos = this._map.latLngToLayerPoint(this._latlng) + let offset = L.point(this.options.offset) + let anchor = [0, 0] + if (this._zoomAnimated) { + setPosition(this._container, pos.add(anchor)) + } else { + offset = offset.add(pos).add(anchor) + } + let bottom = (this._containerBottom = -offset.y) + let left = (this._containerLeft = + -Math.round(this._containerWidth / 2) + offset.x) + // bottom position the popup in case the height of the popup changes (images loading etc) + this._container.style.bottom = bottom + 'px' + this._container.style.left = left + 'px' + }, + // 閲嶅啓灞傜骇鍙樺寲瑙﹀彂鏇存柊 + _animateZoom: (e) => { + let pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center) + let anchor = [0, 0] + setPosition(this._container, pos.add(anchor)) + } + }) + +// 閲嶅啓setTransform锛岀敱浜庝笉鍐嶅浐瀹氬搴︼紝鎵�浠ュ鍔爐ranslateX(-50%)姘村钩灞呬腑 + const setTransform = (el, offset, scale) => { + let pos = offset || new L.Point(0, 0) + el.style[L.DomUtil.TRANSFORM] = + (L.Browser.ie3d + ? 'translate(' + pos.x + 'px,' + pos.y + 'px,0) translateX(-50%)' + : 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0) translateX(-50%)') + + (scale ? ' scale(' + scale + ')' : '') + } +// 鍥犱负閲嶅啓浜唖etTransform锛屾墍浠etPosition涔熻閲嶆柊鎸囧悜鏂规硶 + const setPosition = (el, point) => { + el._leaflet_pos = point + if (L.Browser.any3d) { + setTransform(el, point) + } else { + el.style.left = point.x + 'px' + el.style.top = point.y + 'px' + } + } +} +export default { + init +} diff --git a/src/components/plugin/Editable.js b/src/components/plugin/Editable.js new file mode 100644 index 0000000..c2ae865 --- /dev/null +++ b/src/components/plugin/Editable.js @@ -0,0 +1,1963 @@ +'use strict' +const init = (L) => { + (function(factory, window) { + // define an AMD module that relies on 'leaflet' + if (typeof define === 'function' && window.define.amd) { + window.define(['leaflet'], factory) + + // define a Common JS module that relies on 'leaflet' + } else if (typeof exports === 'object') { + module.exports = factory(require('leaflet')) + } + + // attach your plugin to the global 'L' variable + if (typeof window !== 'undefined' && L) { + factory(L) + } + }(function(L) { + // 馃崅miniclass CancelableEvent (Event objects) + // 馃崅method cancel() + // Cancel any subsequent action. + + // 馃崅miniclass VertexEvent (Event objects) + // 馃崅property vertex: VertexMarker + // The vertex that fires the event. + + // 馃崅miniclass ShapeEvent (Event objects) + // 馃崅property shape: Array + // The shape (LatLngs array) subject of the action. + + // 馃崅miniclass CancelableVertexEvent (Event objects) + // 馃崅inherits VertexEvent + // 馃崅inherits CancelableEvent + + // 馃崅miniclass CancelableShapeEvent (Event objects) + // 馃崅inherits ShapeEvent + // 馃崅inherits CancelableEvent + + // 馃崅miniclass LayerEvent (Event objects) + // 馃崅property layer: object + // The Layer (Marker, Polyline鈥�) subject of the action. + + // 馃崅namespace Editable; 馃崅class Editable; 馃崅aka L.Editable + // Main edition handler. By default, it is attached to the map + // as `map.editTools` property. + // Leaflet.Editable is made to be fully extendable. You have three ways to customize + // the behaviour: using options, listening to events, or extending. + L.Editable = L.Evented.extend({ + + statics: { + FORWARD: 1, + BACKWARD: -1 + }, + + options: { + + // You can pass them when creating a map using the `editOptions` key. + // 馃崅option zIndex: int = 1000 + // The default zIndex of the editing tools. + zIndex: 1000, + + // 馃崅option polygonClass: class = L.Polygon + // Class to be used when creating a new Polygon. + polygonClass: L.Polygon, + + // 馃崅option polylineClass: class = L.Polyline + // Class to be used when creating a new Polyline. + polylineClass: L.Polyline, + + // 馃崅option markerClass: class = L.Marker + // Class to be used when creating a new Marker. + markerClass: L.Marker, + + // 馃崅option rectangleClass: class = L.Rectangle + // Class to be used when creating a new Rectangle. + rectangleClass: L.Rectangle, + + // 馃崅option circleClass: class = L.Circle + // Class to be used when creating a new Circle. + circleClass: L.Circle, + + // 馃崅option drawingCSSClass: string = 'leaflet-editable-drawing' + // CSS class to be added to the map container while drawing. + drawingCSSClass: 'leaflet-editable-drawing', + + // 馃崅option drawingCursor: const = 'crosshair' + // Cursor mode set to the map while drawing. + drawingCursor: 'crosshair', + + // 馃崅option editLayer: Layer = new L.LayerGroup() + // Layer used to store edit tools (vertex, line guide鈥�). + editLayer: undefined, + + // 馃崅option featuresLayer: Layer = new L.LayerGroup() + // Default layer used to store drawn features (Marker, Polyline鈥�). + featuresLayer: undefined, + + // 馃崅option polylineEditorClass: class = PolylineEditor + // Class to be used as Polyline editor. + polylineEditorClass: undefined, + + // 馃崅option polygonEditorClass: class = PolygonEditor + // Class to be used as Polygon editor. + polygonEditorClass: undefined, + + // 馃崅option markerEditorClass: class = MarkerEditor + // Class to be used as Marker editor. + markerEditorClass: undefined, + + // 馃崅option rectangleEditorClass: class = RectangleEditor + // Class to be used as Rectangle editor. + rectangleEditorClass: undefined, + + // 馃崅option circleEditorClass: class = CircleEditor + // Class to be used as Circle editor. + circleEditorClass: undefined, + + // 馃崅option lineGuideOptions: hash = {} + // Options to be passed to the line guides. + lineGuideOptions: {}, + + // 馃崅option skipMiddleMarkers: boolean = false + // Set this to true if you don't want middle markers. + skipMiddleMarkers: false + + }, + + initialize: function(map, options) { + L.setOptions(this, options) + this._lastZIndex = this.options.zIndex + this.map = map + this.editLayer = this.createEditLayer() + this.featuresLayer = this.createFeaturesLayer() + this.forwardLineGuide = this.createLineGuide() + this.backwardLineGuide = this.createLineGuide() + }, + + fireAndForward: function(type, e) { + e = e || {} + e.editTools = this + this.fire(type, e) + this.map.fire(type, e) + }, + + createLineGuide: function() { + let options = L.extend({ + dashArray: '5,10', + weight: 1, + interactive: false + }, this.options.lineGuideOptions) + return L.polyline([], options) + }, + + createVertexIcon: function(options) { + return L.Browser.mobile && L.Browser.touch ? new L.Editable.TouchVertexIcon(options) : new L.Editable.VertexIcon(options) + }, + + createEditLayer: function() { + return this.options.editLayer || new L.LayerGroup().addTo(this.map) + }, + + createFeaturesLayer: function() { + return this.options.featuresLayer || new L.LayerGroup().addTo(this.map) + }, + + moveForwardLineGuide: function(latlng) { + if (this.forwardLineGuide._latlngs.length) { + this.forwardLineGuide._latlngs[1] = latlng + this.forwardLineGuide._bounds.extend(latlng) + this.forwardLineGuide.redraw() + } + }, + + moveBackwardLineGuide: function(latlng) { + if (this.backwardLineGuide._latlngs.length) { + this.backwardLineGuide._latlngs[1] = latlng + this.backwardLineGuide._bounds.extend(latlng) + this.backwardLineGuide.redraw() + } + }, + + anchorForwardLineGuide: function(latlng) { + this.forwardLineGuide._latlngs[0] = latlng + this.forwardLineGuide._bounds.extend(latlng) + this.forwardLineGuide.redraw() + }, + + anchorBackwardLineGuide: function(latlng) { + this.backwardLineGuide._latlngs[0] = latlng + this.backwardLineGuide._bounds.extend(latlng) + this.backwardLineGuide.redraw() + }, + + attachForwardLineGuide: function() { + this.editLayer.addLayer(this.forwardLineGuide) + }, + + attachBackwardLineGuide: function() { + this.editLayer.addLayer(this.backwardLineGuide) + }, + + detachForwardLineGuide: function() { + this.forwardLineGuide.setLatLngs([]) + this.editLayer.removeLayer(this.forwardLineGuide) + }, + + detachBackwardLineGuide: function() { + this.backwardLineGuide.setLatLngs([]) + this.editLayer.removeLayer(this.backwardLineGuide) + }, + + blockEvents: function() { + // Hack: force map not to listen to other layers events while drawing. + if (!this._oldTargets) { + this._oldTargets = this.map._targets + this.map._targets = {} + } + }, + + unblockEvents: function() { + if (this._oldTargets) { + // Reset, but keep targets created while drawing. + this.map._targets = L.extend(this.map._targets, this._oldTargets) + delete this._oldTargets + } + }, + + registerForDrawing: function(editor) { + if (this._drawingEditor) this.unregisterForDrawing(this._drawingEditor) + this.blockEvents() + editor.reset() // Make sure editor tools still receive events. + this._drawingEditor = editor + this.map.on('mousemove touchmove', editor.onDrawingMouseMove, editor) + this.map.on('mousedown', this.onMousedown, this) + this.map.on('mouseup', this.onMouseup, this) + L.DomUtil.addClass(this.map._container, this.options.drawingCSSClass) + this.defaultMapCursor = this.map._container.style.cursor + this.map._container.style.cursor = this.options.drawingCursor + }, + + unregisterForDrawing: function(editor) { + this.unblockEvents() + L.DomUtil.removeClass(this.map._container, this.options.drawingCSSClass) + this.map._container.style.cursor = this.defaultMapCursor + editor = editor || this._drawingEditor + if (!editor) return + this.map.off('mousemove touchmove', editor.onDrawingMouseMove, editor) + this.map.off('mousedown', this.onMousedown, this) + this.map.off('mouseup', this.onMouseup, this) + if (editor !== this._drawingEditor) return + delete this._drawingEditor + if (editor._drawing) editor.cancelDrawing() + }, + + onMousedown: function(e) { + if (e.originalEvent.which !== 1) return + this._mouseDown = e + this._drawingEditor.onDrawingMouseDown(e) + }, + + onMouseup: function(e) { + if (this._mouseDown) { + let editor = this._drawingEditor + let mouseDown = this._mouseDown + this._mouseDown = null + editor.onDrawingMouseUp(e) + if (this._drawingEditor !== editor) return // onDrawingMouseUp may call unregisterFromDrawing. + let origin = L.point(mouseDown.originalEvent.clientX, mouseDown.originalEvent.clientY) + let distance = L.point(e.originalEvent.clientX, e.originalEvent.clientY).distanceTo(origin) + if (Math.abs(distance) < 9 * (window.devicePixelRatio || 1)) this._drawingEditor.onDrawingClick(e) + } + }, + + // 馃崅section Public methods + // You will generally access them by the `map.editTools` + // instance: + // + // `map.editTools.startPolyline();` + + // 馃崅method drawing(): boolean + // Return true if any drawing action is ongoing. + drawing: function() { + return this._drawingEditor && this._drawingEditor.drawing() + }, + + // 馃崅method stopDrawing() + // When you need to stop any ongoing drawing, without needing to know which editor is active. + stopDrawing: function() { + this.unregisterForDrawing() + }, + + // 馃崅method commitDrawing() + // When you need to commit any ongoing drawing, without needing to know which editor is active. + commitDrawing: function(e) { + if (!this._drawingEditor) return + this._drawingEditor.commitDrawing(e) + }, + + connectCreatedToMap: function(layer) { + return this.featuresLayer.addLayer(layer) + }, + + // 馃崅method startPolyline(latlng: L.LatLng, options: hash): L.Polyline + // Start drawing a Polyline. If `latlng` is given, a first point will be added. In any case, continuing on user click. + // If `options` is given, it will be passed to the Polyline class constructor. + startPolyline: function(latlng, options) { + let line = this.createPolyline([], options) + line.enableEdit(this.map).newShape(latlng) + return line + }, + + // 馃崅method startPolygon(latlng: L.LatLng, options: hash): L.Polygon + // Start drawing a Polygon. If `latlng` is given, a first point will be added. In any case, continuing on user click. + // If `options` is given, it will be passed to the Polygon class constructor. + startPolygon: function(latlng, options) { + let polygon = this.createPolygon([], options) + polygon.enableEdit(this.map).newShape(latlng) + return polygon + }, + + // 馃崅method startMarker(latlng: L.LatLng, options: hash): L.Marker + // Start adding a Marker. If `latlng` is given, the Marker will be shown first at this point. + // In any case, it will follow the user mouse, and will have a final `latlng` on next click (or touch). + // If `options` is given, it will be passed to the Marker class constructor. + startMarker: function(latlng, options) { + latlng = latlng || this.map.getCenter().clone() + let marker = this.createMarker(latlng, options) + marker.enableEdit(this.map).startDrawing() + return marker + }, + + // 馃崅method startRectangle(latlng: L.LatLng, options: hash): L.Rectangle + // Start drawing a Rectangle. If `latlng` is given, the Rectangle anchor will be added. In any case, continuing on user drag. + // If `options` is given, it will be passed to the Rectangle class constructor. + startRectangle: function(latlng, options) { + let corner = latlng || L.latLng([0, 0]) + let bounds = new L.LatLngBounds(corner, corner) + let rectangle = this.createRectangle(bounds, options) + rectangle.enableEdit(this.map).startDrawing() + return rectangle + }, + + // 馃崅method startCircle(latlng: L.LatLng, options: hash): L.Circle + // Start drawing a Circle. If `latlng` is given, the Circle anchor will be added. In any case, continuing on user drag. + // If `options` is given, it will be passed to the Circle class constructor. + startCircle: function(latlng, options) { + latlng = latlng || this.map.getCenter().clone() + let circle = this.createCircle(latlng, options) + circle.enableEdit(this.map).startDrawing() + return circle + }, + + startHole: function(editor, latlng) { + editor.newHole(latlng) + }, + + createLayer: function(Klass, latlngs, options) { + options = L.Util.extend({ editOptions: { editTools: this } }, options) + let layer = new Klass(latlngs, options) + // 馃崅namespace Editable + // 馃崅event editable:created: LayerEvent + // Fired when a new feature (Marker, Polyline鈥�) is created. + this.fireAndForward('editable:created', { layer: layer }) + return layer + }, + + createPolyline: function(latlngs, options) { + return this.createLayer((options && options.polylineClass) || this.options.polylineClass, latlngs, options) + }, + + createPolygon: function(latlngs, options) { + return this.createLayer((options && options.polygonClass) || this.options.polygonClass, latlngs, options) + }, + + createMarker: function(latlng, options) { + return this.createLayer((options && options.markerClass) || this.options.markerClass, latlng, options) + }, + + createRectangle: function(bounds, options) { + return this.createLayer((options && options.rectangleClass) || this.options.rectangleClass, bounds, options) + }, + + createCircle: function(latlng, options) { + return this.createLayer((options && options.circleClass) || this.options.circleClass, latlng, options) + } + + }) + + L.extend(L.Editable, { + + makeCancellable: function(e) { + e.cancel = function() { + e._cancelled = true + } + } + + }) + + // 馃崅namespace Map; 馃崅class Map + // Leaflet.Editable add options and events to the `L.Map` object. + // See `Editable` events for the list of events fired on the Map. + // 馃崅example + // + // ```js + // let map = L.map('map', { + // editable: true, + // editOptions: { + // 鈥� + // } + // }); + // ``` + // 馃崅section Editable Map Options + L.Map.mergeOptions({ + + // 馃崅namespace Map + // 馃崅section Map Options + // 馃崅option EditToolsClass: class = L.Editable + // Class to be used as vertex, for path editing. + EditToolsClass: L.Editable, + + // 馃崅option editable: boolean = false + // Whether to create a L.Editable instance at map init. + editable: false, + + // 馃崅option editOptions: hash = {} + // Options to pass to L.Editable when instantiating. + editOptions: {} + + }) + + L.Map.addInitHook(function() { + this.whenReady(function() { + if (this.options.editable) { + this.editTools = new this.options.EditToolsClass(this, this.options.editOptions) + } + }) + }) + + L.Editable.VertexIcon = L.DivIcon.extend({ + + options: { + iconSize: new L.Point(8, 8) + } + + }) + + L.Editable.TouchVertexIcon = L.Editable.VertexIcon.extend({ + + options: { + iconSize: new L.Point(20, 20) + } + + }) + + // 馃崅namespace Editable; 馃崅class VertexMarker; Handler for dragging path vertices. + L.Editable.VertexMarker = L.Marker.extend({ + + options: { + draggable: true, + className: 'leaflet-vertex-icon leaflet-custom-icon' + }, + + // 馃崅section Public methods + // The marker used to handle path vertex. You will usually interact with a `VertexMarker` + // instance when listening for events like `editable:vertex:ctrlclick`. + + initialize: function(latlng, latlngs, editor, options) { + // We don't use this._latlng, because on drag Leaflet replace it while + // we want to keep reference. + this.latlng = latlng + this.latlngs = latlngs + this.editor = editor + L.Marker.prototype.initialize.call(this, latlng, options) + this.options.icon = this.editor.tools.createVertexIcon({ className: this.options.className }) + this.latlng.__vertex = this + this.editor.editLayer.addLayer(this) + this.setZIndexOffset(editor.tools._lastZIndex + 1) + }, + + onAdd: function(map) { + L.Marker.prototype.onAdd.call(this, map) + this.on('drag', this.onDrag) + this.on('dragstart', this.onDragStart) + this.on('dragend', this.onDragEnd) + this.on('mouseup', this.onMouseup) + this.on('click', this.onClick) + this.on('contextmenu', this.onContextMenu) + this.on('mousedown touchstart', this.onMouseDown) + this.on('mouseover', this.onMouseOver) + this.on('mouseout', this.onMouseOut) + this.addMiddleMarkers() + }, + + onRemove: function(map) { + if (this.middleMarker) this.middleMarker.delete() + delete this.latlng.__vertex + this.off('drag', this.onDrag) + this.off('dragstart', this.onDragStart) + this.off('dragend', this.onDragEnd) + this.off('mouseup', this.onMouseup) + this.off('click', this.onClick) + this.off('contextmenu', this.onContextMenu) + this.off('mousedown touchstart', this.onMouseDown) + this.off('mouseover', this.onMouseOver) + this.off('mouseout', this.onMouseOut) + L.Marker.prototype.onRemove.call(this, map) + }, + + onDrag: function(e) { + e.vertex = this + this.editor.onVertexMarkerDrag(e) + let iconPos = L.DomUtil.getPosition(this._icon) + let latlng = this._map.layerPointToLatLng(iconPos) + this.latlng.update(latlng) + this._latlng = this.latlng // Push back to Leaflet our reference. + this.editor.refresh() + if (this.middleMarker) this.middleMarker.updateLatLng() + let next = this.getNext() + if (next && next.middleMarker) next.middleMarker.updateLatLng() + }, + + onDragStart: function(e) { + e.vertex = this + this.editor.onVertexMarkerDragStart(e) + }, + + onDragEnd: function(e) { + e.vertex = this + this.editor.onVertexMarkerDragEnd(e) + }, + + onClick: function(e) { + e.vertex = this + this.editor.onVertexMarkerClick(e) + }, + + onMouseup: function(e) { + L.DomEvent.stop(e) + e.vertex = this + this.editor.map.fire('mouseup', e) + }, + + onContextMenu: function(e) { + e.vertex = this + this.editor.onVertexMarkerContextMenu(e) + }, + + onMouseDown: function(e) { + e.vertex = this + this.editor.onVertexMarkerMouseDown(e) + }, + + onMouseOver: function(e) { + e.vertex = this + this.editor.onVertexMarkerMouseOver(e) + }, + + onMouseOut: function(e) { + e.vertex = this + this.editor.onVertexMarkerMouseOut(e) + }, + + // 馃崅method delete() + // Delete a vertex and the related LatLng. + delete: function() { + let next = this.getNext() // Compute before changing latlng + this.latlngs.splice(this.getIndex(), 1) + this.editor.editLayer.removeLayer(this) + this.editor.onVertexDeleted({ latlng: this.latlng, vertex: this }) + if (!this.latlngs.length) this.editor.deleteShape(this.latlngs) + if (next) next.resetMiddleMarker() + this.editor.refresh() + }, + + // 馃崅method getIndex(): int + // Get the index of the current vertex among others of the same LatLngs group. + getIndex: function() { + return this.latlngs.indexOf(this.latlng) + }, + + // 馃崅method getLastIndex(): int + // Get last vertex index of the LatLngs group of the current vertex. + getLastIndex: function() { + return this.latlngs.length - 1 + }, + + // 馃崅method getPrevious(): VertexMarker + // Get the previous VertexMarker in the same LatLngs group. + getPrevious: function() { + if (this.latlngs.length < 2) return + let index = this.getIndex() + let previousIndex = index - 1 + if (index === 0 && this.editor.CLOSED) previousIndex = this.getLastIndex() + let previous = this.latlngs[previousIndex] + if (previous) return previous.__vertex + }, + + // 馃崅method getNext(): VertexMarker + // Get the next VertexMarker in the same LatLngs group. + getNext: function() { + if (this.latlngs.length < 2) return + let index = this.getIndex() + let nextIndex = index + 1 + if (index === this.getLastIndex() && this.editor.CLOSED) nextIndex = 0 + let next = this.latlngs[nextIndex] + if (next) return next.__vertex + }, + + addMiddleMarker: function(previous) { + if (!this.editor.hasMiddleMarkers()) return + previous = previous || this.getPrevious() + if (previous && !this.middleMarker) this.middleMarker = this.editor.addMiddleMarker(previous, this, this.latlngs, this.editor) + }, + + addMiddleMarkers: function() { + if (!this.editor.hasMiddleMarkers()) return + let previous = this.getPrevious() + if (previous) this.addMiddleMarker(previous) + let next = this.getNext() + if (next) next.resetMiddleMarker() + }, + + resetMiddleMarker: function() { + if (this.middleMarker) this.middleMarker.delete() + this.addMiddleMarker() + }, + + // 馃崅method split() + // Split the vertex LatLngs group at its index, if possible. + split: function() { + if (!this.editor.splitShape) return // Only for PolylineEditor + this.editor.splitShape(this.latlngs, this.getIndex()) + }, + + // 馃崅method continue() + // Continue the vertex LatLngs from this vertex. Only active for first and last vertices of a Polyline. + continue: function() { + if (!this.editor.continueBackward) return // Only for PolylineEditor + let index = this.getIndex() + if (index === 0) this.editor.continueBackward(this.latlngs) + else if (index === this.getLastIndex()) this.editor.continueForward(this.latlngs) + } + + }) + + L.Editable.mergeOptions({ + + // 馃崅namespace Editable + // 馃崅option VertexMarkerClass: class = VertexMarker + // Class to be used as vertex, for path editing. + VertexMarkerClass: L.Editable.VertexMarker + + }) + + L.Editable.MiddleMarker = L.Marker.extend({ + + options: { + opacity: 0.5, + className: 'leaflet-div-icon leaflet-middle-icon', + draggable: true + }, + + initialize: function(left, right, latlngs, editor, options) { + this.left = left + this.right = right + this.editor = editor + this.latlngs = latlngs + L.Marker.prototype.initialize.call(this, this.computeLatLng(), options) + this._opacity = this.options.opacity + this.options.icon = this.editor.tools.createVertexIcon({ className: this.options.className }) + this.editor.editLayer.addLayer(this) + this.setVisibility() + }, + + setVisibility: function() { + let leftPoint = this._map.latLngToContainerPoint(this.left.latlng) + let rightPoint = this._map.latLngToContainerPoint(this.right.latlng) + let size = L.point(this.options.icon.options.iconSize) + if (leftPoint.distanceTo(rightPoint) < size.x * 3) this.hide() + else this.show() + }, + + show: function() { + this.setOpacity(this._opacity) + }, + + hide: function() { + this.setOpacity(0) + }, + + updateLatLng: function() { + this.setLatLng(this.computeLatLng()) + this.setVisibility() + }, + + computeLatLng: function() { + let leftPoint = this.editor.map.latLngToContainerPoint(this.left.latlng) + let rightPoint = this.editor.map.latLngToContainerPoint(this.right.latlng) + let y = (leftPoint.y + rightPoint.y) / 2 + let x = (leftPoint.x + rightPoint.x) / 2 + return this.editor.map.containerPointToLatLng([x, y]) + }, + + onAdd: function(map) { + L.Marker.prototype.onAdd.call(this, map) + L.DomEvent.on(this._icon, 'mousedown touchstart', this.onMouseDown, this) + map.on('zoomend', this.setVisibility, this) + }, + + onRemove: function(map) { + delete this.right.middleMarker + L.DomEvent.off(this._icon, 'mousedown touchstart', this.onMouseDown, this) + map.off('zoomend', this.setVisibility, this) + L.Marker.prototype.onRemove.call(this, map) + }, + + onMouseDown: function(e) { + let iconPos = L.DomUtil.getPosition(this._icon) + let latlng = this.editor.map.layerPointToLatLng(iconPos) + e = { + originalEvent: e, + latlng: latlng + } + if (this.options.opacity === 0) return + L.Editable.makeCancellable(e) + this.editor.onMiddleMarkerMouseDown(e) + if (e._cancelled) return + this.latlngs.splice(this.index(), 0, e.latlng) + this.editor.refresh() + let icon = this._icon + let marker = this.editor.addVertexMarker(e.latlng, this.latlngs) + this.editor.onNewVertex(marker) + /* Hack to workaround browser not firing touchend when element is no more on DOM */ + let parent = marker._icon.parentNode + parent.removeChild(marker._icon) + marker._icon = icon + parent.appendChild(marker._icon) + marker._initIcon() + marker._initInteraction() + marker.setOpacity(1) + /* End hack */ + // Transfer ongoing dragging to real marker + L.Draggable._dragging = false + marker.dragging._draggable._onDown(e.originalEvent) + this.delete() + }, + + delete: function() { + this.editor.editLayer.removeLayer(this) + }, + + index: function() { + return this.latlngs.indexOf(this.right.latlng) + } + + }) + + L.Editable.mergeOptions({ + + // 馃崅namespace Editable + // 馃崅option MiddleMarkerClass: class = VertexMarker + // Class to be used as middle vertex, pulled by the user to create a new point in the middle of a path. + MiddleMarkerClass: L.Editable.MiddleMarker + + }) + + // 馃崅namespace Editable; 馃崅class BaseEditor; 馃崅aka L.Editable.BaseEditor + // When editing a feature (Marker, Polyline鈥�), an editor is attached to it. This + // editor basically knows how to handle the edition. + L.Editable.BaseEditor = L.Handler.extend({ + + initialize: function(map, feature, options) { + L.setOptions(this, options) + this.map = map + this.feature = feature + this.feature.editor = this + this.editLayer = new L.LayerGroup() + this.tools = this.options.editTools || map.editTools + }, + + // 馃崅method enable(): this + // Set up the drawing tools for the feature to be editable. + addHooks: function() { + if (this.isConnected()) this.onFeatureAdd() + else this.feature.once('add', this.onFeatureAdd, this) + this.onEnable() + this.feature.on(this._getEvents(), this) + }, + + // 馃崅method disable(): this + // Remove the drawing tools for the feature. + removeHooks: function() { + this.feature.off(this._getEvents(), this) + if (this.feature.dragging) this.feature.dragging.disable() + this.editLayer.clearLayers() + this.tools.editLayer.removeLayer(this.editLayer) + this.onDisable() + if (this._drawing) this.cancelDrawing() + }, + + // 馃崅method drawing(): boolean + // Return true if any drawing action is ongoing with this editor. + drawing: function() { + return !!this._drawing + }, + + reset: function() { + }, + + onFeatureAdd: function() { + this.tools.editLayer.addLayer(this.editLayer) + if (this.feature.dragging) this.feature.dragging.enable() + }, + + hasMiddleMarkers: function() { + return !this.options.skipMiddleMarkers && !this.tools.options.skipMiddleMarkers + }, + + fireAndForward: function(type, e) { + e = e || {} + e.layer = this.feature + this.feature.fire(type, e) + this.tools.fireAndForward(type, e) + }, + + onEnable: function() { + // 馃崅namespace Editable + // 馃崅event editable:enable: Event + // Fired when an existing feature is ready to be edited. + this.fireAndForward('editable:enable') + }, + + onDisable: function() { + // 馃崅namespace Editable + // 馃崅event editable:disable: Event + // Fired when an existing feature is not ready anymore to be edited. + this.fireAndForward('editable:disable') + }, + + onEditing: function() { + // 馃崅namespace Editable + // 馃崅event editable:editing: Event + // Fired as soon as any change is made to the feature geometry. + this.fireAndForward('editable:editing') + }, + + onStartDrawing: function() { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:start: Event + // Fired when a feature is to be drawn. + this.fireAndForward('editable:drawing:start') + }, + + onEndDrawing: function() { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:end: Event + // Fired when a feature is not drawn anymore. + this.fireAndForward('editable:drawing:end') + }, + + onCancelDrawing: function() { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:cancel: Event + // Fired when user cancel drawing while a feature is being drawn. + this.fireAndForward('editable:drawing:cancel') + }, + + onCommitDrawing: function(e) { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:commit: Event + // Fired when user finish drawing a feature. + this.fireAndForward('editable:drawing:commit', e) + }, + + onDrawingMouseDown: function(e) { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:mousedown: Event + // Fired when user `mousedown` while drawing. + this.fireAndForward('editable:drawing:mousedown', e) + }, + + onDrawingMouseUp: function(e) { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:mouseup: Event + // Fired when user `mouseup` while drawing. + this.fireAndForward('editable:drawing:mouseup', e) + }, + + startDrawing: function() { + if (!this._drawing) this._drawing = L.Editable.FORWARD + this.tools.registerForDrawing(this) + this.onStartDrawing() + }, + + commitDrawing: function(e) { + this.onCommitDrawing(e) + this.endDrawing() + }, + + cancelDrawing: function() { + // If called during a vertex drag, the vertex will be removed before + // the mouseup fires on it. This is a workaround. Maybe better fix is + // To have L.Draggable reset it's status on disable (Leaflet side). + L.Draggable._dragging = false + this.onCancelDrawing() + this.endDrawing() + }, + + endDrawing: function() { + this._drawing = false + this.tools.unregisterForDrawing(this) + this.onEndDrawing() + }, + + onDrawingClick: function(e) { + if (!this.drawing()) return + L.Editable.makeCancellable(e) + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:click: CancelableEvent + // Fired when user `click` while drawing, before any internal action is being processed. + this.fireAndForward('editable:drawing:click', e) + if (e._cancelled) return + if (!this.isConnected()) this.connect(e) + this.processDrawingClick(e) + }, + + isConnected: function() { + return this.map.hasLayer(this.feature) + }, + + connect: function() { + this.tools.connectCreatedToMap(this.feature) + this.tools.editLayer.addLayer(this.editLayer) + }, + + onMove: function(e) { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:move: Event + // Fired when `move` mouse while drawing, while dragging a marker, and while dragging a vertex. + this.fireAndForward('editable:drawing:move', e) + }, + + onDrawingMouseMove: function(e) { + this.onMove(e) + }, + + _getEvents: function() { + return { + dragstart: this.onDragStart, + drag: this.onDrag, + dragend: this.onDragEnd, + remove: this.disable + } + }, + + onDragStart: function(e) { + this.onEditing() + // 馃崅namespace Editable + // 馃崅event editable:dragstart: Event + // Fired before a path feature is dragged. + this.fireAndForward('editable:dragstart', e) + }, + + onDrag: function(e) { + this.onMove(e) + // 馃崅namespace Editable + // 馃崅event editable:drag: Event + // Fired when a path feature is being dragged. + this.fireAndForward('editable:drag', e) + }, + + onDragEnd: function(e) { + // 馃崅namespace Editable + // 馃崅event editable:dragend: Event + // Fired after a path feature has been dragged. + this.fireAndForward('editable:dragend', e) + } + + }) + + // 馃崅namespace Editable; 馃崅class MarkerEditor; 馃崅aka L.Editable.MarkerEditor + // 馃崅inherits BaseEditor + // Editor for Marker. + L.Editable.MarkerEditor = L.Editable.BaseEditor.extend({ + + onDrawingMouseMove: function(e) { + L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this, e) + if (this._drawing) this.feature.setLatLng(e.latlng) + }, + + processDrawingClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Drawing events + // 馃崅event editable:drawing:clicked: Event + // Fired when user `click` while drawing, after all internal actions. + this.fireAndForward('editable:drawing:clicked', e) + this.commitDrawing(e) + }, + + connect: function(e) { + // On touch, the latlng has not been updated because there is + // no mousemove. + if (e) this.feature._latlng = e.latlng + L.Editable.BaseEditor.prototype.connect.call(this, e) + } + + }) + + // 馃崅namespace Editable; 馃崅class PathEditor; 馃崅aka L.Editable.PathEditor + // 馃崅inherits BaseEditor + // Base class for all path editors. + L.Editable.PathEditor = L.Editable.BaseEditor.extend({ + + CLOSED: false, + MIN_VERTEX: 2, + + addHooks: function() { + L.Editable.BaseEditor.prototype.addHooks.call(this) + if (this.feature) this.initVertexMarkers() + return this + }, + + initVertexMarkers: function(latlngs) { + if (!this.enabled()) return + latlngs = latlngs || this.getLatLngs() + if (isFlat(latlngs)) this.addVertexMarkers(latlngs) + else for (let i = 0; i < latlngs.length; i++) this.initVertexMarkers(latlngs[i]) + }, + + getLatLngs: function() { + return this.feature.getLatLngs() + }, + + // 馃崅method reset() + // Rebuild edit elements (Vertex, MiddleMarker, etc.). + reset: function() { + this.editLayer.clearLayers() + this.initVertexMarkers() + }, + + addVertexMarker: function(latlng, latlngs) { + return new this.tools.options.VertexMarkerClass(latlng, latlngs, this) + }, + + onNewVertex: function(vertex) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:new: VertexEvent + // Fired when a new vertex is created. + this.fireAndForward('editable:vertex:new', { latlng: vertex.latlng, vertex: vertex }) + }, + + addVertexMarkers: function(latlngs) { + for (let i = 0; i < latlngs.length; i++) { + this.addVertexMarker(latlngs[i], latlngs) + } + }, + + refreshVertexMarkers: function(latlngs) { + latlngs = latlngs || this.getDefaultLatLngs() + for (let i = 0; i < latlngs.length; i++) { + latlngs[i].__vertex.update() + } + }, + + addMiddleMarker: function(left, right, latlngs) { + return new this.tools.options.MiddleMarkerClass(left, right, latlngs, this) + }, + + onVertexMarkerClick: function(e) { + L.Editable.makeCancellable(e) + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:click: CancelableVertexEvent + // Fired when a `click` is issued on a vertex, before any internal action is being processed. + this.fireAndForward('editable:vertex:click', e) + if (e._cancelled) return + if (this.tools.drawing() && this.tools._drawingEditor !== this) return + let index = e.vertex.getIndex() + let commit + if (e.originalEvent.ctrlKey) { + this.onVertexMarkerCtrlClick(e) + } else if (e.originalEvent.altKey) { + this.onVertexMarkerAltClick(e) + } else if (e.originalEvent.shiftKey) { + this.onVertexMarkerShiftClick(e) + } else if (e.originalEvent.metaKey) { + this.onVertexMarkerMetaKeyClick(e) + } else if (index === e.vertex.getLastIndex() && this._drawing === L.Editable.FORWARD) { + if (index >= this.MIN_VERTEX - 1) commit = true + } else if (index === 0 && this._drawing === L.Editable.BACKWARD && this._drawnLatLngs.length >= this.MIN_VERTEX) { + commit = true + } else if (index === 0 && this._drawing === L.Editable.FORWARD && this._drawnLatLngs.length >= this.MIN_VERTEX && this.CLOSED) { + commit = true // Allow to close on first point also for polygons + } else { + this.onVertexRawMarkerClick(e) + } + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:clicked: VertexEvent + // Fired when a `click` is issued on a vertex, after all internal actions. + this.fireAndForward('editable:vertex:clicked', e) + if (commit) this.commitDrawing(e) + }, + + onVertexRawMarkerClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:rawclick: CancelableVertexEvent + // Fired when a `click` is issued on a vertex without any special key and without being in drawing mode. + this.fireAndForward('editable:vertex:rawclick', e) + if (e._cancelled) return + if (!this.vertexCanBeDeleted(e.vertex)) return + e.vertex.delete() + }, + + vertexCanBeDeleted: function(vertex) { + return vertex.latlngs.length > this.MIN_VERTEX + }, + + onVertexDeleted: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:deleted: VertexEvent + // Fired after a vertex has been deleted by user. + this.fireAndForward('editable:vertex:deleted', e) + }, + + onVertexMarkerCtrlClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:ctrlclick: VertexEvent + // Fired when a `click` with `ctrlKey` is issued on a vertex. + this.fireAndForward('editable:vertex:ctrlclick', e) + }, + + onVertexMarkerShiftClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:shiftclick: VertexEvent + // Fired when a `click` with `shiftKey` is issued on a vertex. + this.fireAndForward('editable:vertex:shiftclick', e) + }, + + onVertexMarkerMetaKeyClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:metakeyclick: VertexEvent + // Fired when a `click` with `metaKey` is issued on a vertex. + this.fireAndForward('editable:vertex:metakeyclick', e) + }, + + onVertexMarkerAltClick: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:altclick: VertexEvent + // Fired when a `click` with `altKey` is issued on a vertex. + this.fireAndForward('editable:vertex:altclick', e) + }, + + onVertexMarkerContextMenu: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:contextmenu: VertexEvent + // Fired when a `contextmenu` is issued on a vertex. + this.fireAndForward('editable:vertex:contextmenu', e) + }, + + onVertexMarkerMouseDown: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:mousedown: VertexEvent + // Fired when user `mousedown` a vertex. + this.fireAndForward('editable:vertex:mousedown', e) + }, + + onVertexMarkerMouseOver: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:mouseover: VertexEvent + // Fired when a user's mouse enters the vertex + this.fireAndForward('editable:vertex:mouseover', e) + }, + + onVertexMarkerMouseOut: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:mouseout: VertexEvent + // Fired when a user's mouse leaves the vertex + this.fireAndForward('editable:vertex:mouseout', e) + }, + + onMiddleMarkerMouseDown: function(e) { + // 馃崅namespace Editable + // 馃崅section MiddleMarker events + // 馃崅event editable:middlemarker:mousedown: VertexEvent + // Fired when user `mousedown` a middle marker. + this.fireAndForward('editable:middlemarker:mousedown', e) + }, + + onVertexMarkerDrag: function(e) { + this.onMove(e) + if (this.feature._bounds) this.extendBounds(e) + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:drag: VertexEvent + // Fired when a vertex is dragged by user. + this.fireAndForward('editable:vertex:drag', e) + }, + + onVertexMarkerDragStart: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:dragstart: VertexEvent + // Fired before a vertex is dragged by user. + this.fireAndForward('editable:vertex:dragstart', e) + }, + + onVertexMarkerDragEnd: function(e) { + // 馃崅namespace Editable + // 馃崅section Vertex events + // 馃崅event editable:vertex:dragend: VertexEvent + // Fired after a vertex is dragged by user. + this.fireAndForward('editable:vertex:dragend', e) + }, + + setDrawnLatLngs: function(latlngs) { + this._drawnLatLngs = latlngs || this.getDefaultLatLngs() + }, + + startDrawing: function() { + if (!this._drawnLatLngs) this.setDrawnLatLngs() + L.Editable.BaseEditor.prototype.startDrawing.call(this) + }, + + startDrawingForward: function() { + this.startDrawing() + }, + + endDrawing: function() { + this.tools.detachForwardLineGuide() + this.tools.detachBackwardLineGuide() + if (this._drawnLatLngs && this._drawnLatLngs.length < this.MIN_VERTEX) this.deleteShape(this._drawnLatLngs) + L.Editable.BaseEditor.prototype.endDrawing.call(this) + delete this._drawnLatLngs + }, + + addLatLng: function(latlng) { + if (this._drawing === L.Editable.FORWARD) this._drawnLatLngs.push(latlng) + else this._drawnLatLngs.unshift(latlng) + this.feature._bounds.extend(latlng) + let vertex = this.addVertexMarker(latlng, this._drawnLatLngs) + this.onNewVertex(vertex) + this.refresh() + }, + + newPointForward: function(latlng) { + this.addLatLng(latlng) + this.tools.attachForwardLineGuide() + this.tools.anchorForwardLineGuide(latlng) + }, + + newPointBackward: function(latlng) { + this.addLatLng(latlng) + this.tools.anchorBackwardLineGuide(latlng) + }, + + // 馃崅namespace PathEditor + // 馃崅method push() + // Programmatically add a point while drawing. + push: function(latlng) { + if (!latlng) return console.error('L.Editable.PathEditor.push expect a valid latlng as parameter') + if (this._drawing === L.Editable.FORWARD) this.newPointForward(latlng) + else this.newPointBackward(latlng) + }, + + removeLatLng: function(latlng) { + latlng.__vertex.delete() + this.refresh() + }, + + // 馃崅method pop(): L.LatLng or null + // Programmatically remove last point (if any) while drawing. + pop: function() { + if (this._drawnLatLngs.length <= 1) return + let latlng + if (this._drawing === L.Editable.FORWARD) latlng = this._drawnLatLngs[this._drawnLatLngs.length - 1] + else latlng = this._drawnLatLngs[0] + this.removeLatLng(latlng) + if (this._drawing === L.Editable.FORWARD) this.tools.anchorForwardLineGuide(this._drawnLatLngs[this._drawnLatLngs.length - 1]) + else this.tools.anchorForwardLineGuide(this._drawnLatLngs[0]) + return latlng + }, + + processDrawingClick: function(e) { + if (e.vertex && e.vertex.editor === this) return + if (this._drawing === L.Editable.FORWARD) this.newPointForward(e.latlng) + else this.newPointBackward(e.latlng) + this.fireAndForward('editable:drawing:clicked', e) + }, + + onDrawingMouseMove: function(e) { + L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this, e) + if (this._drawing) { + this.tools.moveForwardLineGuide(e.latlng) + this.tools.moveBackwardLineGuide(e.latlng) + } + }, + + refresh: function() { + this.feature.redraw() + this.onEditing() + }, + + // 馃崅namespace PathEditor + // 馃崅method newShape(latlng?: L.LatLng) + // Add a new shape (Polyline, Polygon) in a multi, and setup up drawing tools to draw it; + // if optional `latlng` is given, start a path at this point. + newShape: function(latlng) { + let shape = this.addNewEmptyShape() + if (!shape) return + this.setDrawnLatLngs(shape[0] || shape) // Polygon or polyline + this.startDrawingForward() + // 馃崅namespace Editable + // 馃崅section Shape events + // 馃崅event editable:shape:new: ShapeEvent + // Fired when a new shape is created in a multi (Polygon or Polyline). + this.fireAndForward('editable:shape:new', { shape: shape }) + if (latlng) this.newPointForward(latlng) + }, + + deleteShape: function(shape, latlngs) { + let e = { shape: shape } + L.Editable.makeCancellable(e) + // 馃崅namespace Editable + // 馃崅section Shape events + // 馃崅event editable:shape:delete: CancelableShapeEvent + // Fired before a new shape is deleted in a multi (Polygon or Polyline). + this.fireAndForward('editable:shape:delete', e) + if (e._cancelled) return + shape = this._deleteShape(shape, latlngs) + if (this.ensureNotFlat) this.ensureNotFlat() // Polygon. + this.feature.setLatLngs(this.getLatLngs()) // Force bounds reset. + this.refresh() + this.reset() + // 馃崅namespace Editable + // 馃崅section Shape events + // 馃崅event editable:shape:deleted: ShapeEvent + // Fired after a new shape is deleted in a multi (Polygon or Polyline). + this.fireAndForward('editable:shape:deleted', { shape: shape }) + return shape + }, + + _deleteShape: function(shape, latlngs) { + latlngs = latlngs || this.getLatLngs() + if (!latlngs.length) return + let self = this + let inplaceDelete = function(latlngs, shape) { + // Called when deleting a flat latlngs + shape = latlngs.splice(0, Number.MAX_VALUE) + return shape + } + let spliceDelete = function(latlngs, shape) { + // Called when removing a latlngs inside an array + latlngs.splice(latlngs.indexOf(shape), 1) + if (!latlngs.length) self._deleteShape(latlngs) + return shape + } + if (latlngs === shape) return inplaceDelete(latlngs, shape) + for (let i = 0; i < latlngs.length; i++) { + if (latlngs[i] === shape) return spliceDelete(latlngs, shape) + else if (latlngs[i].indexOf(shape) !== -1) return spliceDelete(latlngs[i], shape) + } + }, + + // 馃崅namespace PathEditor + // 馃崅method deleteShapeAt(latlng: L.LatLng): Array + // Remove a path shape at the given `latlng`. + deleteShapeAt: function(latlng) { + let shape = this.feature.shapeAt(latlng) + if (shape) return this.deleteShape(shape) + }, + + // 馃崅method appendShape(shape: Array) + // Append a new shape to the Polygon or Polyline. + appendShape: function(shape) { + this.insertShape(shape) + }, + + // 馃崅method prependShape(shape: Array) + // Prepend a new shape to the Polygon or Polyline. + prependShape: function(shape) { + this.insertShape(shape, 0) + }, + + // 馃崅method insertShape(shape: Array, index: int) + // Insert a new shape to the Polygon or Polyline at given index (default is to append). + insertShape: function(shape, index) { + this.ensureMulti() + shape = this.formatShape(shape) + if (typeof index === 'undefined') index = this.feature._latlngs.length + this.feature._latlngs.splice(index, 0, shape) + this.feature.redraw() + if (this._enabled) this.reset() + }, + + extendBounds: function(e) { + this.feature._bounds.extend(e.vertex.latlng) + }, + + onDragStart: function(e) { + this.editLayer.clearLayers() + L.Editable.BaseEditor.prototype.onDragStart.call(this, e) + }, + + onDragEnd: function(e) { + this.initVertexMarkers() + L.Editable.BaseEditor.prototype.onDragEnd.call(this, e) + } + + }) + + // 馃崅namespace Editable; 馃崅class PolylineEditor; 馃崅aka L.Editable.PolylineEditor + // 馃崅inherits PathEditor + L.Editable.PolylineEditor = L.Editable.PathEditor.extend({ + + startDrawingBackward: function() { + this._drawing = L.Editable.BACKWARD + this.startDrawing() + }, + + // 馃崅method continueBackward(latlngs?: Array) + // Set up drawing tools to continue the line backward. + continueBackward: function(latlngs) { + if (this.drawing()) return + latlngs = latlngs || this.getDefaultLatLngs() + this.setDrawnLatLngs(latlngs) + if (latlngs.length > 0) { + this.tools.attachBackwardLineGuide() + this.tools.anchorBackwardLineGuide(latlngs[0]) + } + this.startDrawingBackward() + }, + + // 馃崅method continueForward(latlngs?: Array) + // Set up drawing tools to continue the line forward. + continueForward: function(latlngs) { + if (this.drawing()) return + latlngs = latlngs || this.getDefaultLatLngs() + this.setDrawnLatLngs(latlngs) + if (latlngs.length > 0) { + this.tools.attachForwardLineGuide() + this.tools.anchorForwardLineGuide(latlngs[latlngs.length - 1]) + } + this.startDrawingForward() + }, + + getDefaultLatLngs: function(latlngs) { + latlngs = latlngs || this.feature._latlngs + if (!latlngs.length || latlngs[0] instanceof L.LatLng) return latlngs + else return this.getDefaultLatLngs(latlngs[0]) + }, + + ensureMulti: function() { + if (this.feature._latlngs.length && isFlat(this.feature._latlngs)) { + this.feature._latlngs = [this.feature._latlngs] + } + }, + + addNewEmptyShape: function() { + if (this.feature._latlngs.length) { + let shape = [] + this.appendShape(shape) + return shape + } else { + return this.feature._latlngs + } + }, + + formatShape: function(shape) { + if (isFlat(shape)) return shape + else if (shape[0]) return this.formatShape(shape[0]) + }, + + // 馃崅method splitShape(latlngs?: Array, index: int) + // Split the given `latlngs` shape at index `index` and integrate new shape in instance `latlngs`. + splitShape: function(shape, index) { + if (!index || index >= shape.length - 1) return + this.ensureMulti() + let shapeIndex = this.feature._latlngs.indexOf(shape) + if (shapeIndex === -1) return + let first = shape.slice(0, index + 1) + let second = shape.slice(index) + // We deal with reference, we don't want twice the same latlng around. + second[0] = L.latLng(second[0].lat, second[0].lng, second[0].alt) + this.feature._latlngs.splice(shapeIndex, 1, first, second) + this.refresh() + this.reset() + } + + }) + + // 馃崅namespace Editable; 馃崅class PolygonEditor; 馃崅aka L.Editable.PolygonEditor + // 馃崅inherits PathEditor + L.Editable.PolygonEditor = L.Editable.PathEditor.extend({ + + CLOSED: true, + MIN_VERTEX: 3, + + newPointForward: function(latlng) { + L.Editable.PathEditor.prototype.newPointForward.call(this, latlng) + if (!this.tools.backwardLineGuide._latlngs.length) this.tools.anchorBackwardLineGuide(latlng) + if (this._drawnLatLngs.length === 2) this.tools.attachBackwardLineGuide() + }, + + addNewEmptyHole: function(latlng) { + this.ensureNotFlat() + let latlngs = this.feature.shapeAt(latlng) + if (!latlngs) return + let holes = [] + latlngs.push(holes) + return holes + }, + + // 馃崅method newHole(latlng?: L.LatLng, index: int) + // Set up drawing tools for creating a new hole on the Polygon. If the `latlng` param is given, a first point is created. + newHole: function(latlng) { + let holes = this.addNewEmptyHole(latlng) + if (!holes) return + this.setDrawnLatLngs(holes) + this.startDrawingForward() + if (latlng) this.newPointForward(latlng) + }, + + addNewEmptyShape: function() { + if (this.feature._latlngs.length && this.feature._latlngs[0].length) { + let shape = [] + this.appendShape(shape) + return shape + } else { + return this.feature._latlngs + } + }, + + ensureMulti: function() { + if (this.feature._latlngs.length && isFlat(this.feature._latlngs[0])) { + this.feature._latlngs = [this.feature._latlngs] + } + }, + + ensureNotFlat: function() { + if (!this.feature._latlngs.length || isFlat(this.feature._latlngs)) this.feature._latlngs = [this.feature._latlngs] + }, + + vertexCanBeDeleted: function(vertex) { + let parent = this.feature.parentShape(vertex.latlngs) + let idx = L.Util.indexOf(parent, vertex.latlngs) + if (idx > 0) return true // Holes can be totally deleted without removing the layer itself. + return L.Editable.PathEditor.prototype.vertexCanBeDeleted.call(this, vertex) + }, + + getDefaultLatLngs: function() { + if (!this.feature._latlngs.length) this.feature._latlngs.push([]) + return this.feature._latlngs[0] + }, + + formatShape: function(shape) { + // [[1, 2], [3, 4]] => must be nested + // [] => must be nested + // [[]] => is already nested + if (isFlat(shape) && (!shape[0] || shape[0].length !== 0)) return [shape] + else return shape + } + + }) + + // 馃崅namespace Editable; 馃崅class RectangleEditor; 馃崅aka L.Editable.RectangleEditor + // 馃崅inherits PathEditor + L.Editable.RectangleEditor = L.Editable.PathEditor.extend({ + + CLOSED: true, + MIN_VERTEX: 4, + + options: { + skipMiddleMarkers: true + }, + + extendBounds: function(e) { + let index = e.vertex.getIndex() + let next = e.vertex.getNext() + let previous = e.vertex.getPrevious() + let oppositeIndex = (index + 2) % 4 + let opposite = e.vertex.latlngs[oppositeIndex] + let bounds = new L.LatLngBounds(e.latlng, opposite) + // Update latlngs by hand to preserve order. + previous.latlng.update([e.latlng.lat, opposite.lng]) + next.latlng.update([opposite.lat, e.latlng.lng]) + this.updateBounds(bounds) + this.refreshVertexMarkers() + }, + + onDrawingMouseDown: function(e) { + L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this, e) + this.connect() + let latlngs = this.getDefaultLatLngs() + // L.Polygon._convertLatLngs removes last latlng if it equals first point, + // which is the case here as all latlngs are [0, 0] + if (latlngs.length === 3) latlngs.push(e.latlng) + let bounds = new L.LatLngBounds(e.latlng, e.latlng) + this.updateBounds(bounds) + this.updateLatLngs(bounds) + this.refresh() + this.reset() + // Stop dragging map. + // L.Draggable has two workflows: + // - mousedown => mousemove => mouseup + // - touchstart => touchmove => touchend + // Problem: L.Map.Tap does not allow us to listen to touchstart, so we only + // can deal with mousedown, but then when in a touch device, we are dealing with + // simulated events (actually simulated by L.Map.Tap), which are no more taken + // into account by L.Draggable. + // Ref.: https://github.com/Leaflet/Leaflet.Editable/issues/103 + e.originalEvent._simulated = false + this.map.dragging._draggable._onUp(e.originalEvent) + // Now transfer ongoing drag action to the bottom right corner. + // Should we refine which corner will handle the drag according to + // drag direction? + latlngs[3].__vertex.dragging._draggable._onDown(e.originalEvent) + }, + + onDrawingMouseUp: function(e) { + this.commitDrawing(e) + e.originalEvent._simulated = false + L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this, e) + }, + + onDrawingMouseMove: function(e) { + e.originalEvent._simulated = false + L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this, e) + }, + + getDefaultLatLngs: function(latlngs) { + return latlngs || this.feature._latlngs[0] + }, + + updateBounds: function(bounds) { + this.feature._bounds = bounds + }, + + updateLatLngs: function(bounds) { + let latlngs = this.getDefaultLatLngs() + let newLatlngs = this.feature._boundsToLatLngs(bounds) + // Keep references. + for (let i = 0; i < latlngs.length; i++) { + latlngs[i].update(newLatlngs[i]) + } + } + + }) + + // 馃崅namespace Editable; 馃崅class CircleEditor; 馃崅aka L.Editable.CircleEditor + // 馃崅inherits PathEditor + L.Editable.CircleEditor = L.Editable.PathEditor.extend({ + + MIN_VERTEX: 2, + + options: { + skipMiddleMarkers: true + }, + + initialize: function(map, feature, options) { + L.Editable.PathEditor.prototype.initialize.call(this, map, feature, options) + // C.Y.B Modify + + let latlng = this.computeResizeLatLng() + + // latlng.lat = latlng.lat-0.007855; + // latlng.lng= latlng.lng-0.1; + this._resizeLatLng = latlng + // 鍘熷鏂规硶 + // this._resizeLatLng = this.computeResizeLatLng(); + }, + + computeResizeLatLng: function() { + // While circle is not added to the map, _radius is not set. + // let delta = (this.feature._radius || this.feature._mRadius) * Math.cos(Math.PI / 4) + let delta = (this.feature._radius || this.feature._mRadius) + let point = this.map.project(this.feature._latlng) + // return this.map.unproject([point.x + delta, point.y - delta]) + return this.map.unproject([point.x + delta, point.y]) + }, + + updateResizeLatLng: function() { + this._resizeLatLng.update(this.computeResizeLatLng()) + this._resizeLatLng.__vertex.update() + }, + + getLatLngs: function() { + return [this.feature._latlng, this._resizeLatLng] + }, + + getDefaultLatLngs: function() { + return this.getLatLngs() + }, + + onVertexMarkerDrag: function(e) { + if (e.vertex.getIndex() === 1) this.resize(e) + else this.updateResizeLatLng(e) + L.Editable.PathEditor.prototype.onVertexMarkerDrag.call(this, e) + }, + + resize: function(e) { + let radius = this.feature._latlng.distanceTo(e.latlng) + this.feature.setRadius(radius) + }, + + onDrawingMouseDown: function(e) { + L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this, e) + this._resizeLatLng.update(e.latlng) + this.feature._latlng.update(e.latlng) + this.connect() + // Stop dragging map. + e.originalEvent._simulated = false + this.map.dragging._draggable._onUp(e.originalEvent) + // Now transfer ongoing drag action to the radius handler. + this._resizeLatLng.__vertex.dragging._draggable._onDown(e.originalEvent) + }, + + onDrawingMouseUp: function(e) { + this.commitDrawing(e) + e.originalEvent._simulated = false + L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this, e) + }, + + onDrawingMouseMove: function(e) { + e.originalEvent._simulated = false + L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this, e) + }, + + onDrag: function(e) { + L.Editable.PathEditor.prototype.onDrag.call(this, e) + this.feature.dragging.updateLatLng(this._resizeLatLng) + } + + }) + + // 馃崅namespace Editable; 馃崅class EditableMixin + // `EditableMixin` is included to `L.Polyline`, `L.Polygon`, `L.Rectangle`, `L.Circle` + // and `L.Marker`. It adds some methods to them. + // *When editing is enabled, the editor is accessible on the instance with the + // `editor` property.* + let EditableMixin = { + + createEditor: function(map) { + map = map || this._map + let tools = (this.options.editOptions || {}).editTools || map.editTools + if (!tools) throw Error('Unable to detect Editable instance.') + let Klass = this.options.editorClass || this.getEditorClass(tools) + return new Klass(map, this, this.options.editOptions) + }, + + // 馃崅method enableEdit(map?: L.Map): this.editor + // Enable editing, by creating an editor if not existing, and then calling `enable` on it. + enableEdit: function(map) { + if (!this.editor) this.createEditor(map) + this.editor.enable() + return this.editor + }, + + // 馃崅method editEnabled(): boolean + // Return true if current instance has an editor attached, and this editor is enabled. + editEnabled: function() { + return this.editor && this.editor.enabled() + }, + + // 馃崅method disableEdit() + // Disable editing, also remove the editor property reference. + disableEdit: function() { + if (this.editor) { + this.editor.disable() + delete this.editor + } + }, + + // 馃崅method toggleEdit() + // Enable or disable editing, according to current status. + toggleEdit: function() { + if (this.editEnabled()) this.disableEdit() + else this.enableEdit() + }, + + _onEditableAdd: function() { + if (this.editor) this.enableEdit() + } + + } + + let PolylineMixin = { + + getEditorClass: function(tools) { + return (tools && tools.options.polylineEditorClass) ? tools.options.polylineEditorClass : L.Editable.PolylineEditor + }, + + shapeAt: function(latlng, latlngs) { + // We can have those cases: + // - latlngs are just a flat array of latlngs, use this + // - latlngs is an array of arrays of latlngs, loop over + let shape = null + latlngs = latlngs || this._latlngs + if (!latlngs.length) return shape + else if (isFlat(latlngs) && this.isInLatLngs(latlng, latlngs)) shape = latlngs + else for (let i = 0; i < latlngs.length; i++) if (this.isInLatLngs(latlng, latlngs[i])) return latlngs[i] + return shape + }, + + isInLatLngs: function(l, latlngs) { + if (!latlngs) return false + let i, k, len + let part = [] + let p + let w = this._clickTolerance() + this._projectLatlngs(latlngs, part, this._pxBounds) + part = part[0] + p = this._map.latLngToLayerPoint(l) + + if (!this._pxBounds.contains(p)) { + return false + } + for (i = 1, len = part.length, k = 0; i < len; k = i++) { + if (L.LineUtil.pointToSegmentDistance(p, part[k], part[i]) <= w) { + return true + } + } + return false + } + + } + + let PolygonMixin = { + + getEditorClass: function(tools) { + return (tools && tools.options.polygonEditorClass) ? tools.options.polygonEditorClass : L.Editable.PolygonEditor + }, + + shapeAt: function(latlng, latlngs) { + // We can have those cases: + // - latlngs are just a flat array of latlngs, use this + // - latlngs is an array of arrays of latlngs, this is a simple polygon (maybe with holes), use the first + // - latlngs is an array of arrays of arrays, this is a multi, loop over + let shape = null + latlngs = latlngs || this._latlngs + if (!latlngs.length) return shape + else if (isFlat(latlngs) && this.isInLatLngs(latlng, latlngs)) shape = latlngs + else if (isFlat(latlngs[0]) && this.isInLatLngs(latlng, latlngs[0])) shape = latlngs + else for (let i = 0; i < latlngs.length; i++) if (this.isInLatLngs(latlng, latlngs[i][0])) return latlngs[i] + return shape + }, + + isInLatLngs: function(l, latlngs) { + let inside = false + let l1 + let l2 + let j + let k + let len2 + for (j = 0, len2 = latlngs.length, k = len2 - 1; j < len2; k = j++) { + l1 = latlngs[j] + l2 = latlngs[k] + + if (((l1.lat > l.lat) !== (l2.lat > l.lat)) && + (l.lng < (l2.lng - l1.lng) * (l.lat - l1.lat) / (l2.lat - l1.lat) + l1.lng)) { + inside = !inside + } + } + + return inside + }, + + parentShape: function(shape, latlngs) { + latlngs = latlngs || this._latlngs + if (!latlngs) return + let idx = L.Util.indexOf(latlngs, shape) + if (idx !== -1) return latlngs + for (let i = 0; i < latlngs.length; i++) { + idx = L.Util.indexOf(latlngs[i], shape) + if (idx !== -1) return latlngs[i] + } + } + + } + + let MarkerMixin = { + + getEditorClass: function(tools) { + return (tools && tools.options.markerEditorClass) ? tools.options.markerEditorClass : L.Editable.MarkerEditor + } + + } + + let RectangleMixin = { + + getEditorClass: function(tools) { + return (tools && tools.options.rectangleEditorClass) ? tools.options.rectangleEditorClass : L.Editable.RectangleEditor + } + + } + + let CircleMixin = { + + getEditorClass: function(tools) { + return (tools && tools.options.circleEditorClass) ? tools.options.circleEditorClass : L.Editable.CircleEditor + } + + } + + let keepEditable = function() { + // Make sure you can remove/readd an editable layer. + this.on('add', this._onEditableAdd) + } + + let isFlat = L.LineUtil.isFlat || L.LineUtil._flat || L.Polyline._flat // <=> 1.1 compat. + + if (L.Polyline) { + L.Polyline.include(EditableMixin) + L.Polyline.include(PolylineMixin) + L.Polyline.addInitHook(keepEditable) + } + if (L.Polygon) { + L.Polygon.include(EditableMixin) + L.Polygon.include(PolygonMixin) + } + if (L.Marker) { + L.Marker.include(EditableMixin) + L.Marker.include(MarkerMixin) + L.Marker.addInitHook(keepEditable) + } + if (L.Rectangle) { + L.Rectangle.include(EditableMixin) + L.Rectangle.include(RectangleMixin) + } + if (L.Circle) { + L.Circle.include(EditableMixin) + L.Circle.include(CircleMixin) + } + + L.LatLng.prototype.update = function(latlng) { + latlng = L.latLng(latlng) + this.lat = latlng.lat + this.lng = latlng.lng + } + }, window)) +} + +export default { + init +} diff --git a/src/components/plugin/MagicMarker.js b/src/components/plugin/MagicMarker.js new file mode 100644 index 0000000..5060402 --- /dev/null +++ b/src/components/plugin/MagicMarker.js @@ -0,0 +1,49 @@ +const init = (L) => { + (function(window) { + console.log(window) + let setOptions = function(obj, options) { + for (let i in options) { + obj[i] = options[i] + } + return obj + } + L.Icon.Magic = function(options) { + let opts + if (options.iconUrl) { + opts = { + html: "<div class='magicDiv'><div class='magictime " + options.magic + "'><img id='migic' src='" + options.iconUrl + "'/></div></div>" + // className: 'magicDiv', + } + } else { + opts = { + html: "<div class='magicDiv'><div class='magictime " + options.magic + "'>" + options.html + '</div></div>' + // className: 'magicDiv', + } + } + delete options.html + let magicIconOpts = setOptions(opts, options) + // console.log(magicIconOpts) + let magicIcon = L.divIcon(magicIconOpts) + return magicIcon + } + + L.icon.magic = function(options) { + return new L.Icon.Magic(options) + } + + L.Marker.Magic = L.Marker.extend({ + initialize: function(latlng, options) { + options.icon = L.icon.magic(options) + L.Marker.prototype.initialize.call(this, latlng, options) + } + }) + + L.marker.magic = function(latlng, options) { + return new L.Marker.Magic(latlng, options) + } + })(window) +} + +export default { + init +} diff --git a/src/components/plugin/PathDashFlow.js b/src/components/plugin/PathDashFlow.js new file mode 100644 index 0000000..52792fc --- /dev/null +++ b/src/components/plugin/PathDashFlow.js @@ -0,0 +1,43 @@ +// @class PolyLine +import * as L from 'leaflet' + +let DashFlow = () => { + L.Path.mergeOptions({ + // @option dashSpeed: Number + // The speed of the dash array, in pixels per second + dashSpeed: 0 + }) + + var _originalBeforeAdd = L.Path.prototype.beforeAdd + + L.Path.include({ + + beforeAdd: function(map) { + _originalBeforeAdd.bind(this)(map) + + if (this.options.dashSpeed) { + this._lastDashFrame = performance.now() + this._dashFrame = L.Util.requestAnimFrame(this._onDashFrame.bind(this)) + } + }, + + _onDashFrame: function() { + if (!this._renderer) { + return + } + + var now = performance.now() + var dashOffsetDelta = (now - this._lastDashFrame) * this.options.dashSpeed / 1000 + + this.options.dashOffset = Number(this.options.dashOffset || 0) + dashOffsetDelta + this._renderer._updateStyle(this) + + this._lastDashFrame = performance.now() + + this._dashFrame = L.Util.requestAnimFrame(this._onDashFrame.bind(this)) + } + + }) +} + +export default { DashFlow } diff --git a/src/components/plugin/PathDrag.js b/src/components/plugin/PathDrag.js new file mode 100644 index 0000000..c4f2eea --- /dev/null +++ b/src/components/plugin/PathDrag.js @@ -0,0 +1,143 @@ +'use strict' +const init = (L) => { + /* A Draggable that does not update the element position + and takes care of only bubbling to targetted path in Canvas mode. */ + L.PathDraggable = L.Draggable.extend({ + + initialize: function(path) { + this._path = path + this._canvas = (path._map.getRenderer(path) instanceof L.Canvas) + let element = this._canvas ? this._path._map.getRenderer(this._path)._container : this._path._path + L.Draggable.prototype.initialize.call(this, element, element, true) + }, + + _updatePosition: function() { + let e = { originalEvent: this._lastEvent } + this.fire('drag', e) + }, + + _onDown: function(e) { + let first = e.touches ? e.touches[0] : e + this._startPoint = new L.Point(first.clientX, first.clientY) + if (this._canvas && !this._path._containsPoint(this._path._map.mouseEventToLayerPoint(first))) { + return + } + L.Draggable.prototype._onDown.call(this, e) + } + + }) + + L.Handler.PathDrag = L.Handler.extend({ + + initialize: function(path) { + this._path = path + }, + + getEvents: function() { + return { + dragstart: this._onDragStart, + drag: this._onDrag, + dragend: this._onDragEnd + } + }, + + addHooks: function() { + if (!this._draggable) { + this._draggable = new L.PathDraggable(this._path) + } + this._draggable.on(this.getEvents(), this).enable() + L.DomUtil.addClass(this._draggable._element, 'leaflet-path-draggable') + }, + + removeHooks: function() { + this._draggable.off(this.getEvents(), this).disable() + L.DomUtil.removeClass(this._draggable._element, 'leaflet-path-draggable') + }, + + moved: function() { + return this._draggable && this._draggable._moved + }, + + _onDragStart: function() { + this._startPoint = this._draggable._startPoint + this._path + .closePopup() + .fire('movestart') + .fire('dragstart') + }, + + _onDrag: function(e) { + let path = this._path + let event = (e.originalEvent.touches && e.originalEvent.touches.length === 1 ? e.originalEvent.touches[0] : e.originalEvent) + let newPoint = L.point(event.clientX, event.clientY) + let latlng = path._map.layerPointToLatLng(newPoint) + + this._offset = newPoint.subtract(this._startPoint) + this._startPoint = newPoint + + this._path.eachLatLng(this.updateLatLng, this) + path.redraw() + + e.latlng = latlng + e.offset = this._offset + path.fire('drag', e) + e.latlng = this._path.getCenter ? this._path.getCenter() : this._path.getLatLng() + path.fire('move', e) + }, + + _onDragEnd: function(e) { + if (this._path._bounds) this.resetBounds() + this._path.fire('moveend') + .fire('dragend', e) + }, + + latLngToLayerPoint: function(latlng) { + // Same as map.latLngToLayerPoint, but without the round(). + let projectedPoint = this._path._map.project(L.latLng(latlng)) + return projectedPoint._subtract(this._path._map.getPixelOrigin()) + }, + + updateLatLng: function(latlng) { + let oldPoint = this.latLngToLayerPoint(latlng) + oldPoint._add(this._offset) + let newLatLng = this._path._map.layerPointToLatLng(oldPoint) + latlng.lat = newLatLng.lat + latlng.lng = newLatLng.lng + }, + + resetBounds: function() { + this._path._bounds = new L.LatLngBounds() + this._path.eachLatLng(function(latlng) { + this._bounds.extend(latlng) + }) + } + + }) + + L.Path.include({ + + eachLatLng: function(callback, context) { + context = context || this + let loop = function(latlngs) { + for (let i = 0; i < latlngs.length; i++) { + if (L.Util.isArray(latlngs[i])) loop(latlngs[i]) + else callback.call(context, latlngs[i]) + } + } + loop(this.getLatLngs ? this.getLatLngs() : [this.getLatLng()]) + } + + }) + + L.Path.addInitHook(function() { + this.dragging = new L.Handler.PathDrag(this) + if (this.options.draggable) { + this.once('add', function() { + this.dragging.enable() + }) + } + }) +} +export default { + init +} diff --git a/src/components/plugin/cluster-layer/MarkerCluster.Default.css b/src/components/plugin/cluster-layer/MarkerCluster.Default.css new file mode 100644 index 0000000..40060c7 --- /dev/null +++ b/src/components/plugin/cluster-layer/MarkerCluster.Default.css @@ -0,0 +1,68 @@ +.marker-cluster-small { + background-color: rgba(181, 226, 140, 0.6); +} + +.marker-cluster-small div { + background-color: rgba(110, 204, 57, 0.6); +} + +.marker-cluster-medium { + background-color: rgba(241, 211, 87, 0.6); +} + +.marker-cluster-medium div { + background-color: rgba(240, 194, 12, 0.6); +} + +.marker-cluster-large { + background-color: rgba(253, 156, 115, 0.6); +} + +.marker-cluster-large div { + background-color: rgba(241, 128, 23, 0.6); +} + +/* IE 6-8 fallback colors */ +.leaflet-oldie .marker-cluster-small { + background-color: rgb(181, 226, 140); +} + +.leaflet-oldie .marker-cluster-small div { + background-color: rgb(110, 204, 57); +} + +.leaflet-oldie .marker-cluster-medium { + background-color: rgb(241, 211, 87); +} + +.leaflet-oldie .marker-cluster-medium div { + background-color: rgb(240, 194, 12); +} + +.leaflet-oldie .marker-cluster-large { + background-color: rgb(253, 156, 115); +} + +.leaflet-oldie .marker-cluster-large div { + background-color: rgb(241, 128, 23); +} + +.marker-cluster { + background-clip: padding-box; + border-radius: 20px; +} + +.marker-cluster div { + width: 30px; + height: 30px; + margin-left: 5px; + margin-top: 5px; + + text-align: center; + border-radius: 15px; + font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif; +} + +.marker-cluster span { + line-height: 30px; +} \ No newline at end of file diff --git a/src/components/plugin/cluster-layer/MarkerCluster.css b/src/components/plugin/cluster-layer/MarkerCluster.css new file mode 100644 index 0000000..cd2043d --- /dev/null +++ b/src/components/plugin/cluster-layer/MarkerCluster.css @@ -0,0 +1,14 @@ +.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { + -webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in; + -moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in; + -o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in; + transition: transform 0.3s ease-out, opacity 0.3s ease-in; +} + +.leaflet-cluster-spider-leg { + /* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */ + -webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in; + -moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in; + -o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in; + transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in; +} diff --git a/src/components/plugin/cluster-layer/leaflet.markercluster-src.js b/src/components/plugin/cluster-layer/leaflet.markercluster-src.js new file mode 100644 index 0000000..85e3882 --- /dev/null +++ b/src/components/plugin/cluster-layer/leaflet.markercluster-src.js @@ -0,0 +1,2678 @@ +'use strict'; +function init(L) { + /* + * L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within + */ + + var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({ + + options: { + maxClusterRadius: 80, // A cluster will cover at most this many pixels from its center + iconCreateFunction: null, + clusterPane: L.Marker.prototype.options.pane, + + spiderfyOnMaxZoom: true, + showCoverageOnHover: true, + zoomToBoundsOnClick: true, + singleMarkerMode: false, + + disableClusteringAtZoom: null, + + // Setting this to false prevents the removal of any clusters outside of the viewpoint, which + // is the default behaviour for performance reasons. + removeOutsideVisibleBounds: true, + + // Set to false to disable all animations (zoom and spiderfy). + // If false, option animateAddingMarkers below has no effect. + // If L.DomUtil.TRANSITION is falsy, this option has no effect. + animate: true, + + // Whether to animate adding markers after adding the MarkerClusterGroup to the map + // If you are adding individual markers set to true, if adding bulk markers leave false for massive performance gains. + animateAddingMarkers: false, + + // Increase to increase the distance away that spiderfied markers appear from the center + spiderfyDistanceMultiplier: 1, + + // Make it possible to specify a polyline options on a spider leg + spiderLegPolylineOptions: {weight: 1.5, color: '#222', opacity: 0.5}, + + // When bulk adding layers, adds markers in chunks. Means addLayers may not add all the layers in the call, others will be loaded during setTimeouts + chunkedLoading: false, + chunkInterval: 200, // process markers for a maximum of ~ n milliseconds (then trigger the chunkProgress callback) + chunkDelay: 50, // at the end of each interval, give n milliseconds back to system/browser + chunkProgress: null, // progress callback: function(processed, total, elapsed) (e.g. for a progress indicator) + + // Options to pass to the L.Polygon constructor + polygonOptions: {} + }, + + initialize: function(options) { + L.Util.setOptions(this, options); + if (!this.options.iconCreateFunction) { + this.options.iconCreateFunction = this._defaultIconCreateFunction; + } + + this._featureGroup = L.featureGroup(); + this._featureGroup.addEventParent(this); + + this._nonPointGroup = L.featureGroup(); + this._nonPointGroup.addEventParent(this); + + this._inZoomAnimation = 0; + this._needsClustering = []; + this._needsRemoving = []; // Markers removed while we aren't on the map need to be kept track of + // The bounds of the currently shown area (from _getExpandedVisibleBounds) Updated on zoom/move + this._currentShownBounds = null; + + this._queue = []; + + this._childMarkerEventHandlers = { + 'dragstart': this._childMarkerDragStart, + 'move': this._childMarkerMoved, + 'dragend': this._childMarkerDragEnd, + }; + + // Hook the appropriate animation methods. + var animate = L.DomUtil.TRANSITION && this.options.animate; + L.extend(this, animate ? this._withAnimation : this._noAnimation); + // Remember which MarkerCluster class to instantiate (animated or not). + this._markerCluster = animate ? L.MarkerCluster : L.MarkerClusterNonAnimated; + }, + + addLayer: function(layer) { + + if (layer instanceof L.LayerGroup) { + return this.addLayers([layer]); + } + + // Don't cluster non point data + if (!layer.getLatLng) { + this._nonPointGroup.addLayer(layer); + this.fire('layeradd', {layer: layer}); + return this; + } + + if (!this._map) { + this._needsClustering.push(layer); + this.fire('layeradd', {layer: layer}); + return this; + } + + if (this.hasLayer(layer)) { + return this; + } + + + // If we have already clustered we'll need to add this one to a cluster + + if (this._unspiderfy) { + this._unspiderfy(); + } + + this._addLayer(layer, this._maxZoom); + this.fire('layeradd', {layer: layer}); + + // Refresh bounds and weighted positions. + this._topClusterLevel._recalculateBounds(); + + this._refreshClustersIcons(); + + // Work out what is visible + var visibleLayer = layer, + currentZoom = this._zoom; + if (layer.__parent) { + while (visibleLayer.__parent._zoom >= currentZoom) { + visibleLayer = visibleLayer.__parent; + } + } + + if (this._currentShownBounds.contains(visibleLayer.getLatLng())) { + if (this.options.animateAddingMarkers) { + this._animationAddLayer(layer, visibleLayer); + } else { + this._animationAddLayerNonAnimated(layer, visibleLayer); + } + } + return this; + }, + + removeLayer: function(layer) { + + if (layer instanceof L.LayerGroup) { + return this.removeLayers([layer]); + } + + // Non point layers + if (!layer.getLatLng) { + this._nonPointGroup.removeLayer(layer); + this.fire('layerremove', {layer: layer}); + return this; + } + + if (!this._map) { + if (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) { + this._needsRemoving.push({layer: layer, latlng: layer._latlng}); + } + this.fire('layerremove', {layer: layer}); + return this; + } + + if (!layer.__parent) { + return this; + } + + if (this._unspiderfy) { + this._unspiderfy(); + this._unspiderfyLayer(layer); + } + + // Remove the marker from clusters + this._removeLayer(layer, true); + this.fire('layerremove', {layer: layer}); + + // Refresh bounds and weighted positions. + this._topClusterLevel._recalculateBounds(); + + this._refreshClustersIcons(); + + layer.off(this._childMarkerEventHandlers, this); + + if (this._featureGroup.hasLayer(layer)) { + this._featureGroup.removeLayer(layer); + if (layer.clusterShow) { + layer.clusterShow(); + } + } + + return this; + }, + + // Takes an array of markers and adds them in bulk + addLayers: function(layersArray, skipLayerAddEvent) { + if (!L.Util.isArray(layersArray)) { + return this.addLayer(layersArray); + } + + var fg = this._featureGroup, + npg = this._nonPointGroup, + chunked = this.options.chunkedLoading, + chunkInterval = this.options.chunkInterval, + chunkProgress = this.options.chunkProgress, + l = layersArray.length, + offset = 0, + originalArray = true, + m; + + if (this._map) { + var started = (new Date()).getTime(); + var process = L.bind(function() { + var start = (new Date()).getTime(); + for (; offset < l; offset++) { + if (chunked && offset % 200 === 0) { + // every couple hundred markers, instrument the time elapsed since processing started: + var elapsed = (new Date()).getTime() - start; + if (elapsed > chunkInterval) { + break; // been working too hard, time to take a break :-) + } + } + + m = layersArray[offset]; + + // Group of layers, append children to layersArray and skip. + // Side effects: + // - Total increases, so chunkProgress ratio jumps backward. + // - Groups are not included in this group, only their non-group child layers (hasLayer). + // Changing array length while looping does not affect performance in current browsers: + // http:// jsperf.com/for-loop-changing-length/6 + if (m instanceof L.LayerGroup) { + if (originalArray) { + layersArray = layersArray.slice(); + originalArray = false; + } + this._extractNonGroupLayers(m, layersArray); + l = layersArray.length; + continue; + } + + // Not point data, can't be clustered + if (!m.getLatLng) { + npg.addLayer(m); + if (!skipLayerAddEvent) { + this.fire('layeradd', {layer: m}); + } + continue; + } + + if (this.hasLayer(m)) { + continue; + } + + this._addLayer(m, this._maxZoom); + if (!skipLayerAddEvent) { + this.fire('layeradd', {layer: m}); + } + + // If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will + if (m.__parent) { + if (m.__parent.getChildCount() === 2) { + var markers = m.__parent.getAllChildMarkers(), + otherMarker = markers[0] === m ? markers[1] : markers[0]; + fg.removeLayer(otherMarker); + } + } + } + + if (chunkProgress) { + // report progress and time elapsed: + chunkProgress(offset, l, (new Date()).getTime() - started); + } + + // Completed processing all markers. + if (offset === l) { + + // Refresh bounds and weighted positions. + this._topClusterLevel._recalculateBounds(); + + this._refreshClustersIcons(); + + this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); + } else { + setTimeout(process, this.options.chunkDelay); + } + }, this); + + process(); + } else { + var needsClustering = this._needsClustering; + + for (; offset < l; offset++) { + m = layersArray[offset]; + + // Group of layers, append children to layersArray and skip. + if (m instanceof L.LayerGroup) { + if (originalArray) { + layersArray = layersArray.slice(); + originalArray = false; + } + this._extractNonGroupLayers(m, layersArray); + l = layersArray.length; + continue; + } + + // Not point data, can't be clustered + if (!m.getLatLng) { + npg.addLayer(m); + continue; + } + + if (this.hasLayer(m)) { + continue; + } + + needsClustering.push(m); + } + } + return this; + }, + + // Takes an array of markers and removes them in bulk + removeLayers: function(layersArray) { + var i, m, + l = layersArray.length, + fg = this._featureGroup, + npg = this._nonPointGroup, + originalArray = true; + + if (!this._map) { + for (i = 0; i < l; i++) { + m = layersArray[i]; + + // Group of layers, append children to layersArray and skip. + if (m instanceof L.LayerGroup) { + if (originalArray) { + layersArray = layersArray.slice(); + originalArray = false; + } + this._extractNonGroupLayers(m, layersArray); + l = layersArray.length; + continue; + } + + this._arraySplice(this._needsClustering, m); + npg.removeLayer(m); + if (this.hasLayer(m)) { + this._needsRemoving.push({layer: m, latlng: m._latlng}); + } + this.fire('layerremove', {layer: m}); + } + return this; + } + + if (this._unspiderfy) { + this._unspiderfy(); + + // Work on a copy of the array, so that next loop is not affected. + var layersArray2 = layersArray.slice(), + l2 = l; + for (i = 0; i < l2; i++) { + m = layersArray2[i]; + + // Group of layers, append children to layersArray and skip. + if (m instanceof L.LayerGroup) { + this._extractNonGroupLayers(m, layersArray2); + l2 = layersArray2.length; + continue; + } + + this._unspiderfyLayer(m); + } + } + + for (i = 0; i < l; i++) { + m = layersArray[i]; + + // Group of layers, append children to layersArray and skip. + if (m instanceof L.LayerGroup) { + if (originalArray) { + layersArray = layersArray.slice(); + originalArray = false; + } + this._extractNonGroupLayers(m, layersArray); + l = layersArray.length; + continue; + } + + if (!m.__parent) { + npg.removeLayer(m); + this.fire('layerremove', {layer: m}); + continue; + } + + this._removeLayer(m, true, true); + this.fire('layerremove', {layer: m}); + + if (fg.hasLayer(m)) { + fg.removeLayer(m); + if (m.clusterShow) { + m.clusterShow(); + } + } + } + + // Refresh bounds and weighted positions. + this._topClusterLevel._recalculateBounds(); + + this._refreshClustersIcons(); + + // Fix up the clusters and markers on the map + this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); + + return this; + }, + + // Removes all layers from the MarkerClusterGroup + clearLayers: function() { + // Need our own special implementation as the LayerGroup one doesn't work for us + + // If we aren't on the map (yet), blow away the markers we know of + if (!this._map) { + this._needsClustering = []; + this._needsRemoving = []; + delete this._gridClusters; + delete this._gridUnclustered; + } + + if (this._noanimationUnspiderfy) { + this._noanimationUnspiderfy(); + } + + // Remove all the visible layers + this._featureGroup.clearLayers(); + this._nonPointGroup.clearLayers(); + + this.eachLayer(function(marker) { + marker.off(this._childMarkerEventHandlers, this); + delete marker.__parent; + }, this); + + if (this._map) { + // Reset _topClusterLevel and the DistanceGrids + this._generateInitialClusters(); + } + + return this; + }, + + // Override FeatureGroup.getBounds as it doesn't work + getBounds: function() { + var bounds = new L.LatLngBounds(); + + if (this._topClusterLevel) { + bounds.extend(this._topClusterLevel._bounds); + } + + for (var i = this._needsClustering.length - 1; i >= 0; i--) { + bounds.extend(this._needsClustering[i].getLatLng()); + } + + bounds.extend(this._nonPointGroup.getBounds()); + + return bounds; + }, + + // Overrides LayerGroup.eachLayer + eachLayer: function(method, context) { + var markers = this._needsClustering.slice(), + needsRemoving = this._needsRemoving, + thisNeedsRemoving, i, j; + + if (this._topClusterLevel) { + this._topClusterLevel.getAllChildMarkers(markers); + } + + for (i = markers.length - 1; i >= 0; i--) { + thisNeedsRemoving = true; + + for (j = needsRemoving.length - 1; j >= 0; j--) { + if (needsRemoving[j].layer === markers[i]) { + thisNeedsRemoving = false; + break; + } + } + + if (thisNeedsRemoving) { + method.call(context, markers[i]); + } + } + + this._nonPointGroup.eachLayer(method, context); + }, + + // Overrides LayerGroup.getLayers + getLayers: function() { + var layers = []; + this.eachLayer(function(l) { + layers.push(l); + }); + return layers; + }, + + // Overrides LayerGroup.getLayer, WARNING: Really bad performance + getLayer: function(id) { + var result = null; + + id = parseInt(id, 10); + + this.eachLayer(function(l) { + if (L.stamp(l) === id) { + result = l; + } + }); + + return result; + }, + + // Returns true if the given layer is in this MarkerClusterGroup + hasLayer: function(layer) { + if (!layer) { + return false; + } + + var i, anArray = this._needsClustering; + + for (i = anArray.length - 1; i >= 0; i--) { + if (anArray[i] === layer) { + return true; + } + } + + anArray = this._needsRemoving; + for (i = anArray.length - 1; i >= 0; i--) { + if (anArray[i].layer === layer) { + return false; + } + } + + return !!(layer.__parent && layer.__parent._group === this) || this._nonPointGroup.hasLayer(layer); + }, + + // Zoom down to show the given layer (spiderfying if necessary) then calls the callback + zoomToShowLayer: function(layer, callback) { + + if (typeof callback !== 'function') { + callback = function() { + }; + } + + var showMarker = function() { + if ((layer._icon || layer.__parent._icon) && !this._inZoomAnimation) { + this._map.off('moveend', showMarker, this); + this.off('animationend', showMarker, this); + + if (layer._icon) { + callback(); + } else if (layer.__parent._icon) { + this.once('spiderfied', callback, this); + layer.__parent.spiderfy(); + } + } + }; + + if (layer._icon && this._map.getBounds().contains(layer.getLatLng())) { + // Layer is visible ond on screen, immediate return + callback(); + } else if (layer.__parent._zoom < Math.round(this._map._zoom)) { + // Layer should be visible at this zoom level. It must not be on screen so just pan over to it + this._map.on('moveend', showMarker, this); + this._map.panTo(layer.getLatLng()); + } else { + this._map.on('moveend', showMarker, this); + this.on('animationend', showMarker, this); + layer.__parent.zoomToBounds(); + } + }, + + // Overrides FeatureGroup.onAdd + onAdd: function(map) { + this._map = map; + var i, l, layer; + + if (!isFinite(this._map.getMaxZoom())) { + throw "Map has no maxZoom specified"; + } + + this._featureGroup.addTo(map); + this._nonPointGroup.addTo(map); + + if (!this._gridClusters) { + this._generateInitialClusters(); + } + + this._maxLat = map.options.crs.projection.MAX_LATITUDE; + + // Restore all the positions as they are in the MCG before removing them + for (i = 0, l = this._needsRemoving.length; i < l; i++) { + layer = this._needsRemoving[i]; + layer.newlatlng = layer.layer._latlng; + layer.layer._latlng = layer.latlng; + } + // Remove them, then restore their new positions + for (i = 0, l = this._needsRemoving.length; i < l; i++) { + layer = this._needsRemoving[i]; + this._removeLayer(layer.layer, true); + layer.layer._latlng = layer.newlatlng; + } + this._needsRemoving = []; + + // Remember the current zoom level and bounds + this._zoom = Math.round(this._map._zoom); + this._currentShownBounds = this._getExpandedVisibleBounds(); + + this._map.on('zoomend', this._zoomEnd, this); + this._map.on('moveend', this._moveEnd, this); + + if (this._spiderfierOnAdd) { // TODO FIXME: Not sure how to have spiderfier add something on here nicely + this._spiderfierOnAdd(); + } + + this._bindEvents(); + + // Actually add our markers to the map: + l = this._needsClustering; + this._needsClustering = []; + this.addLayers(l, true); + }, + + // Overrides FeatureGroup.onRemove + onRemove: function(map) { + map.off('zoomend', this._zoomEnd, this); + map.off('moveend', this._moveEnd, this); + + this._unbindEvents(); + + // In case we are in a cluster animation + this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); + + if (this._spiderfierOnRemove) { // TODO FIXME: Not sure how to have spiderfier add something on here nicely + this._spiderfierOnRemove(); + } + + delete this._maxLat; + + // Clean up all the layers we added to the map + this._hideCoverage(); + this._featureGroup.remove(); + this._nonPointGroup.remove(); + + this._featureGroup.clearLayers(); + + this._map = null; + }, + + getVisibleParent: function(marker) { + var vMarker = marker; + while (vMarker && !vMarker._icon) { + vMarker = vMarker.__parent; + } + return vMarker || null; + }, + + // Remove the given object from the given array + _arraySplice: function(anArray, obj) { + for (var i = anArray.length - 1; i >= 0; i--) { + if (anArray[i] === obj) { + anArray.splice(i, 1); + return true; + } + } + }, + + /** + * Removes a marker from all _gridUnclustered zoom levels, starting at the supplied zoom. + * @param marker to be removed from _gridUnclustered. + * @param z integer bottom start zoom level (included) + * @private + */ + _removeFromGridUnclustered: function(marker, z) { + var map = this._map, + gridUnclustered = this._gridUnclustered, + minZoom = Math.floor(this._map.getMinZoom()); + + for (; z >= minZoom; z--) { + if (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) { + break; + } + } + }, + + _childMarkerDragStart: function(e) { + e.target.__dragStart = e.target._latlng; + }, + + _childMarkerMoved: function(e) { + if (!this._ignoreMove && !e.target.__dragStart) { + var isPopupOpen = e.target._popup && e.target._popup.isOpen(); + + this._moveChild(e.target, e.oldLatLng, e.latlng); + + if (isPopupOpen) { + e.target.openPopup(); + } + } + }, + + _moveChild: function(layer, from, to) { + layer._latlng = from; + this.removeLayer(layer); + + layer._latlng = to; + this.addLayer(layer); + }, + + _childMarkerDragEnd: function(e) { + var dragStart = e.target.__dragStart; + delete e.target.__dragStart; + if (dragStart) { + this._moveChild(e.target, dragStart, e.target._latlng); + } + }, + + + // Internal function for removing a marker from everything. + // dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions) + _removeLayer: function(marker, removeFromDistanceGrid, dontUpdateMap) { + var gridClusters = this._gridClusters, + gridUnclustered = this._gridUnclustered, + fg = this._featureGroup, + map = this._map, + minZoom = Math.floor(this._map.getMinZoom()); + + // Remove the marker from distance clusters it might be in + if (removeFromDistanceGrid) { + this._removeFromGridUnclustered(marker, this._maxZoom); + } + + // Work our way up the clusters removing them as we go if required + var cluster = marker.__parent, + markers = cluster._markers, + otherMarker; + + // Remove the marker from the immediate parents marker list + this._arraySplice(markers, marker); + + while (cluster) { + cluster._childCount--; + cluster._boundsNeedUpdate = true; + + if (cluster._zoom < minZoom) { + // Top level, do nothing + break; + } else if (removeFromDistanceGrid && cluster._childCount <= 1) { // Cluster no longer required + // We need to push the other marker up to the parent + otherMarker = cluster._markers[0] === marker ? cluster._markers[1] : cluster._markers[0]; + + // Update distance grid + gridClusters[cluster._zoom].removeObject(cluster, map.project(cluster._cLatLng, cluster._zoom)); + gridUnclustered[cluster._zoom].addObject(otherMarker, map.project(otherMarker.getLatLng(), cluster._zoom)); + + // Move otherMarker up to parent + this._arraySplice(cluster.__parent._childClusters, cluster); + cluster.__parent._markers.push(otherMarker); + otherMarker.__parent = cluster.__parent; + + if (cluster._icon) { + // Cluster is currently on the map, need to put the marker on the map instead + fg.removeLayer(cluster); + if (!dontUpdateMap) { + fg.addLayer(otherMarker); + } + } + } else { + cluster._iconNeedsUpdate = true; + } + + cluster = cluster.__parent; + } + + delete marker.__parent; + }, + + _isOrIsParent: function(el, oel) { + while (oel) { + if (el === oel) { + return true; + } + oel = oel.parentNode; + } + return false; + }, + + // Override L.Evented.fire + fire: function(type, data, propagate) { + if (data && data.layer instanceof L.MarkerCluster) { + // Prevent multiple clustermouseover/off events if the icon is made up of stacked divs (Doesn't work in ie <= 8, no relatedTarget) + if (data.originalEvent && this._isOrIsParent(data.layer._icon, data.originalEvent.relatedTarget)) { + return; + } + type = 'cluster' + type; + } + + L.FeatureGroup.prototype.fire.call(this, type, data, propagate); + }, + + // Override L.Evented.listens + listens: function(type, propagate) { + return L.FeatureGroup.prototype.listens.call(this, type, propagate) || L.FeatureGroup.prototype.listens.call(this, 'cluster' + type, propagate); + }, + + // Default functionality + _defaultIconCreateFunction: function(cluster) { + var childCount = cluster.getChildCount(); + + var c = ' marker-cluster-'; + if (childCount < 10) { + c += 'small'; + } else if (childCount < 100) { + c += 'medium'; + } else { + c += 'large'; + } + + return new L.DivIcon({ + html: '<div><span>' + childCount + '</span></div>', + className: 'marker-cluster' + c, + iconSize: new L.Point(40, 40) + }); + }, + + _bindEvents: function() { + var map = this._map, + spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, + showCoverageOnHover = this.options.showCoverageOnHover, + zoomToBoundsOnClick = this.options.zoomToBoundsOnClick; + + // Zoom on cluster click or spiderfy if we are at the lowest level + if (spiderfyOnMaxZoom || zoomToBoundsOnClick) { + this.on('clusterclick', this._zoomOrSpiderfy, this); + } + + // Show convex hull (boundary) polygon on mouse over + if (showCoverageOnHover) { + this.on('clustermouseover', this._showCoverage, this); + this.on('clustermouseout', this._hideCoverage, this); + map.on('zoomend', this._hideCoverage, this); + } + }, + + _zoomOrSpiderfy: function(e) { + var cluster = e.layer, + bottomCluster = cluster; + + while (bottomCluster._childClusters.length === 1) { + bottomCluster = bottomCluster._childClusters[0]; + } + + if (bottomCluster._zoom === this._maxZoom && + bottomCluster._childCount === cluster._childCount && + this.options.spiderfyOnMaxZoom) { + + // All child markers are contained in a single cluster from this._maxZoom to this cluster. + cluster.spiderfy(); + } else if (this.options.zoomToBoundsOnClick) { + cluster.zoomToBounds(); + } + + // Focus the map again for keyboard users. + if (e.originalEvent && e.originalEvent.keyCode === 13) { + this._map._container.focus(); + } + }, + + _showCoverage: function(e) { + var map = this._map; + if (this._inZoomAnimation) { + return; + } + if (this._shownPolygon) { + map.removeLayer(this._shownPolygon); + } + if (e.layer.getChildCount() > 2 && e.layer !== this._spiderfied) { + this._shownPolygon = new L.Polygon(e.layer.getConvexHull(), this.options.polygonOptions); + map.addLayer(this._shownPolygon); + } + }, + + _hideCoverage: function() { + if (this._shownPolygon) { + this._map.removeLayer(this._shownPolygon); + this._shownPolygon = null; + } + }, + + _unbindEvents: function() { + var spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, + showCoverageOnHover = this.options.showCoverageOnHover, + zoomToBoundsOnClick = this.options.zoomToBoundsOnClick, + map = this._map; + + if (spiderfyOnMaxZoom || zoomToBoundsOnClick) { + this.off('clusterclick', this._zoomOrSpiderfy, this); + } + if (showCoverageOnHover) { + this.off('clustermouseover', this._showCoverage, this); + this.off('clustermouseout', this._hideCoverage, this); + map.off('zoomend', this._hideCoverage, this); + } + }, + + _zoomEnd: function() { + if (!this._map) { // May have been removed from the map by a zoomEnd handler + return; + } + this._mergeSplitClusters(); + + this._zoom = Math.round(this._map._zoom); + this._currentShownBounds = this._getExpandedVisibleBounds(); + }, + + _moveEnd: function() { + if (this._inZoomAnimation) { + return; + } + + var newBounds = this._getExpandedVisibleBounds(); + + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, newBounds); + this._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), newBounds); + + this._currentShownBounds = newBounds; + return; + }, + + _generateInitialClusters: function() { + var maxZoom = Math.ceil(this._map.getMaxZoom()), + minZoom = Math.floor(this._map.getMinZoom()), + radius = this.options.maxClusterRadius, + radiusFn = radius; + + // If we just set maxClusterRadius to a single number, we need to create + // a simple function to return that number. Otherwise, we just have to + // use the function we've passed in. + if (typeof radius !== "function") { + radiusFn = function() { + return radius; + }; + } + + if (this.options.disableClusteringAtZoom !== null) { + maxZoom = this.options.disableClusteringAtZoom - 1; + } + this._maxZoom = maxZoom; + this._gridClusters = {}; + this._gridUnclustered = {}; + + // Set up DistanceGrids for each zoom + for (var zoom = maxZoom; zoom >= minZoom; zoom--) { + this._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom)); + this._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom)); + } + + // Instantiate the appropriate L.MarkerCluster class (animated or not). + this._topClusterLevel = new this._markerCluster(this, minZoom - 1); + }, + + // Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom) + _addLayer: function(layer, zoom) { + var gridClusters = this._gridClusters, + gridUnclustered = this._gridUnclustered, + minZoom = Math.floor(this._map.getMinZoom()), + markerPoint, z; + + if (this.options.singleMarkerMode) { + this._overrideMarkerIcon(layer); + } + + layer.on(this._childMarkerEventHandlers, this); + + // Find the lowest zoom level to slot this one in + for (; zoom >= minZoom; zoom--) { + markerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position + + // Try find a cluster close by + var closest = gridClusters[zoom].getNearObject(markerPoint); + if (closest) { + closest._addChild(layer); + layer.__parent = closest; + return; + } + + // Try find a marker close by to form a new cluster with + closest = gridUnclustered[zoom].getNearObject(markerPoint); + if (closest) { + var parent = closest.__parent; + if (parent) { + this._removeLayer(closest, false); + } + + // Create new cluster with these 2 in it + + var newCluster = new this._markerCluster(this, zoom, closest, layer); + gridClusters[zoom].addObject(newCluster, this._map.project(newCluster._cLatLng, zoom)); + closest.__parent = newCluster; + layer.__parent = newCluster; + + // First create any new intermediate parent clusters that don't exist + var lastParent = newCluster; + for (z = zoom - 1; z > parent._zoom; z--) { + lastParent = new this._markerCluster(this, z, lastParent); + gridClusters[z].addObject(lastParent, this._map.project(closest.getLatLng(), z)); + } + parent._addChild(lastParent); + + // Remove closest from this zoom level and any above that it is in, replace with newCluster + this._removeFromGridUnclustered(closest, zoom); + + return; + } + + // Didn't manage to cluster in at this zoom, record us as a marker here and continue upwards + gridUnclustered[zoom].addObject(layer, markerPoint); + } + + // Didn't get in anything, add us to the top + this._topClusterLevel._addChild(layer); + layer.__parent = this._topClusterLevel; + return; + }, + + /** + * Refreshes the icon of all "dirty" visible clusters. + * Non-visible "dirty" clusters will be updated when they are added to the map. + * @private + */ + _refreshClustersIcons: function() { + this._featureGroup.eachLayer(function(c) { + if (c instanceof L.MarkerCluster && c._iconNeedsUpdate) { + c._updateIcon(); + } + }); + }, + + // Enqueue code to fire after the marker expand/contract has happened + _enqueue: function(fn) { + this._queue.push(fn); + if (!this._queueTimeout) { + this._queueTimeout = setTimeout(L.bind(this._processQueue, this), 300); + } + }, + _processQueue: function() { + for (var i = 0; i < this._queue.length; i++) { + this._queue[i].call(this); + } + this._queue.length = 0; + clearTimeout(this._queueTimeout); + this._queueTimeout = null; + }, + + // Merge and split any existing clusters that are too big or small + _mergeSplitClusters: function() { + var mapZoom = Math.round(this._map._zoom); + + // In case we are starting to split before the animation finished + this._processQueue(); + + if (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { // Zoom in, split + this._animationStart(); + // Remove clusters now off screen + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, this._getExpandedVisibleBounds()); + + this._animationZoomIn(this._zoom, mapZoom); + + } else if (this._zoom > mapZoom) { // Zoom out, merge + this._animationStart(); + + this._animationZoomOut(this._zoom, mapZoom); + } else { + this._moveEnd(); + } + }, + + // Gets the maps visible bounds expanded in each direction by the size of the screen (so the user cannot see an area we do not cover in one pan) + _getExpandedVisibleBounds: function() { + if (!this.options.removeOutsideVisibleBounds) { + return this._mapBoundsInfinite + } else if (L.Browser.mobile) { + return this._checkBoundsMaxLat(this._map.getBounds()) + } + + return this._checkBoundsMaxLat(this._map.getBounds().pad(1)) // Padding expands the bounds by its own dimensions but scaled with the given factor. + }, + + /** + * Expands the latitude to Infinity (or -Infinity) if the input bounds reach the map projection maximum defined latitude + * (in the case of Web/Spherical Mercator, it is 85.0511287798 / see https:// en.wikipedia.org/wiki/Web_Mercator#Formulas). + * Otherwise, the removeOutsideVisibleBounds option will remove markers beyond that limit, whereas the same markers without + * this option (or outside MCG) will have their position floored (ceiled) by the projection and rendered at that limit, + * making the user think that MCG "eats" them and never displays them again. + * @param bounds L.LatLngBounds + * @returns {L.LatLngBounds} + * @private + */ + _checkBoundsMaxLat: function(bounds) { + var maxLat = this._maxLat + + if (maxLat !== undefined) { + if (bounds.getNorth() >= maxLat) { + bounds._northEast.lat = Infinity + } + if (bounds.getSouth() <= -maxLat) { + bounds._southWest.lat = -Infinity + } + } + + return bounds + }, + + // Shared animation code + _animationAddLayerNonAnimated: function(layer, newCluster) { + if (newCluster === layer) { + this._featureGroup.addLayer(layer) + } else if (newCluster._childCount === 2) { + newCluster._addToMap() + + var markers = newCluster.getAllChildMarkers() + this._featureGroup.removeLayer(markers[0]) + this._featureGroup.removeLayer(markers[1]) + } else { + newCluster._updateIcon() + } + }, + + /** + * Extracts individual (i.e. non-group) layers from a Layer Group. + * @param group to extract layers from. + * @param output {Array} in which to store the extracted layers. + * @returns {*|Array} + * @private + */ + _extractNonGroupLayers: function(group, output) { + var layers = group.getLayers(), + i = 0, + layer + + output = output || [] + + for (; i < layers.length; i++) { + layer = layers[i] + + if (layer instanceof L.LayerGroup) { + this._extractNonGroupLayers(layer, output) + continue + } + + output.push(layer) + } + + return output + }, + + /** + * Implements the singleMarkerMode option. + * @param layer Marker to re-style using the Clusters iconCreateFunction. + * @returns {L.Icon} The newly created icon. + * @private + */ + _overrideMarkerIcon: function(layer) { + var icon = layer.options.icon = this.options.iconCreateFunction({ + getChildCount: function() { + return 1 + }, + getAllChildMarkers: function() { + return [layer] + } + }) + + return icon + } + }) + +// Constant bounds used in case option "removeOutsideVisibleBounds" is set to false. + L.MarkerClusterGroup.include({ + _mapBoundsInfinite: new L.LatLngBounds(new L.LatLng(-Infinity, -Infinity), new L.LatLng(Infinity, Infinity)) + }) + + L.MarkerClusterGroup.include({ + _noAnimation: { + // Non Animated versions of everything + _animationStart: function() { + // Do nothing... + }, + _animationZoomIn: function(previousZoomLevel, newZoomLevel) { + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel); + this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()) + + // We didn't actually animate, but we use this event to mean "clustering animations have finished" + this.fire('animationend') + }, + _animationZoomOut: function(previousZoomLevel, newZoomLevel) { + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel); + this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()) + + // We didn't actually animate, but we use this event to mean "clustering animations have finished" + this.fire('animationend') + }, + _animationAddLayer: function(layer, newCluster) { + this._animationAddLayerNonAnimated(layer, newCluster) + } + }, + + _withAnimation: { + // Animated versions here + _animationStart: function() { + this._map._mapPane.className += ' leaflet-cluster-anim' + this._inZoomAnimation++ + }, + + _animationZoomIn: function(previousZoomLevel, newZoomLevel) { + var bounds = this._getExpandedVisibleBounds(), + fg = this._featureGroup, + minZoom = Math.floor(this._map.getMinZoom()), + i + + this._ignoreMove = true + + // Add all children of current clusters to map and remove those clusters from map + this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function(c) { + var startPos = c._latlng, + markers = c._markers, + m + + if (!bounds.contains(startPos)) { + startPos = null + } + + if (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { // Immediately add the new child and remove us + fg.removeLayer(c) + c._recursivelyAddChildrenToMap(null, newZoomLevel, bounds) + } else { + // Fade out old cluster + c.clusterHide() + c._recursivelyAddChildrenToMap(startPos, newZoomLevel, bounds) + } + + // Remove all markers that aren't visible any more + // TODO: Do we actually need to do this on the higher levels too? + for (i = markers.length - 1; i >= 0; i--) { + m = markers[i] + if (!bounds.contains(m._latlng)) { + fg.removeLayer(m) + } + } + + }); + + this._forceLayout() + + // Update opacities + this._topClusterLevel._recursivelyBecomeVisible(bounds, newZoomLevel); + // TODO Maybe? Update markers in _recursivelyBecomeVisible + fg.eachLayer(function(n) { + if (!(n instanceof L.MarkerCluster) && n._icon) { + n.clusterShow() + } + }); + + // update the positions of the just added clusters/markers + this._topClusterLevel._recursively(bounds, previousZoomLevel, newZoomLevel, function(c) { + c._recursivelyRestoreChildPositions(newZoomLevel); + }); + + this._ignoreMove = false; + + // Remove the old clusters and close the zoom animation + this._enqueue(function() { + // update the positions of the just added clusters/markers + this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function(c) { + fg.removeLayer(c) + c.clusterShow() + }) + + this._animationEnd() + }) + }, + + _animationZoomOut: function(previousZoomLevel, newZoomLevel) { + this._animationZoomOutSingle(this._topClusterLevel, previousZoomLevel - 1, newZoomLevel) + + // Need to add markers for those that weren't on the map before but are now + this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()) + // Remove markers that were on the map before but won't be now + this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel, this._getExpandedVisibleBounds()); + }, + + _animationAddLayer: function(layer, newCluster) { + var me = this, + fg = this._featureGroup + + fg.addLayer(layer) + if (newCluster !== layer) { + if (newCluster._childCount > 2) { // Was already a cluster + newCluster._updateIcon() + this._forceLayout() + this._animationStart() + + layer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng())) + layer.clusterHide() + + this._enqueue(function() { + fg.removeLayer(layer) + layer.clusterShow() + + me._animationEnd() + }); + + } else { // Just became a cluster + this._forceLayout() + + me._animationStart() + me._animationZoomOutSingle(newCluster, this._map.getMaxZoom(), this._zoom) + } + } + } + }, + + // Private methods for animated versions. + _animationZoomOutSingle: function(cluster, previousZoomLevel, newZoomLevel) { + var bounds = this._getExpandedVisibleBounds(), + minZoom = Math.floor(this._map.getMinZoom()) + + // Animate all of the markers in the clusters to move to their cluster center point + cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, minZoom, previousZoomLevel + 1, newZoomLevel) + + var me = this + + // Update the opacity (If we immediately set it they won't animate) + this._forceLayout(); + cluster._recursivelyBecomeVisible(bounds, newZoomLevel) + + // TODO: Maybe use the transition timing stuff to make this more reliable + // When the animations are done, tidy up + this._enqueue(function() { + // This cluster stopped being a cluster before the timeout fired + if (cluster._childCount === 1) { + var m = cluster._markers[0] + // If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it + this._ignoreMove = true + m.setLatLng(m.getLatLng()) + this._ignoreMove = false + if (m.clusterShow) { + m.clusterShow() + } + } else { + cluster._recursively(bounds, newZoomLevel, minZoom, function(c) { + c._recursivelyRemoveChildrenFromMap(bounds, minZoom, previousZoomLevel + 1) + }) + } + me._animationEnd() + }); + }, + + _animationEnd: function() { + if (this._map) { + this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); + } + this._inZoomAnimation-- + this.fire('animationend') + }, + + // Force a browser layout of stuff in the map + // Should apply the current opacity and location to all elements so we can update them again for an animation + _forceLayout: function() { + // In my testing this works, infact offsetWidth of any element seems to work. + // Could loop all this._layers and do this for each _icon if it stops working + + L.Util.falseFn(document.body.offsetWidth) + } + }); + + L.markerClusterGroup = function(options) { + return new L.MarkerClusterGroup(options) + }; + + var MarkerCluster = L.MarkerCluster = L.Marker.extend({ + options: L.Icon.prototype.options, + + initialize: function(group, zoom, a, b) { + L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), + { icon: this, pane: group.options.clusterPane }) + + this._group = group + this._zoom = zoom + + this._markers = [] + this._childClusters = [] + this._childCount = 0 + this._iconNeedsUpdate = true + this._boundsNeedUpdate = true + + this._bounds = new L.LatLngBounds() + + if (a) { + this._addChild(a); + } + if (b) { + this._addChild(b); + } + }, + + // Recursively retrieve all child markers of this cluster + getAllChildMarkers: function(storageArray, ignoreDraggedMarker) { + storageArray = storageArray || [] + + for (var i = this._childClusters.length - 1; i >= 0; i--) { + this._childClusters[i].getAllChildMarkers(storageArray) + } + + for (var j = this._markers.length - 1; j >= 0; j--) { + if (ignoreDraggedMarker && this._markers[j].__dragStart) { + continue + } + storageArray.push(this._markers[j]) + } + + return storageArray + }, + + // Returns the count of how many child markers we have + getChildCount: function() { + return this._childCount; + }, + + // Zoom to the minimum of showing all of the child markers, or the extents of this cluster + zoomToBounds: function(fitBoundsOptions) { + var childClusters = this._childClusters.slice(), + map = this._group._map, + boundsZoom = map.getBoundsZoom(this._bounds), + zoom = this._zoom + 1, + mapZoom = map.getZoom(), + i; + + // calculate how far we need to zoom down to see all of the markers + while (childClusters.length > 0 && boundsZoom > zoom) { + zoom++; + var newClusters = []; + for (i = 0; i < childClusters.length; i++) { + newClusters = newClusters.concat(childClusters[i]._childClusters); + } + childClusters = newClusters; + } + + if (boundsZoom > zoom) { + this._group._map.setView(this._latlng, zoom); + } else if (boundsZoom <= mapZoom) { // If fitBounds wouldn't zoom us down, zoom us down instead + this._group._map.setView(this._latlng, mapZoom + 1); + } else { + this._group._map.fitBounds(this._bounds, fitBoundsOptions) + } + }, + + getBounds: function() { + var bounds = new L.LatLngBounds() + bounds.extend(this._bounds) + return bounds + }, + + _updateIcon: function() { + this._iconNeedsUpdate = true + if (this._icon) { + this.setIcon(this) + } + }, + + // Cludge for Icon, we pretend to be an icon for performance + createIcon: function() { + if (this._iconNeedsUpdate) { + this._iconObj = this._group.options.iconCreateFunction(this); + this._iconNeedsUpdate = false + } + return this._iconObj.createIcon() + }, + createShadow: function() { + return this._iconObj.createShadow() + }, + + _addChild: function(new1, isNotificationFromChild) { + this._iconNeedsUpdate = true + + this._boundsNeedUpdate = true + this._setClusterCenter(new1) + + if (new1 instanceof L.MarkerCluster) { + if (!isNotificationFromChild) { + this._childClusters.push(new1) + new1.__parent = this + } + this._childCount += new1._childCount + } else { + if (!isNotificationFromChild) { + this._markers.push(new1) + } + this._childCount++ + } + + if (this.__parent) { + this.__parent._addChild(new1, true) + } + }, + + /** + * Makes sure the cluster center is set. If not, uses the child center if it is a cluster, or the marker position. + * @param child L.MarkerCluster|L.Marker that will be used as cluster center if not defined yet. + * @private + */ + _setClusterCenter: function(child) { + if (!this._cLatLng) { + // when clustering, take position of the first point as the cluster center + this._cLatLng = child._cLatLng || child._latlng + } + }, + + /** + * Assigns impossible bounding values so that the next extend entirely determines the new bounds. + * This method avoids having to trash the previous L.LatLngBounds object and to create a new one, which is much slower for this class. + * As long as the bounds are not extended, most other methods would probably fail, as they would with bounds initialized but not extended. + * @private + */ + _resetBounds: function() { + var bounds = this._bounds + + if (bounds._southWest) { + bounds._southWest.lat = Infinity + bounds._southWest.lng = Infinity + } + if (bounds._northEast) { + bounds._northEast.lat = -Infinity + bounds._northEast.lng = -Infinity + } + }, + + _recalculateBounds: function() { + var markers = this._markers, + childClusters = this._childClusters, + latSum = 0, + lngSum = 0, + totalCount = this._childCount, + i, child, childLatLng, childCount + + // Case where all markers are removed from the map and we are left with just an empty _topClusterLevel. + if (totalCount === 0) { + return + } + + // Reset rather than creating a new object, for performance. + this._resetBounds() + + // Child markers. + for (i = 0; i < markers.length; i++) { + childLatLng = markers[i]._latlng + + this._bounds.extend(childLatLng) + + latSum += childLatLng.lat + lngSum += childLatLng.lng + } + + // Child clusters. + for (i = 0; i < childClusters.length; i++) { + child = childClusters[i] + + // Re-compute child bounds and weighted position first if necessary. + if (child._boundsNeedUpdate) { + child._recalculateBounds() + } + + this._bounds.extend(child._bounds) + + childLatLng = child._wLatLng + childCount = child._childCount + + latSum += childLatLng.lat * childCount + lngSum += childLatLng.lng * childCount + } + + this._latlng = this._wLatLng = new L.LatLng(latSum / totalCount, lngSum / totalCount) + + // Reset dirty flag. + this._boundsNeedUpdate = false + }, + + // Set our markers position as given and add it to the map + _addToMap: function(startPos) { + if (startPos) { + this._backupLatlng = this._latlng + this.setLatLng(startPos) + } + this._group._featureGroup.addLayer(this) + }, + + _recursivelyAnimateChildrenIn: function(bounds, center, maxZoom) { + this._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1, + function(c) { + var markers = c._markers, + i, m + for (i = markers.length - 1; i >= 0; i--) { + m = markers[i] + + // Only do it if the icon is still on the map + if (m._icon) { + m._setPos(center) + m.clusterHide() + } + } + }, + function(c) { + var childClusters = c._childClusters, + j, cm + for (j = childClusters.length - 1; j >= 0; j--) { + cm = childClusters[j] + if (cm._icon) { + cm._setPos(center) + cm.clusterHide() + } + } + } + ); + }, + + _recursivelyAnimateChildrenInAndAddSelfToMap: function(bounds, mapMinZoom, previousZoomLevel, newZoomLevel) { + this._recursively(bounds, newZoomLevel, mapMinZoom, + function(c) { + c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel); + + // TODO: depthToAnimateIn affects _isSingleParent, if there is a multizoom we may/may not be. + // As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate + if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) { + c.clusterShow() + c._recursivelyRemoveChildrenFromMap(bounds, mapMinZoom, previousZoomLevel) // Immediately remove our children as we are replacing them. TODO previousBounds not bounds + } else { + c.clusterHide() + } + + c._addToMap() + } + ) + }, + + _recursivelyBecomeVisible: function(bounds, zoomLevel) { + this._recursively(bounds, this._group._map.getMinZoom(), zoomLevel, null, function(c) { + c.clusterShow() + }) + }, + + _recursivelyAddChildrenToMap: function(startPos, zoomLevel, bounds) { + this._recursively(bounds, this._group._map.getMinZoom() - 1, zoomLevel, + function(c) { + if (zoomLevel === c._zoom) { + return + } + + // Add our child markers at startPos (so they can be animated out) + for (var i = c._markers.length - 1; i >= 0; i--) { + var nm = c._markers[i] + + if (!bounds.contains(nm._latlng)) { + continue + } + + if (startPos) { + nm._backupLatlng = nm.getLatLng() + + nm.setLatLng(startPos) + if (nm.clusterHide) { + nm.clusterHide() + } + } + + c._group._featureGroup.addLayer(nm) + } + }, + function(c) { + c._addToMap(startPos) + } + ) + }, + + _recursivelyRestoreChildPositions: function(zoomLevel) { + // Fix positions of child markers + for (var i = this._markers.length - 1; i >= 0; i--) { + var nm = this._markers[i] + if (nm._backupLatlng) { + nm.setLatLng(nm._backupLatlng) + delete nm._backupLatlng + } + } + + if (zoomLevel - 1 === this._zoom) { + // Reposition child clusters + for (var j = this._childClusters.length - 1; j >= 0; j--) { + this._childClusters[j]._restorePosition(); + } + } else { + for (var k = this._childClusters.length - 1; k >= 0; k--) { + this._childClusters[k]._recursivelyRestoreChildPositions(zoomLevel) + } + } + }, + + _restorePosition: function() { + if (this._backupLatlng) { + this.setLatLng(this._backupLatlng) + delete this._backupLatlng + } + }, + + // exceptBounds: If set, don't remove any markers/clusters in it + _recursivelyRemoveChildrenFromMap: function(previousBounds, mapMinZoom, zoomLevel, exceptBounds) { + var m, i + this._recursively(previousBounds, mapMinZoom - 1, zoomLevel - 1, + function(c) { + // Remove markers at every level + for (i = c._markers.length - 1; i >= 0; i--) { + m = c._markers[i] + if (!exceptBounds || !exceptBounds.contains(m._latlng)) { + c._group._featureGroup.removeLayer(m) + if (m.clusterShow) { + m.clusterShow() + } + } + } + }, + function(c) { + // Remove child clusters at just the bottom level + for (i = c._childClusters.length - 1; i >= 0; i--) { + m = c._childClusters[i] + if (!exceptBounds || !exceptBounds.contains(m._latlng)) { + c._group._featureGroup.removeLayer(m) + if (m.clusterShow) { + m.clusterShow() + } + } + } + } + ) + }, + + // Run the given functions recursively to this and child clusters + // boundsToApplyTo: a L.LatLngBounds representing the bounds of what clusters to recurse in to + // zoomLevelToStart: zoom level to start running functions (inclusive) + // zoomLevelToStop: zoom level to stop running functions (inclusive) + // runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level + // runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level + _recursively: function(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) { + var childClusters = this._childClusters, + zoom = this._zoom, + i, c + + if (zoomLevelToStart <= zoom) { + if (runAtEveryLevel) { + runAtEveryLevel(this) + } + if (runAtBottomLevel && zoom === zoomLevelToStop) { + runAtBottomLevel(this) + } + } + + if (zoom < zoomLevelToStart || zoom < zoomLevelToStop) { + for (i = childClusters.length - 1; i >= 0; i--) { + c = childClusters[i] + if (c._boundsNeedUpdate) { + c._recalculateBounds() + } + if (boundsToApplyTo.intersects(c._bounds)) { + c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) + } + } + } + }, + + // Returns true if we are the parent of only one cluster and that cluster is the same as us + _isSingleParent: function() { + // Don't need to check this._markers as the rest won't work if there are any + return this._childClusters.length > 0 && this._childClusters[0]._childCount === this._childCount + } + }); + + /* + * Extends L.Marker to include two extra methods: clusterHide and clusterShow. + * + * They work as setOpacity(0) and setOpacity(1) respectively, but + * don't overwrite the options.opacity + * + */ + + L.Marker.include({ + clusterHide: function() { + var backup = this.options.opacity + this.setOpacity(0) + this.options.opacity = backup + return this + }, + + clusterShow: function() { + return this.setOpacity(this.options.opacity) + } + }) + + L.DistanceGrid = function(cellSize) { + this._cellSize = cellSize + this._sqCellSize = cellSize * cellSize + this._grid = {} + this._objectPoint = {} + } + + L.DistanceGrid.prototype = { + + addObject: function(obj, point) { + var x = this._getCoord(point.x), + y = this._getCoord(point.y), + grid = this._grid, + row = grid[y] = grid[y] || {}, + cell = row[x] = row[x] || [], + stamp = L.Util.stamp(obj) + + this._objectPoint[stamp] = point + + cell.push(obj) + }, + + updateObject: function(obj, point) { + this.removeObject(obj) + this.addObject(obj, point) + }, + + // Returns true if the object was found + removeObject: function(obj, point) { + var x = this._getCoord(point.x), + y = this._getCoord(point.y), + grid = this._grid, + row = grid[y] = grid[y] || {}, + cell = row[x] = row[x] || [], + i, len; + + delete this._objectPoint[L.Util.stamp(obj)]; + + for (i = 0, len = cell.length; i < len; i++) { + if (cell[i] === obj) { + cell.splice(i, 1) + + if (len === 1) { + delete row[x] + } + + return true + } + } + }, + + eachObject: function(fn, context) { + var i, j, k, len, row, cell, removed, + grid = this._grid + + for (i in grid) { + row = grid[i] + + for (j in row) { + cell = row[j] + + for (k = 0, len = cell.length; k < len; k++) { + removed = fn.call(context, cell[k]); + if (removed) { + k-- + len-- + } + } + } + } + }, + + getNearObject: function(point) { + var x = this._getCoord(point.x), + y = this._getCoord(point.y), + i, j, k, row, cell, len, obj, dist, + objectPoint = this._objectPoint, + closestDistSq = this._sqCellSize, + closest = null + + for (i = y - 1; i <= y + 1; i++) { + row = this._grid[i] + if (row) { + for (j = x - 1; j <= x + 1; j++) { + cell = row[j] + if (cell) { + for (k = 0, len = cell.length; k < len; k++) { + obj = cell[k] + dist = this._sqDist(objectPoint[L.Util.stamp(obj)], point); + if (dist < closestDistSq || + dist <= closestDistSq && closest === null) { + closestDistSq = dist + closest = obj + } + } + } + } + } + } + return closest + }, + + _getCoord: function(x) { + var coord = Math.floor(x / this._cellSize) + return isFinite(coord) ? coord : x + }, + + _sqDist: function(p, p2) { + var dx = p2.x - p.x, + dy = p2.y - p.y + return dx * dx + dy * dy + } + }; + + /* Copyright (c) 2012 the authors listed at the following URL, and/or + the authors of referenced articles or incorporated external code: + http:// en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256 + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Retrieved from: http:// en.literateprograms.org/Quickhull_(Javascript)?oldid=18434 + */ + + (function() { + L.QuickHull = { + + /* + * @param {Object} cpt a point to be measured from the baseline + * @param {Array} bl the baseline, as represented by a two-element + * array of latlng objects. + * @returns {Number} an approximate distance measure + */ + getDistant: function(cpt, bl) { + var vY = bl[1].lat - bl[0].lat, + vX = bl[0].lng - bl[1].lng + return (vX * (cpt.lat - bl[0].lat) + vY * (cpt.lng - bl[0].lng)) + }, + + /* + * @param {Array} baseLine a two-element array of latlng objects + * representing the baseline to project from + * @param {Array} latLngs an array of latlng objects + * @returns {Object} the maximum point and all new points to stay + * in consideration for the hull. + */ + findMostDistantPointFromBaseLine: function(baseLine, latLngs) { + var maxD = 0, + maxPt = null, + newPoints = [], + i, pt, d + + for (i = latLngs.length - 1; i >= 0; i--) { + pt = latLngs[i] + d = this.getDistant(pt, baseLine) + + if (d > 0) { + newPoints.push(pt) + } else { + continue + } + + if (d > maxD) { + maxD = d + maxPt = pt + } + } + + return { maxPoint: maxPt, newPoints: newPoints } + }, + + /* + * Given a baseline, compute the convex hull of latLngs as an array + * of latLngs. + * + * @param {Array} latLngs + * @returns {Array} + */ + buildConvexHull: function(baseLine, latLngs) { + var convexHullBaseLines = [], + t = this.findMostDistantPointFromBaseLine(baseLine, latLngs); + + if (t.maxPoint) { // if there is still a point "outside" the base line + convexHullBaseLines = + convexHullBaseLines.concat( + this.buildConvexHull([baseLine[0], t.maxPoint], t.newPoints) + ); + convexHullBaseLines = + convexHullBaseLines.concat( + this.buildConvexHull([t.maxPoint, baseLine[1]], t.newPoints) + ) + return convexHullBaseLines + } else { // if there is no more point "outside" the base line, the current base line is part of the convex hull + return [baseLine[0]] + } + }, + + /* + * Given an array of latlngs, compute a convex hull as an array + * of latlngs + * + * @param {Array} latLngs + * @returns {Array} + */ + getConvexHull: function(latLngs) { + // find first baseline + var maxLat = false, minLat = false, + maxLng = false, minLng = false, + maxLatPt = null, minLatPt = null, + maxLngPt = null, minLngPt = null, + maxPt = null, minPt = null, + i + + for (i = latLngs.length - 1; i >= 0; i--) { + var pt = latLngs[i] + if (maxLat === false || pt.lat > maxLat) { + maxLatPt = pt + maxLat = pt.lat + } + if (minLat === false || pt.lat < minLat) { + minLatPt = pt + minLat = pt.lat + } + if (maxLng === false || pt.lng > maxLng) { + maxLngPt = pt + maxLng = pt.lng + } + if (minLng === false || pt.lng < minLng) { + minLngPt = pt + minLng = pt.lng + } + } + + if (minLat !== maxLat) { + minPt = minLatPt + maxPt = maxLatPt + } else { + minPt = minLngPt + maxPt = maxLngPt + } + + var ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs), + this.buildConvexHull([maxPt, minPt], latLngs)) + return ch + } + } + }()) + + L.MarkerCluster.include({ + getConvexHull: function() { + var childMarkers = this.getAllChildMarkers(), + points = [], + p, i + + for (i = childMarkers.length - 1; i >= 0; i--) { + p = childMarkers[i].getLatLng() + points.push(p) + } + + return L.QuickHull.getConvexHull(points); + } + }) + +// This code is 100% based on https:// github.com/jawj/OverlappingMarkerSpiderfier-Leaflet +// Huge thanks to jawj for implementing it first to make my job easy :-) + + L.MarkerCluster.include({ + + _2PI: Math.PI * 2, + _circleFootSeparation: 25, // related to circumference of circle + _circleStartAngle: 0, + + _spiralFootSeparation: 28, // related to size of spiral (experiment!) + _spiralLengthStart: 11, + _spiralLengthFactor: 5, + + _circleSpiralSwitchover: 9, // show spiral instead of circle from this marker count upwards. + // 0 -> always spiral; Infinity -> always circle + + spiderfy: function() { + if (this._group._spiderfied === this || this._group._inZoomAnimation) { + return + } + + var childMarkers = this.getAllChildMarkers(null, true), + group = this._group, + map = group._map, + center = map.latLngToLayerPoint(this._latlng), + positions; + + this._group._unspiderfy(); + this._group._spiderfied = this; + + // TODO Maybe: childMarkers order by distance to center + + if (childMarkers.length >= this._circleSpiralSwitchover) { + positions = this._generatePointsSpiral(childMarkers.length, center) + } else { + center.y += 10 // Otherwise circles look wrong => hack for standard blue icon, renders differently for other icons. + positions = this._generatePointsCircle(childMarkers.length, center) + } + + this._animationSpiderfy(childMarkers, positions) + }, + + unspiderfy: function(zoomDetails) { + // <param Name="zoomDetails">Argument from zoomanim if being called in a zoom animation or null otherwise</param> + if (this._group._inZoomAnimation) { + return + } + this._animationUnspiderfy(zoomDetails) + + this._group._spiderfied = null + }, + + _generatePointsCircle: function(count, centerPt) { + var circumference = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + count), + legLength = circumference / this._2PI, // radius from circumference + angleStep = this._2PI / count, + res = [], + i, angle + + legLength = Math.max(legLength, 35) // Minimum distance to get outside the cluster icon. + + res.length = count + + for (i = 0; i < count; i++) { // Clockwise, like spiral. + angle = this._circleStartAngle + i * angleStep; + res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round(); + } + + return res + }, + + _generatePointsSpiral: function(count, centerPt) { + var spiderfyDistanceMultiplier = this._group.options.spiderfyDistanceMultiplier, + legLength = spiderfyDistanceMultiplier * this._spiralLengthStart, + separation = spiderfyDistanceMultiplier * this._spiralFootSeparation, + lengthFactor = spiderfyDistanceMultiplier * this._spiralLengthFactor * this._2PI, + angle = 0, + res = [], + i + + res.length = count + + // Higher index, closer position to cluster center. + for (i = count; i >= 0; i--) { + // Skip the first position, so that we are already farther from center and we avoid + // being under the default cluster icon (especially important for Circle Markers). + if (i < count) { + res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round() + } + angle += separation / legLength + i * 0.0005 + legLength += lengthFactor / angle + } + return res; + }, + + _noanimationUnspiderfy: function() { + var group = this._group, + map = group._map, + fg = group._featureGroup, + childMarkers = this.getAllChildMarkers(null, true), + m, i + + group._ignoreMove = true + + this.setOpacity(1) + for (i = childMarkers.length - 1; i >= 0; i--) { + m = childMarkers[i] + + fg.removeLayer(m) + + if (m._preSpiderfyLatlng) { + m.setLatLng(m._preSpiderfyLatlng) + delete m._preSpiderfyLatlng + } + if (m.setZIndexOffset) { + m.setZIndexOffset(0) + } + + if (m._spiderLeg) { + map.removeLayer(m._spiderLeg) + delete m._spiderLeg + } + } + + group.fire('unspiderfied', { + cluster: this, + markers: childMarkers + }) + group._ignoreMove = false + group._spiderfied = null + } + }) + +// Non Animated versions of everything + L.MarkerClusterNonAnimated = L.MarkerCluster.extend({ + _animationSpiderfy: function(childMarkers, positions) { + var group = this._group, + map = group._map, + fg = group._featureGroup, + legOptions = this._group.options.spiderLegPolylineOptions, + i, m, leg, newPos + + group._ignoreMove = true + + // Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition. + // The reverse order trick no longer improves performance on modern browsers. + for (i = 0; i < childMarkers.length; i++) { + newPos = map.layerPointToLatLng(positions[i]) + m = childMarkers[i] + + // Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it. + leg = new L.Polyline([this._latlng, newPos], legOptions) + map.addLayer(leg) + m._spiderLeg = leg + + // Now add the marker. + m._preSpiderfyLatlng = m._latlng + m.setLatLng(newPos) + if (m.setZIndexOffset) { + m.setZIndexOffset(1000000) // Make these appear on top of EVERYTHING + } + + fg.addLayer(m) + } + this.setOpacity(0.3) + + group._ignoreMove = false + group.fire('spiderfied', { + cluster: this, + markers: childMarkers + }) + }, + + _animationUnspiderfy: function() { + this._noanimationUnspiderfy() + } + }) + +// Animated versions here + L.MarkerCluster.include({ + + _animationSpiderfy: function(childMarkers, positions) { + var me = this, + group = this._group, + map = group._map, + fg = group._featureGroup, + thisLayerLatLng = this._latlng, + thisLayerPos = map.latLngToLayerPoint(thisLayerLatLng), + svg = L.Path.SVG, + legOptions = L.extend({}, this._group.options.spiderLegPolylineOptions), // Copy the options so that we can modify them for animation. + finalLegOpacity = legOptions.opacity, + i, m, leg, legPath, legLength, newPos + + if (finalLegOpacity === undefined) { + finalLegOpacity = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity; + } + + if (svg) { + // If the initial opacity of the spider leg is not 0 then it appears before the animation starts. + legOptions.opacity = 0 + + // Add the class for CSS transitions. + legOptions.className = (legOptions.className || '') + ' leaflet-cluster-spider-leg' + } else { + // Make sure we have a defined opacity. + legOptions.opacity = finalLegOpacity + } + + group._ignoreMove = true + + // Add markers and spider legs to map, hidden at our center point. + // Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition. + // The reverse order trick no longer improves performance on modern browsers. + for (i = 0; i < childMarkers.length; i++) { + m = childMarkers[i] + + newPos = map.layerPointToLatLng(positions[i]) + + // Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it. + leg = new L.Polyline([thisLayerLatLng, newPos], legOptions) + map.addLayer(leg) + m._spiderLeg = leg + + // Explanations: https:// jakearchibald.com/2013/animated-line-drawing-svg/ + // In our case the transition property is declared in the CSS file. + if (svg) { + legPath = leg._path + legLength = legPath.getTotalLength() + 0.1 // Need a small extra length to avoid remaining dot in Firefox. + legPath.style.strokeDasharray = legLength // Just 1 length is enough, it will be duplicated. + legPath.style.strokeDashoffset = legLength + } + + // If it is a marker, add it now and we'll animate it out + if (m.setZIndexOffset) { + m.setZIndexOffset(1000000) // Make normal markers appear on top of EVERYTHING + } + if (m.clusterHide) { + m.clusterHide() + } + + // Vectors just get immediately added + fg.addLayer(m) + + if (m._setPos) { + m._setPos(thisLayerPos) + } + } + + group._forceLayout() + group._animationStart() + + // Reveal markers and spider legs. + for (i = childMarkers.length - 1; i >= 0; i--) { + newPos = map.layerPointToLatLng(positions[i]) + m = childMarkers[i] + + // Move marker to new position + m._preSpiderfyLatlng = m._latlng + m.setLatLng(newPos) + + if (m.clusterShow) { + m.clusterShow() + } + + // Animate leg (animation is actually delegated to CSS transition). + if (svg) { + leg = m._spiderLeg + legPath = leg._path + legPath.style.strokeDashoffset = 0 + // legPath.style.strokeOpacity = finalLegOpacity; + leg.setStyle({ opacity: finalLegOpacity }) + } + } + this.setOpacity(0.3) + + group._ignoreMove = false + + setTimeout(function() { + group._animationEnd() + group.fire('spiderfied', { + cluster: me, + markers: childMarkers + }) + }, 200) + }, + + _animationUnspiderfy: function(zoomDetails) { + var me = this, + group = this._group, + map = group._map, + fg = group._featureGroup, + thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng), + childMarkers = this.getAllChildMarkers(null, true), + svg = L.Path.SVG, + m, i, leg, legPath, legLength, nonAnimatable + + group._ignoreMove = true + group._animationStart() + + // Make us visible and bring the child markers back in + this.setOpacity(1) + for (i = childMarkers.length - 1; i >= 0; i--) { + m = childMarkers[i] + + // Marker was added to us after we were spiderfied + if (!m._preSpiderfyLatlng) { + continue + } + + // Close any popup on the marker first, otherwise setting the location of the marker will make the map scroll + m.closePopup() + + // Fix up the location to the real one + m.setLatLng(m._preSpiderfyLatlng) + delete m._preSpiderfyLatlng + + // Hack override the location to be our center + nonAnimatable = true + if (m._setPos) { + m._setPos(thisLayerPos) + nonAnimatable = false + } + if (m.clusterHide) { + m.clusterHide() + nonAnimatable = false + } + if (nonAnimatable) { + fg.removeLayer(m) + } + + // Animate the spider leg back in (animation is actually delegated to CSS transition). + if (svg) { + leg = m._spiderLeg + legPath = leg._path + legLength = legPath.getTotalLength() + 0.1 + legPath.style.strokeDashoffset = legLength + leg.setStyle({ opacity: 0 }) + } + } + + group._ignoreMove = false + + setTimeout(function() { + // If we have only <= one child left then that marker will be shown on the map so don't remove it! + var stillThereChildCount = 0; + for (i = childMarkers.length - 1; i >= 0; i--) { + m = childMarkers[i] + if (m._spiderLeg) { + stillThereChildCount++ + } + } + + for (i = childMarkers.length - 1; i >= 0; i--) { + m = childMarkers[i] + + if (!m._spiderLeg) { // Has already been unspiderfied + continue + } + + if (m.clusterShow) { + m.clusterShow() + } + if (m.setZIndexOffset) { + m.setZIndexOffset(0) + } + + if (stillThereChildCount > 1) { + fg.removeLayer(m) + } + + map.removeLayer(m._spiderLeg) + delete m._spiderLeg + } + group._animationEnd() + group.fire('unspiderfied', { + cluster: me, + markers: childMarkers + }) + }, 200) + } + }) + + L.MarkerClusterGroup.include({ + // The MarkerCluster currently spiderfied (if any) + _spiderfied: null, + + unspiderfy: function() { + this._unspiderfy.apply(this, arguments); + }, + + _spiderfierOnAdd: function() { + this._map.on('click', this._unspiderfyWrapper, this) + + if (this._map.options.zoomAnimation) { + this._map.on('zoomstart', this._unspiderfyZoomStart, this) + } + // Browsers without zoomAnimation or a big zoom don't fire zoomstart + this._map.on('zoomend', this._noanimationUnspiderfy, this) + + if (!L.Browser.touch) { + this._map.getRenderer(this); + // Needs to happen in the pageload, not after, or animations don't work in webkit + // http:// stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements + // Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticable + } + }, + + _spiderfierOnRemove: function() { + this._map.off('click', this._unspiderfyWrapper, this) + this._map.off('zoomstart', this._unspiderfyZoomStart, this) + this._map.off('zoomanim', this._unspiderfyZoomAnim, this) + this._map.off('zoomend', this._noanimationUnspiderfy, this) + + // Ensure that markers are back where they should be + // Use no animation to avoid a sticky leaflet-cluster-anim class on mapPane + this._noanimationUnspiderfy() + }, + + // On zoom start we add a zoomanim handler so that we are guaranteed to be last (after markers are animated) + // This means we can define the animation they do rather than Markers doing an animation to their actual location + _unspiderfyZoomStart: function() { + if (!this._map) { // May have been removed from the map by a zoomEnd handler + return + } + + this._map.on('zoomanim', this._unspiderfyZoomAnim, this); + }, + + _unspiderfyZoomAnim: function(zoomDetails) { + // Wait until the first zoomanim after the user has finished touch-zooming before running the animation + if (L.DomUtil.hasClass(this._map._mapPane, 'leaflet-touching')) { + return + } + + this._map.off('zoomanim', this._unspiderfyZoomAnim, this) + this._unspiderfy(zoomDetails) + }, + + _unspiderfyWrapper: function() { + // <summary>_unspiderfy but passes no arguments</summary> + this._unspiderfy() + }, + + _unspiderfy: function(zoomDetails) { + if (this._spiderfied) { + this._spiderfied.unspiderfy(zoomDetails) + } + }, + + _noanimationUnspiderfy: function() { + if (this._spiderfied) { + this._spiderfied._noanimationUnspiderfy() + } + }, + + // If the given layer is currently being spiderfied then we unspiderfy it so it isn't on the map anymore etc + _unspiderfyLayer: function(layer) { + if (layer._spiderLeg) { + this._featureGroup.removeLayer(layer) + + if (layer.clusterShow) { + layer.clusterShow() + } + // Position will be fixed up immediately in _animationUnspiderfy + if (layer.setZIndexOffset) { + layer.setZIndexOffset(0) + } + + this._map.removeLayer(layer._spiderLeg) + delete layer._spiderLeg + } + } + }); + + /** + * Adds 1 public method to MCG and 1 to L.Marker to facilitate changing + * markers' icon options and refreshing their icon and their parent clusters + * accordingly (case where their iconCreateFunction uses data of childMarkers + * to make up the cluster icon). + */ + + + L.MarkerClusterGroup.include({ + /** + * Updates the icon of all clusters which are parents of the given marker(s). + * In singleMarkerMode, also updates the given marker(s) icon. + * @param layers L.MarkerClusterGroup|L.LayerGroup|Array(L.Marker)|Map(L.Marker)| + * L.MarkerCluster|L.Marker (optional) list of markers (or single marker) whose parent + * clusters need to be updated. If not provided, retrieves all child markers of this. + * @returns {L.MarkerClusterGroup} + */ + refreshClusters: function(layers) { + if (!layers) { + layers = this._topClusterLevel.getAllChildMarkers() + } else if (layers instanceof L.MarkerClusterGroup) { + layers = layers._topClusterLevel.getAllChildMarkers() + } else if (layers instanceof L.LayerGroup) { + layers = layers._layers + } else if (layers instanceof L.MarkerCluster) { + layers = layers.getAllChildMarkers() + } else if (layers instanceof L.Marker) { + layers = [layers] + } // else: must be an Array(L.Marker)|Map(L.Marker) + this._flagParentsIconsNeedUpdate(layers) + this._refreshClustersIcons() + + // In case of singleMarkerMode, also re-draw the markers. + if (this.options.singleMarkerMode) { + this._refreshSingleMarkerModeMarkers(layers) + } + + return this + }, + + /** + * Simply flags all parent clusters of the given markers as having a "dirty" icon. + * @param layers Array(L.Marker)|Map(L.Marker) list of markers. + * @private + */ + _flagParentsIconsNeedUpdate: function(layers) { + var id, parent + + // Assumes layers is an Array or an Object whose prototype is non-enumerable. + for (id in layers) { + // Flag parent clusters' icon as "dirty", all the way up. + // Dumb process that flags multiple times upper parents, but still + // much more efficient than trying to be smart and make short lists, + // at least in the case of a hierarchy following a power law: + // http:// jsperf.com/flag-nodes-in-power-hierarchy/2 + parent = layers[id].__parent + while (parent) { + parent._iconNeedsUpdate = true + parent = parent.__parent + } + } + }, + + /** + * Re-draws the icon of the supplied markers. + * To be used in singleMarkerMode only. + * @param layers Array(L.Marker)|Map(L.Marker) list of markers. + * @private + */ + _refreshSingleMarkerModeMarkers: function(layers) { + var id, layer + + for (id in layers) { + layer = layers[id] + + // Make sure we do not override markers that do not belong to THIS group. + if (this.hasLayer(layer)) { + // Need to re-create the icon first, then re-draw the marker. + layer.setIcon(this._overrideMarkerIcon(layer)) + } + } + } + }); + + L.Marker.include({ + /** + * Updates the given options in the marker's icon and refreshes the marker. + * @param options map object of icon options. + * @param directlyRefreshClusters boolean (optional) true to trigger + * MCG.refreshClustersOf() right away with this single marker. + * @returns {L.Marker} + */ + refreshIconOptions: function(options, directlyRefreshClusters) { + var icon = this.options.icon + + L.setOptions(icon, options) + + this.setIcon(icon) + + // Shortcut to refresh the associated MCG clusters right away. + // To be used when refreshing a single marker. + // Otherwise, better use MCG.refreshClusters() once at the end with + // the list of modified markers. + if (directlyRefreshClusters && this.__parent) { + this.__parent._group.refreshClusters(this) + } + + return this + } + }) + + exports.MarkerClusterGroup = MarkerClusterGroup + exports.MarkerCluster = MarkerCluster + +} + +export default { + init +} diff --git a/src/components/plugin/cluster-layer/leaflet.markercluster-src.js.map b/src/components/plugin/cluster-layer/leaflet.markercluster-src.js.map new file mode 100644 index 0000000..30220ae --- /dev/null +++ b/src/components/plugin/cluster-layer/leaflet.markercluster-src.js.map @@ -0,0 +1 @@ +{"version":3,"file":"leaflet.markercluster-src.js","sources":["../src/MarkerClusterGroup.js","../src/MarkerCluster.js","../src/MarkerOpacity.js","../src/DistanceGrid.js","../src/MarkerCluster.QuickHull.js","../src/MarkerCluster.Spiderfier.js","../src/MarkerClusterGroup.Refresh.js"],"sourcesContent":["/*\r\n * L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within\r\n */\r\n\r\nexport var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({\r\n\r\n\toptions: {\r\n\t\tmaxClusterRadius: 80, //A cluster will cover at most this many pixels from its center\r\n\t\ticonCreateFunction: null,\r\n\t\tclusterPane: L.Marker.prototype.options.pane,\r\n\r\n\t\tspiderfyOnMaxZoom: true,\r\n\t\tshowCoverageOnHover: true,\r\n\t\tzoomToBoundsOnClick: true,\r\n\t\tsingleMarkerMode: false,\r\n\r\n\t\tdisableClusteringAtZoom: null,\r\n\r\n\t\t// Setting this to false prevents the removal of any clusters outside of the viewpoint, which\r\n\t\t// is the default behaviour for performance reasons.\r\n\t\tremoveOutsideVisibleBounds: true,\r\n\r\n\t\t// Set to false to disable all animations (zoom and spiderfy).\r\n\t\t// If false, option animateAddingMarkers below has no effect.\r\n\t\t// If L.DomUtil.TRANSITION is falsy, this option has no effect.\r\n\t\tanimate: true,\r\n\r\n\t\t//Whether to animate adding markers after adding the MarkerClusterGroup to the map\r\n\t\t// If you are adding individual markers set to true, if adding bulk markers leave false for massive performance gains.\r\n\t\tanimateAddingMarkers: false,\r\n\r\n\t\t//Increase to increase the distance away that spiderfied markers appear from the center\r\n\t\tspiderfyDistanceMultiplier: 1,\r\n\r\n\t\t// Make it possible to specify a polyline options on a spider leg\r\n\t\tspiderLegPolylineOptions: { weight: 1.5, color: '#222', opacity: 0.5 },\r\n\r\n\t\t// When bulk adding layers, adds markers in chunks. Means addLayers may not add all the layers in the call, others will be loaded during setTimeouts\r\n\t\tchunkedLoading: false,\r\n\t\tchunkInterval: 200, // process markers for a maximum of ~ n milliseconds (then trigger the chunkProgress callback)\r\n\t\tchunkDelay: 50, // at the end of each interval, give n milliseconds back to system/browser\r\n\t\tchunkProgress: null, // progress callback: function(processed, total, elapsed) (e.g. for a progress indicator)\r\n\r\n\t\t//Options to pass to the L.Polygon constructor\r\n\t\tpolygonOptions: {}\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.Util.setOptions(this, options);\r\n\t\tif (!this.options.iconCreateFunction) {\r\n\t\t\tthis.options.iconCreateFunction = this._defaultIconCreateFunction;\r\n\t\t}\r\n\r\n\t\tthis._featureGroup = L.featureGroup();\r\n\t\tthis._featureGroup.addEventParent(this);\r\n\r\n\t\tthis._nonPointGroup = L.featureGroup();\r\n\t\tthis._nonPointGroup.addEventParent(this);\r\n\r\n\t\tthis._inZoomAnimation = 0;\r\n\t\tthis._needsClustering = [];\r\n\t\tthis._needsRemoving = []; //Markers removed while we aren't on the map need to be kept track of\r\n\t\t//The bounds of the currently shown area (from _getExpandedVisibleBounds) Updated on zoom/move\r\n\t\tthis._currentShownBounds = null;\r\n\r\n\t\tthis._queue = [];\r\n\r\n\t\tthis._childMarkerEventHandlers = {\r\n\t\t\t'dragstart': this._childMarkerDragStart,\r\n\t\t\t'move': this._childMarkerMoved,\r\n\t\t\t'dragend': this._childMarkerDragEnd,\r\n\t\t};\r\n\r\n\t\t// Hook the appropriate animation methods.\r\n\t\tvar animate = L.DomUtil.TRANSITION && this.options.animate;\r\n\t\tL.extend(this, animate ? this._withAnimation : this._noAnimation);\r\n\t\t// Remember which MarkerCluster class to instantiate (animated or not).\r\n\t\tthis._markerCluster = animate ? L.MarkerCluster : L.MarkerClusterNonAnimated;\r\n\t},\r\n\r\n\taddLayer: function (layer) {\r\n\r\n\t\tif (layer instanceof L.LayerGroup) {\r\n\t\t\treturn this.addLayers([layer]);\r\n\t\t}\r\n\r\n\t\t//Don't cluster non point data\r\n\t\tif (!layer.getLatLng) {\r\n\t\t\tthis._nonPointGroup.addLayer(layer);\r\n\t\t\tthis.fire('layeradd', { layer: layer });\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._map) {\r\n\t\t\tthis._needsClustering.push(layer);\r\n\t\t\tthis.fire('layeradd', { layer: layer });\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\r\n\t\t//If we have already clustered we'll need to add this one to a cluster\r\n\r\n\t\tif (this._unspiderfy) {\r\n\t\t\tthis._unspiderfy();\r\n\t\t}\r\n\r\n\t\tthis._addLayer(layer, this._maxZoom);\r\n\t\tthis.fire('layeradd', { layer: layer });\r\n\r\n\t\t// Refresh bounds and weighted positions.\r\n\t\tthis._topClusterLevel._recalculateBounds();\r\n\r\n\t\tthis._refreshClustersIcons();\r\n\r\n\t\t//Work out what is visible\r\n\t\tvar visibleLayer = layer,\r\n\t\t currentZoom = this._zoom;\r\n\t\tif (layer.__parent) {\r\n\t\t\twhile (visibleLayer.__parent._zoom >= currentZoom) {\r\n\t\t\t\tvisibleLayer = visibleLayer.__parent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._currentShownBounds.contains(visibleLayer.getLatLng())) {\r\n\t\t\tif (this.options.animateAddingMarkers) {\r\n\t\t\t\tthis._animationAddLayer(layer, visibleLayer);\r\n\t\t\t} else {\r\n\t\t\t\tthis._animationAddLayerNonAnimated(layer, visibleLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\r\n\t\tif (layer instanceof L.LayerGroup) {\r\n\t\t\treturn this.removeLayers([layer]);\r\n\t\t}\r\n\r\n\t\t//Non point layers\r\n\t\tif (!layer.getLatLng) {\r\n\t\t\tthis._nonPointGroup.removeLayer(layer);\r\n\t\t\tthis.fire('layerremove', { layer: layer });\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._map) {\r\n\t\t\tif (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) {\r\n\t\t\t\tthis._needsRemoving.push({ layer: layer, latlng: layer._latlng });\r\n\t\t\t}\r\n\t\t\tthis.fire('layerremove', { layer: layer });\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!layer.__parent) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this._unspiderfy) {\r\n\t\t\tthis._unspiderfy();\r\n\t\t\tthis._unspiderfyLayer(layer);\r\n\t\t}\r\n\r\n\t\t//Remove the marker from clusters\r\n\t\tthis._removeLayer(layer, true);\r\n\t\tthis.fire('layerremove', { layer: layer });\r\n\r\n\t\t// Refresh bounds and weighted positions.\r\n\t\tthis._topClusterLevel._recalculateBounds();\r\n\r\n\t\tthis._refreshClustersIcons();\r\n\r\n\t\tlayer.off(this._childMarkerEventHandlers, this);\r\n\r\n\t\tif (this._featureGroup.hasLayer(layer)) {\r\n\t\t\tthis._featureGroup.removeLayer(layer);\r\n\t\t\tif (layer.clusterShow) {\r\n\t\t\t\tlayer.clusterShow();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t//Takes an array of markers and adds them in bulk\r\n\taddLayers: function (layersArray, skipLayerAddEvent) {\r\n\t\tif (!L.Util.isArray(layersArray)) {\r\n\t\t\treturn this.addLayer(layersArray);\r\n\t\t}\r\n\r\n\t\tvar fg = this._featureGroup,\r\n\t\t npg = this._nonPointGroup,\r\n\t\t chunked = this.options.chunkedLoading,\r\n\t\t chunkInterval = this.options.chunkInterval,\r\n\t\t chunkProgress = this.options.chunkProgress,\r\n\t\t l = layersArray.length,\r\n\t\t offset = 0,\r\n\t\t originalArray = true,\r\n\t\t m;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tvar started = (new Date()).getTime();\r\n\t\t\tvar process = L.bind(function () {\r\n\t\t\t\tvar start = (new Date()).getTime();\r\n\t\t\t\tfor (; offset < l; offset++) {\r\n\t\t\t\t\tif (chunked && offset % 200 === 0) {\r\n\t\t\t\t\t\t// every couple hundred markers, instrument the time elapsed since processing started:\r\n\t\t\t\t\t\tvar elapsed = (new Date()).getTime() - start;\r\n\t\t\t\t\t\tif (elapsed > chunkInterval) {\r\n\t\t\t\t\t\t\tbreak; // been working too hard, time to take a break :-)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tm = layersArray[offset];\r\n\r\n\t\t\t\t\t// Group of layers, append children to layersArray and skip.\r\n\t\t\t\t\t// Side effects:\r\n\t\t\t\t\t// - Total increases, so chunkProgress ratio jumps backward.\r\n\t\t\t\t\t// - Groups are not included in this group, only their non-group child layers (hasLayer).\r\n\t\t\t\t\t// Changing array length while looping does not affect performance in current browsers:\r\n\t\t\t\t\t// http://jsperf.com/for-loop-changing-length/6\r\n\t\t\t\t\tif (m instanceof L.LayerGroup) {\r\n\t\t\t\t\t\tif (originalArray) {\r\n\t\t\t\t\t\t\tlayersArray = layersArray.slice();\r\n\t\t\t\t\t\t\toriginalArray = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis._extractNonGroupLayers(m, layersArray);\r\n\t\t\t\t\t\tl = layersArray.length;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//Not point data, can't be clustered\r\n\t\t\t\t\tif (!m.getLatLng) {\r\n\t\t\t\t\t\tnpg.addLayer(m);\r\n\t\t\t\t\t\tif (!skipLayerAddEvent) {\r\n\t\t\t\t\t\t\tthis.fire('layeradd', { layer: m });\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (this.hasLayer(m)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._addLayer(m, this._maxZoom);\r\n\t\t\t\t\tif (!skipLayerAddEvent) {\r\n\t\t\t\t\t\tthis.fire('layeradd', { layer: m });\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will\r\n\t\t\t\t\tif (m.__parent) {\r\n\t\t\t\t\t\tif (m.__parent.getChildCount() === 2) {\r\n\t\t\t\t\t\t\tvar markers = m.__parent.getAllChildMarkers(),\r\n\t\t\t\t\t\t\t otherMarker = markers[0] === m ? markers[1] : markers[0];\r\n\t\t\t\t\t\t\tfg.removeLayer(otherMarker);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (chunkProgress) {\r\n\t\t\t\t\t// report progress and time elapsed:\r\n\t\t\t\t\tchunkProgress(offset, l, (new Date()).getTime() - started);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Completed processing all markers.\r\n\t\t\t\tif (offset === l) {\r\n\r\n\t\t\t\t\t// Refresh bounds and weighted positions.\r\n\t\t\t\t\tthis._topClusterLevel._recalculateBounds();\r\n\r\n\t\t\t\t\tthis._refreshClustersIcons();\r\n\r\n\t\t\t\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(process, this.options.chunkDelay);\r\n\t\t\t\t}\r\n\t\t\t}, this);\r\n\r\n\t\t\tprocess();\r\n\t\t} else {\r\n\t\t\tvar needsClustering = this._needsClustering;\r\n\r\n\t\t\tfor (; offset < l; offset++) {\r\n\t\t\t\tm = layersArray[offset];\r\n\r\n\t\t\t\t// Group of layers, append children to layersArray and skip.\r\n\t\t\t\tif (m instanceof L.LayerGroup) {\r\n\t\t\t\t\tif (originalArray) {\r\n\t\t\t\t\t\tlayersArray = layersArray.slice();\r\n\t\t\t\t\t\toriginalArray = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._extractNonGroupLayers(m, layersArray);\r\n\t\t\t\t\tl = layersArray.length;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Not point data, can't be clustered\r\n\t\t\t\tif (!m.getLatLng) {\r\n\t\t\t\t\tnpg.addLayer(m);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.hasLayer(m)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tneedsClustering.push(m);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t//Takes an array of markers and removes them in bulk\r\n\tremoveLayers: function (layersArray) {\r\n\t\tvar i, m,\r\n\t\t l = layersArray.length,\r\n\t\t fg = this._featureGroup,\r\n\t\t npg = this._nonPointGroup,\r\n\t\t originalArray = true;\r\n\r\n\t\tif (!this._map) {\r\n\t\t\tfor (i = 0; i < l; i++) {\r\n\t\t\t\tm = layersArray[i];\r\n\r\n\t\t\t\t// Group of layers, append children to layersArray and skip.\r\n\t\t\t\tif (m instanceof L.LayerGroup) {\r\n\t\t\t\t\tif (originalArray) {\r\n\t\t\t\t\t\tlayersArray = layersArray.slice();\r\n\t\t\t\t\t\toriginalArray = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._extractNonGroupLayers(m, layersArray);\r\n\t\t\t\t\tl = layersArray.length;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._arraySplice(this._needsClustering, m);\r\n\t\t\t\tnpg.removeLayer(m);\r\n\t\t\t\tif (this.hasLayer(m)) {\r\n\t\t\t\t\tthis._needsRemoving.push({ layer: m, latlng: m._latlng });\r\n\t\t\t\t}\r\n\t\t\t\tthis.fire('layerremove', { layer: m });\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this._unspiderfy) {\r\n\t\t\tthis._unspiderfy();\r\n\r\n\t\t\t// Work on a copy of the array, so that next loop is not affected.\r\n\t\t\tvar layersArray2 = layersArray.slice(),\r\n\t\t\t l2 = l;\r\n\t\t\tfor (i = 0; i < l2; i++) {\r\n\t\t\t\tm = layersArray2[i];\r\n\r\n\t\t\t\t// Group of layers, append children to layersArray and skip.\r\n\t\t\t\tif (m instanceof L.LayerGroup) {\r\n\t\t\t\t\tthis._extractNonGroupLayers(m, layersArray2);\r\n\t\t\t\t\tl2 = layersArray2.length;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._unspiderfyLayer(m);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < l; i++) {\r\n\t\t\tm = layersArray[i];\r\n\r\n\t\t\t// Group of layers, append children to layersArray and skip.\r\n\t\t\tif (m instanceof L.LayerGroup) {\r\n\t\t\t\tif (originalArray) {\r\n\t\t\t\t\tlayersArray = layersArray.slice();\r\n\t\t\t\t\toriginalArray = false;\r\n\t\t\t\t}\r\n\t\t\t\tthis._extractNonGroupLayers(m, layersArray);\r\n\t\t\t\tl = layersArray.length;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!m.__parent) {\r\n\t\t\t\tnpg.removeLayer(m);\r\n\t\t\t\tthis.fire('layerremove', { layer: m });\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tthis._removeLayer(m, true, true);\r\n\t\t\tthis.fire('layerremove', { layer: m });\r\n\r\n\t\t\tif (fg.hasLayer(m)) {\r\n\t\t\t\tfg.removeLayer(m);\r\n\t\t\t\tif (m.clusterShow) {\r\n\t\t\t\t\tm.clusterShow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Refresh bounds and weighted positions.\r\n\t\tthis._topClusterLevel._recalculateBounds();\r\n\r\n\t\tthis._refreshClustersIcons();\r\n\r\n\t\t//Fix up the clusters and markers on the map\r\n\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t//Removes all layers from the MarkerClusterGroup\r\n\tclearLayers: function () {\r\n\t\t//Need our own special implementation as the LayerGroup one doesn't work for us\r\n\r\n\t\t//If we aren't on the map (yet), blow away the markers we know of\r\n\t\tif (!this._map) {\r\n\t\t\tthis._needsClustering = [];\r\n\t\t\tthis._needsRemoving = [];\r\n\t\t\tdelete this._gridClusters;\r\n\t\t\tdelete this._gridUnclustered;\r\n\t\t}\r\n\r\n\t\tif (this._noanimationUnspiderfy) {\r\n\t\t\tthis._noanimationUnspiderfy();\r\n\t\t}\r\n\r\n\t\t//Remove all the visible layers\r\n\t\tthis._featureGroup.clearLayers();\r\n\t\tthis._nonPointGroup.clearLayers();\r\n\r\n\t\tthis.eachLayer(function (marker) {\r\n\t\t\tmarker.off(this._childMarkerEventHandlers, this);\r\n\t\t\tdelete marker.__parent;\r\n\t\t}, this);\r\n\r\n\t\tif (this._map) {\r\n\t\t\t//Reset _topClusterLevel and the DistanceGrids\r\n\t\t\tthis._generateInitialClusters();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t//Override FeatureGroup.getBounds as it doesn't work\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new L.LatLngBounds();\r\n\r\n\t\tif (this._topClusterLevel) {\r\n\t\t\tbounds.extend(this._topClusterLevel._bounds);\r\n\t\t}\r\n\r\n\t\tfor (var i = this._needsClustering.length - 1; i >= 0; i--) {\r\n\t\t\tbounds.extend(this._needsClustering[i].getLatLng());\r\n\t\t}\r\n\r\n\t\tbounds.extend(this._nonPointGroup.getBounds());\r\n\r\n\t\treturn bounds;\r\n\t},\r\n\r\n\t//Overrides LayerGroup.eachLayer\r\n\teachLayer: function (method, context) {\r\n\t\tvar markers = this._needsClustering.slice(),\r\n\t\t\tneedsRemoving = this._needsRemoving,\r\n\t\t\tthisNeedsRemoving, i, j;\r\n\r\n\t\tif (this._topClusterLevel) {\r\n\t\t\tthis._topClusterLevel.getAllChildMarkers(markers);\r\n\t\t}\r\n\r\n\t\tfor (i = markers.length - 1; i >= 0; i--) {\r\n\t\t\tthisNeedsRemoving = true;\r\n\r\n\t\t\tfor (j = needsRemoving.length - 1; j >= 0; j--) {\r\n\t\t\t\tif (needsRemoving[j].layer === markers[i]) {\r\n\t\t\t\t\tthisNeedsRemoving = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (thisNeedsRemoving) {\r\n\t\t\t\tmethod.call(context, markers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._nonPointGroup.eachLayer(method, context);\r\n\t},\r\n\r\n\t//Overrides LayerGroup.getLayers\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\t\tthis.eachLayer(function (l) {\r\n\t\t\tlayers.push(l);\r\n\t\t});\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t//Overrides LayerGroup.getLayer, WARNING: Really bad performance\r\n\tgetLayer: function (id) {\r\n\t\tvar result = null;\r\n\r\n\t\tid = parseInt(id, 10);\r\n\r\n\t\tthis.eachLayer(function (l) {\r\n\t\t\tif (L.stamp(l) === id) {\r\n\t\t\t\tresult = l;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t},\r\n\r\n\t//Returns true if the given layer is in this MarkerClusterGroup\r\n\thasLayer: function (layer) {\r\n\t\tif (!layer) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar i, anArray = this._needsClustering;\r\n\r\n\t\tfor (i = anArray.length - 1; i >= 0; i--) {\r\n\t\t\tif (anArray[i] === layer) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tanArray = this._needsRemoving;\r\n\t\tfor (i = anArray.length - 1; i >= 0; i--) {\r\n\t\t\tif (anArray[i].layer === layer) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn !!(layer.__parent && layer.__parent._group === this) || this._nonPointGroup.hasLayer(layer);\r\n\t},\r\n\r\n\t//Zoom down to show the given layer (spiderfying if necessary) then calls the callback\r\n\tzoomToShowLayer: function (layer, callback) {\r\n\r\n\t\tif (typeof callback !== 'function') {\r\n\t\t\tcallback = function () {};\r\n\t\t}\r\n\r\n\t\tvar showMarker = function () {\r\n\t\t\tif ((layer._icon || layer.__parent._icon) && !this._inZoomAnimation) {\r\n\t\t\t\tthis._map.off('moveend', showMarker, this);\r\n\t\t\t\tthis.off('animationend', showMarker, this);\r\n\r\n\t\t\t\tif (layer._icon) {\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t} else if (layer.__parent._icon) {\r\n\t\t\t\t\tthis.once('spiderfied', callback, this);\r\n\t\t\t\t\tlayer.__parent.spiderfy();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (layer._icon && this._map.getBounds().contains(layer.getLatLng())) {\r\n\t\t\t//Layer is visible ond on screen, immediate return\r\n\t\t\tcallback();\r\n\t\t} else if (layer.__parent._zoom < Math.round(this._map._zoom)) {\r\n\t\t\t//Layer should be visible at this zoom level. It must not be on screen so just pan over to it\r\n\t\t\tthis._map.on('moveend', showMarker, this);\r\n\t\t\tthis._map.panTo(layer.getLatLng());\r\n\t\t} else {\r\n\t\t\tthis._map.on('moveend', showMarker, this);\r\n\t\t\tthis.on('animationend', showMarker, this);\r\n\t\t\tlayer.__parent.zoomToBounds();\r\n\t\t}\r\n\t},\r\n\r\n\t//Overrides FeatureGroup.onAdd\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\t\tvar i, l, layer;\r\n\r\n\t\tif (!isFinite(this._map.getMaxZoom())) {\r\n\t\t\tthrow \"Map has no maxZoom specified\";\r\n\t\t}\r\n\r\n\t\tthis._featureGroup.addTo(map);\r\n\t\tthis._nonPointGroup.addTo(map);\r\n\r\n\t\tif (!this._gridClusters) {\r\n\t\t\tthis._generateInitialClusters();\r\n\t\t}\r\n\r\n\t\tthis._maxLat = map.options.crs.projection.MAX_LATITUDE;\r\n\r\n\t\t//Restore all the positions as they are in the MCG before removing them\r\n\t\tfor (i = 0, l = this._needsRemoving.length; i < l; i++) {\r\n\t\t\tlayer = this._needsRemoving[i];\r\n\t\t\tlayer.newlatlng = layer.layer._latlng;\r\n\t\t\tlayer.layer._latlng = layer.latlng;\r\n\t\t}\r\n\t\t//Remove them, then restore their new positions\r\n\t\tfor (i = 0, l = this._needsRemoving.length; i < l; i++) {\r\n\t\t\tlayer = this._needsRemoving[i];\r\n\t\t\tthis._removeLayer(layer.layer, true);\r\n\t\t\tlayer.layer._latlng = layer.newlatlng;\r\n\t\t}\r\n\t\tthis._needsRemoving = [];\r\n\r\n\t\t//Remember the current zoom level and bounds\r\n\t\tthis._zoom = Math.round(this._map._zoom);\r\n\t\tthis._currentShownBounds = this._getExpandedVisibleBounds();\r\n\r\n\t\tthis._map.on('zoomend', this._zoomEnd, this);\r\n\t\tthis._map.on('moveend', this._moveEnd, this);\r\n\r\n\t\tif (this._spiderfierOnAdd) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely\r\n\t\t\tthis._spiderfierOnAdd();\r\n\t\t}\r\n\r\n\t\tthis._bindEvents();\r\n\r\n\t\t//Actually add our markers to the map:\r\n\t\tl = this._needsClustering;\r\n\t\tthis._needsClustering = [];\r\n\t\tthis.addLayers(l, true);\r\n\t},\r\n\r\n\t//Overrides FeatureGroup.onRemove\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend', this._zoomEnd, this);\r\n\t\tmap.off('moveend', this._moveEnd, this);\r\n\r\n\t\tthis._unbindEvents();\r\n\r\n\t\t//In case we are in a cluster animation\r\n\t\tthis._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', '');\r\n\r\n\t\tif (this._spiderfierOnRemove) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely\r\n\t\t\tthis._spiderfierOnRemove();\r\n\t\t}\r\n\r\n\t\tdelete this._maxLat;\r\n\r\n\t\t//Clean up all the layers we added to the map\r\n\t\tthis._hideCoverage();\r\n\t\tthis._featureGroup.remove();\r\n\t\tthis._nonPointGroup.remove();\r\n\r\n\t\tthis._featureGroup.clearLayers();\r\n\r\n\t\tthis._map = null;\r\n\t},\r\n\r\n\tgetVisibleParent: function (marker) {\r\n\t\tvar vMarker = marker;\r\n\t\twhile (vMarker && !vMarker._icon) {\r\n\t\t\tvMarker = vMarker.__parent;\r\n\t\t}\r\n\t\treturn vMarker || null;\r\n\t},\r\n\r\n\t//Remove the given object from the given array\r\n\t_arraySplice: function (anArray, obj) {\r\n\t\tfor (var i = anArray.length - 1; i >= 0; i--) {\r\n\t\t\tif (anArray[i] === obj) {\r\n\t\t\t\tanArray.splice(i, 1);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Removes a marker from all _gridUnclustered zoom levels, starting at the supplied zoom.\r\n\t * @param marker to be removed from _gridUnclustered.\r\n\t * @param z integer bottom start zoom level (included)\r\n\t * @private\r\n\t */\r\n\t_removeFromGridUnclustered: function (marker, z) {\r\n\t\tvar map = this._map,\r\n\t\t gridUnclustered = this._gridUnclustered,\r\n\t\t\tminZoom = Math.floor(this._map.getMinZoom());\r\n\r\n\t\tfor (; z >= minZoom; z--) {\r\n\t\t\tif (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_childMarkerDragStart: function (e) {\r\n\t\te.target.__dragStart = e.target._latlng;\r\n\t},\r\n\r\n\t_childMarkerMoved: function (e) {\r\n\t\tif (!this._ignoreMove && !e.target.__dragStart) {\r\n\t\t\tvar isPopupOpen = e.target._popup && e.target._popup.isOpen();\r\n\r\n\t\t\tthis._moveChild(e.target, e.oldLatLng, e.latlng);\r\n\r\n\t\t\tif (isPopupOpen) {\r\n\t\t\t\te.target.openPopup();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_moveChild: function (layer, from, to) {\r\n\t\tlayer._latlng = from;\r\n\t\tthis.removeLayer(layer);\r\n\r\n\t\tlayer._latlng = to;\r\n\t\tthis.addLayer(layer);\r\n\t},\r\n\r\n\t_childMarkerDragEnd: function (e) {\r\n\t\tvar dragStart = e.target.__dragStart;\r\n\t\tdelete e.target.__dragStart;\r\n\t\tif (dragStart) {\r\n\t\t\tthis._moveChild(e.target, dragStart, e.target._latlng);\r\n\t\t}\t\t\r\n\t},\r\n\r\n\r\n\t//Internal function for removing a marker from everything.\r\n\t//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions)\r\n\t_removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) {\r\n\t\tvar gridClusters = this._gridClusters,\r\n\t\t\tgridUnclustered = this._gridUnclustered,\r\n\t\t\tfg = this._featureGroup,\r\n\t\t\tmap = this._map,\r\n\t\t\tminZoom = Math.floor(this._map.getMinZoom());\r\n\r\n\t\t//Remove the marker from distance clusters it might be in\r\n\t\tif (removeFromDistanceGrid) {\r\n\t\t\tthis._removeFromGridUnclustered(marker, this._maxZoom);\r\n\t\t}\r\n\r\n\t\t//Work our way up the clusters removing them as we go if required\r\n\t\tvar cluster = marker.__parent,\r\n\t\t\tmarkers = cluster._markers,\r\n\t\t\totherMarker;\r\n\r\n\t\t//Remove the marker from the immediate parents marker list\r\n\t\tthis._arraySplice(markers, marker);\r\n\r\n\t\twhile (cluster) {\r\n\t\t\tcluster._childCount--;\r\n\t\t\tcluster._boundsNeedUpdate = true;\r\n\r\n\t\t\tif (cluster._zoom < minZoom) {\r\n\t\t\t\t//Top level, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required\r\n\t\t\t\t//We need to push the other marker up to the parent\r\n\t\t\t\totherMarker = cluster._markers[0] === marker ? cluster._markers[1] : cluster._markers[0];\r\n\r\n\t\t\t\t//Update distance grid\r\n\t\t\t\tgridClusters[cluster._zoom].removeObject(cluster, map.project(cluster._cLatLng, cluster._zoom));\r\n\t\t\t\tgridUnclustered[cluster._zoom].addObject(otherMarker, map.project(otherMarker.getLatLng(), cluster._zoom));\r\n\r\n\t\t\t\t//Move otherMarker up to parent\r\n\t\t\t\tthis._arraySplice(cluster.__parent._childClusters, cluster);\r\n\t\t\t\tcluster.__parent._markers.push(otherMarker);\r\n\t\t\t\totherMarker.__parent = cluster.__parent;\r\n\r\n\t\t\t\tif (cluster._icon) {\r\n\t\t\t\t\t//Cluster is currently on the map, need to put the marker on the map instead\r\n\t\t\t\t\tfg.removeLayer(cluster);\r\n\t\t\t\t\tif (!dontUpdateMap) {\r\n\t\t\t\t\t\tfg.addLayer(otherMarker);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcluster._iconNeedsUpdate = true;\r\n\t\t\t}\r\n\r\n\t\t\tcluster = cluster.__parent;\r\n\t\t}\r\n\r\n\t\tdelete marker.__parent;\r\n\t},\r\n\r\n\t_isOrIsParent: function (el, oel) {\r\n\t\twhile (oel) {\r\n\t\t\tif (el === oel) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\toel = oel.parentNode;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t//Override L.Evented.fire\r\n\tfire: function (type, data, propagate) {\r\n\t\tif (data && data.layer instanceof L.MarkerCluster) {\r\n\t\t\t//Prevent multiple clustermouseover/off events if the icon is made up of stacked divs (Doesn't work in ie <= 8, no relatedTarget)\r\n\t\t\tif (data.originalEvent && this._isOrIsParent(data.layer._icon, data.originalEvent.relatedTarget)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttype = 'cluster' + type;\r\n\t\t}\r\n\r\n\t\tL.FeatureGroup.prototype.fire.call(this, type, data, propagate);\r\n\t},\r\n\r\n\t//Override L.Evented.listens\r\n\tlistens: function (type, propagate) {\r\n\t\treturn L.FeatureGroup.prototype.listens.call(this, type, propagate) || L.FeatureGroup.prototype.listens.call(this, 'cluster' + type, propagate);\r\n\t},\r\n\r\n\t//Default functionality\r\n\t_defaultIconCreateFunction: function (cluster) {\r\n\t\tvar childCount = cluster.getChildCount();\r\n\r\n\t\tvar c = ' marker-cluster-';\r\n\t\tif (childCount < 10) {\r\n\t\t\tc += 'small';\r\n\t\t} else if (childCount < 100) {\r\n\t\t\tc += 'medium';\r\n\t\t} else {\r\n\t\t\tc += 'large';\r\n\t\t}\r\n\r\n\t\treturn new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });\r\n\t},\r\n\r\n\t_bindEvents: function () {\r\n\t\tvar map = this._map,\r\n\t\t spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom,\r\n\t\t showCoverageOnHover = this.options.showCoverageOnHover,\r\n\t\t zoomToBoundsOnClick = this.options.zoomToBoundsOnClick;\r\n\r\n\t\t//Zoom on cluster click or spiderfy if we are at the lowest level\r\n\t\tif (spiderfyOnMaxZoom || zoomToBoundsOnClick) {\r\n\t\t\tthis.on('clusterclick', this._zoomOrSpiderfy, this);\r\n\t\t}\r\n\r\n\t\t//Show convex hull (boundary) polygon on mouse over\r\n\t\tif (showCoverageOnHover) {\r\n\t\t\tthis.on('clustermouseover', this._showCoverage, this);\r\n\t\t\tthis.on('clustermouseout', this._hideCoverage, this);\r\n\t\t\tmap.on('zoomend', this._hideCoverage, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomOrSpiderfy: function (e) {\r\n\t\tvar cluster = e.layer,\r\n\t\t bottomCluster = cluster;\r\n\r\n\t\twhile (bottomCluster._childClusters.length === 1) {\r\n\t\t\tbottomCluster = bottomCluster._childClusters[0];\r\n\t\t}\r\n\r\n\t\tif (bottomCluster._zoom === this._maxZoom &&\r\n\t\t\tbottomCluster._childCount === cluster._childCount &&\r\n\t\t\tthis.options.spiderfyOnMaxZoom) {\r\n\r\n\t\t\t// All child markers are contained in a single cluster from this._maxZoom to this cluster.\r\n\t\t\tcluster.spiderfy();\r\n\t\t} else if (this.options.zoomToBoundsOnClick) {\r\n\t\t\tcluster.zoomToBounds();\r\n\t\t}\r\n\r\n\t\t// Focus the map again for keyboard users.\r\n\t\tif (e.originalEvent && e.originalEvent.keyCode === 13) {\r\n\t\t\tthis._map._container.focus();\r\n\t\t}\r\n\t},\r\n\r\n\t_showCoverage: function (e) {\r\n\t\tvar map = this._map;\r\n\t\tif (this._inZoomAnimation) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (this._shownPolygon) {\r\n\t\t\tmap.removeLayer(this._shownPolygon);\r\n\t\t}\r\n\t\tif (e.layer.getChildCount() > 2 && e.layer !== this._spiderfied) {\r\n\t\t\tthis._shownPolygon = new L.Polygon(e.layer.getConvexHull(), this.options.polygonOptions);\r\n\t\t\tmap.addLayer(this._shownPolygon);\r\n\t\t}\r\n\t},\r\n\r\n\t_hideCoverage: function () {\r\n\t\tif (this._shownPolygon) {\r\n\t\t\tthis._map.removeLayer(this._shownPolygon);\r\n\t\t\tthis._shownPolygon = null;\r\n\t\t}\r\n\t},\r\n\r\n\t_unbindEvents: function () {\r\n\t\tvar spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom,\r\n\t\t\tshowCoverageOnHover = this.options.showCoverageOnHover,\r\n\t\t\tzoomToBoundsOnClick = this.options.zoomToBoundsOnClick,\r\n\t\t\tmap = this._map;\r\n\r\n\t\tif (spiderfyOnMaxZoom || zoomToBoundsOnClick) {\r\n\t\t\tthis.off('clusterclick', this._zoomOrSpiderfy, this);\r\n\t\t}\r\n\t\tif (showCoverageOnHover) {\r\n\t\t\tthis.off('clustermouseover', this._showCoverage, this);\r\n\t\t\tthis.off('clustermouseout', this._hideCoverage, this);\r\n\t\t\tmap.off('zoomend', this._hideCoverage, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomEnd: function () {\r\n\t\tif (!this._map) { //May have been removed from the map by a zoomEnd handler\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._mergeSplitClusters();\r\n\r\n\t\tthis._zoom = Math.round(this._map._zoom);\r\n\t\tthis._currentShownBounds = this._getExpandedVisibleBounds();\r\n\t},\r\n\r\n\t_moveEnd: function () {\r\n\t\tif (this._inZoomAnimation) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar newBounds = this._getExpandedVisibleBounds();\r\n\r\n\t\tthis._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, newBounds);\r\n\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), newBounds);\r\n\r\n\t\tthis._currentShownBounds = newBounds;\r\n\t\treturn;\r\n\t},\r\n\r\n\t_generateInitialClusters: function () {\r\n\t\tvar maxZoom = Math.ceil(this._map.getMaxZoom()),\r\n\t\t\tminZoom = Math.floor(this._map.getMinZoom()),\r\n\t\t\tradius = this.options.maxClusterRadius,\r\n\t\t\tradiusFn = radius;\r\n\r\n\t\t//If we just set maxClusterRadius to a single number, we need to create\r\n\t\t//a simple function to return that number. Otherwise, we just have to\r\n\t\t//use the function we've passed in.\r\n\t\tif (typeof radius !== \"function\") {\r\n\t\t\tradiusFn = function () { return radius; };\r\n\t\t}\r\n\r\n\t\tif (this.options.disableClusteringAtZoom !== null) {\r\n\t\t\tmaxZoom = this.options.disableClusteringAtZoom - 1;\r\n\t\t}\r\n\t\tthis._maxZoom = maxZoom;\r\n\t\tthis._gridClusters = {};\r\n\t\tthis._gridUnclustered = {};\r\n\r\n\t\t//Set up DistanceGrids for each zoom\r\n\t\tfor (var zoom = maxZoom; zoom >= minZoom; zoom--) {\r\n\t\t\tthis._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom));\r\n\t\t\tthis._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom));\r\n\t\t}\r\n\r\n\t\t// Instantiate the appropriate L.MarkerCluster class (animated or not).\r\n\t\tthis._topClusterLevel = new this._markerCluster(this, minZoom - 1);\r\n\t},\r\n\r\n\t//Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom)\r\n\t_addLayer: function (layer, zoom) {\r\n\t\tvar gridClusters = this._gridClusters,\r\n\t\t gridUnclustered = this._gridUnclustered,\r\n\t\t\tminZoom = Math.floor(this._map.getMinZoom()),\r\n\t\t markerPoint, z;\r\n\r\n\t\tif (this.options.singleMarkerMode) {\r\n\t\t\tthis._overrideMarkerIcon(layer);\r\n\t\t}\r\n\r\n\t\tlayer.on(this._childMarkerEventHandlers, this);\r\n\r\n\t\t//Find the lowest zoom level to slot this one in\r\n\t\tfor (; zoom >= minZoom; zoom--) {\r\n\t\t\tmarkerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position\r\n\r\n\t\t\t//Try find a cluster close by\r\n\t\t\tvar closest = gridClusters[zoom].getNearObject(markerPoint);\r\n\t\t\tif (closest) {\r\n\t\t\t\tclosest._addChild(layer);\r\n\t\t\t\tlayer.__parent = closest;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Try find a marker close by to form a new cluster with\r\n\t\t\tclosest = gridUnclustered[zoom].getNearObject(markerPoint);\r\n\t\t\tif (closest) {\r\n\t\t\t\tvar parent = closest.__parent;\r\n\t\t\t\tif (parent) {\r\n\t\t\t\t\tthis._removeLayer(closest, false);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Create new cluster with these 2 in it\r\n\r\n\t\t\t\tvar newCluster = new this._markerCluster(this, zoom, closest, layer);\r\n\t\t\t\tgridClusters[zoom].addObject(newCluster, this._map.project(newCluster._cLatLng, zoom));\r\n\t\t\t\tclosest.__parent = newCluster;\r\n\t\t\t\tlayer.__parent = newCluster;\r\n\r\n\t\t\t\t//First create any new intermediate parent clusters that don't exist\r\n\t\t\t\tvar lastParent = newCluster;\r\n\t\t\t\tfor (z = zoom - 1; z > parent._zoom; z--) {\r\n\t\t\t\t\tlastParent = new this._markerCluster(this, z, lastParent);\r\n\t\t\t\t\tgridClusters[z].addObject(lastParent, this._map.project(closest.getLatLng(), z));\r\n\t\t\t\t}\r\n\t\t\t\tparent._addChild(lastParent);\r\n\r\n\t\t\t\t//Remove closest from this zoom level and any above that it is in, replace with newCluster\r\n\t\t\t\tthis._removeFromGridUnclustered(closest, zoom);\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Didn't manage to cluster in at this zoom, record us as a marker here and continue upwards\r\n\t\t\tgridUnclustered[zoom].addObject(layer, markerPoint);\r\n\t\t}\r\n\r\n\t\t//Didn't get in anything, add us to the top\r\n\t\tthis._topClusterLevel._addChild(layer);\r\n\t\tlayer.__parent = this._topClusterLevel;\r\n\t\treturn;\r\n\t},\r\n\r\n\t/**\r\n\t * Refreshes the icon of all \"dirty\" visible clusters.\r\n\t * Non-visible \"dirty\" clusters will be updated when they are added to the map.\r\n\t * @private\r\n\t */\r\n\t_refreshClustersIcons: function () {\r\n\t\tthis._featureGroup.eachLayer(function (c) {\r\n\t\t\tif (c instanceof L.MarkerCluster && c._iconNeedsUpdate) {\r\n\t\t\t\tc._updateIcon();\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t//Enqueue code to fire after the marker expand/contract has happened\r\n\t_enqueue: function (fn) {\r\n\t\tthis._queue.push(fn);\r\n\t\tif (!this._queueTimeout) {\r\n\t\t\tthis._queueTimeout = setTimeout(L.bind(this._processQueue, this), 300);\r\n\t\t}\r\n\t},\r\n\t_processQueue: function () {\r\n\t\tfor (var i = 0; i < this._queue.length; i++) {\r\n\t\t\tthis._queue[i].call(this);\r\n\t\t}\r\n\t\tthis._queue.length = 0;\r\n\t\tclearTimeout(this._queueTimeout);\r\n\t\tthis._queueTimeout = null;\r\n\t},\r\n\r\n\t//Merge and split any existing clusters that are too big or small\r\n\t_mergeSplitClusters: function () {\r\n\t\tvar mapZoom = Math.round(this._map._zoom);\r\n\r\n\t\t//In case we are starting to split before the animation finished\r\n\t\tthis._processQueue();\r\n\r\n\t\tif (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split\r\n\t\t\tthis._animationStart();\r\n\t\t\t//Remove clusters now off screen\r\n\t\t\tthis._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, this._getExpandedVisibleBounds());\r\n\r\n\t\t\tthis._animationZoomIn(this._zoom, mapZoom);\r\n\r\n\t\t} else if (this._zoom > mapZoom) { //Zoom out, merge\r\n\t\t\tthis._animationStart();\r\n\r\n\t\t\tthis._animationZoomOut(this._zoom, mapZoom);\r\n\t\t} else {\r\n\t\t\tthis._moveEnd();\r\n\t\t}\r\n\t},\r\n\r\n\t//Gets the maps visible bounds expanded in each direction by the size of the screen (so the user cannot see an area we do not cover in one pan)\r\n\t_getExpandedVisibleBounds: function () {\r\n\t\tif (!this.options.removeOutsideVisibleBounds) {\r\n\t\t\treturn this._mapBoundsInfinite;\r\n\t\t} else if (L.Browser.mobile) {\r\n\t\t\treturn this._checkBoundsMaxLat(this._map.getBounds());\r\n\t\t}\r\n\r\n\t\treturn this._checkBoundsMaxLat(this._map.getBounds().pad(1)); // Padding expands the bounds by its own dimensions but scaled with the given factor.\r\n\t},\r\n\r\n\t/**\r\n\t * Expands the latitude to Infinity (or -Infinity) if the input bounds reach the map projection maximum defined latitude\r\n\t * (in the case of Web/Spherical Mercator, it is 85.0511287798 / see https://en.wikipedia.org/wiki/Web_Mercator#Formulas).\r\n\t * Otherwise, the removeOutsideVisibleBounds option will remove markers beyond that limit, whereas the same markers without\r\n\t * this option (or outside MCG) will have their position floored (ceiled) by the projection and rendered at that limit,\r\n\t * making the user think that MCG \"eats\" them and never displays them again.\r\n\t * @param bounds L.LatLngBounds\r\n\t * @returns {L.LatLngBounds}\r\n\t * @private\r\n\t */\r\n\t_checkBoundsMaxLat: function (bounds) {\r\n\t\tvar maxLat = this._maxLat;\r\n\r\n\t\tif (maxLat !== undefined) {\r\n\t\t\tif (bounds.getNorth() >= maxLat) {\r\n\t\t\t\tbounds._northEast.lat = Infinity;\r\n\t\t\t}\r\n\t\t\tif (bounds.getSouth() <= -maxLat) {\r\n\t\t\t\tbounds._southWest.lat = -Infinity;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn bounds;\r\n\t},\r\n\r\n\t//Shared animation code\r\n\t_animationAddLayerNonAnimated: function (layer, newCluster) {\r\n\t\tif (newCluster === layer) {\r\n\t\t\tthis._featureGroup.addLayer(layer);\r\n\t\t} else if (newCluster._childCount === 2) {\r\n\t\t\tnewCluster._addToMap();\r\n\r\n\t\t\tvar markers = newCluster.getAllChildMarkers();\r\n\t\t\tthis._featureGroup.removeLayer(markers[0]);\r\n\t\t\tthis._featureGroup.removeLayer(markers[1]);\r\n\t\t} else {\r\n\t\t\tnewCluster._updateIcon();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Extracts individual (i.e. non-group) layers from a Layer Group.\r\n\t * @param group to extract layers from.\r\n\t * @param output {Array} in which to store the extracted layers.\r\n\t * @returns {*|Array}\r\n\t * @private\r\n\t */\r\n\t_extractNonGroupLayers: function (group, output) {\r\n\t\tvar layers = group.getLayers(),\r\n\t\t i = 0,\r\n\t\t layer;\r\n\r\n\t\toutput = output || [];\r\n\r\n\t\tfor (; i < layers.length; i++) {\r\n\t\t\tlayer = layers[i];\r\n\r\n\t\t\tif (layer instanceof L.LayerGroup) {\r\n\t\t\t\tthis._extractNonGroupLayers(layer, output);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\toutput.push(layer);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t},\r\n\r\n\t/**\r\n\t * Implements the singleMarkerMode option.\r\n\t * @param layer Marker to re-style using the Clusters iconCreateFunction.\r\n\t * @returns {L.Icon} The newly created icon.\r\n\t * @private\r\n\t */\r\n\t_overrideMarkerIcon: function (layer) {\r\n\t\tvar icon = layer.options.icon = this.options.iconCreateFunction({\r\n\t\t\tgetChildCount: function () {\r\n\t\t\t\treturn 1;\r\n\t\t\t},\r\n\t\t\tgetAllChildMarkers: function () {\r\n\t\t\t\treturn [layer];\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn icon;\r\n\t}\r\n});\r\n\r\n// Constant bounds used in case option \"removeOutsideVisibleBounds\" is set to false.\r\nL.MarkerClusterGroup.include({\r\n\t_mapBoundsInfinite: new L.LatLngBounds(new L.LatLng(-Infinity, -Infinity), new L.LatLng(Infinity, Infinity))\r\n});\r\n\r\nL.MarkerClusterGroup.include({\r\n\t_noAnimation: {\r\n\t\t//Non Animated versions of everything\r\n\t\t_animationStart: function () {\r\n\t\t\t//Do nothing...\r\n\t\t},\r\n\t\t_animationZoomIn: function (previousZoomLevel, newZoomLevel) {\r\n\t\t\tthis._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel);\r\n\t\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());\r\n\r\n\t\t\t//We didn't actually animate, but we use this event to mean \"clustering animations have finished\"\r\n\t\t\tthis.fire('animationend');\r\n\t\t},\r\n\t\t_animationZoomOut: function (previousZoomLevel, newZoomLevel) {\r\n\t\t\tthis._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel);\r\n\t\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());\r\n\r\n\t\t\t//We didn't actually animate, but we use this event to mean \"clustering animations have finished\"\r\n\t\t\tthis.fire('animationend');\r\n\t\t},\r\n\t\t_animationAddLayer: function (layer, newCluster) {\r\n\t\t\tthis._animationAddLayerNonAnimated(layer, newCluster);\r\n\t\t}\r\n\t},\r\n\r\n\t_withAnimation: {\r\n\t\t//Animated versions here\r\n\t\t_animationStart: function () {\r\n\t\t\tthis._map._mapPane.className += ' leaflet-cluster-anim';\r\n\t\t\tthis._inZoomAnimation++;\r\n\t\t},\r\n\r\n\t\t_animationZoomIn: function (previousZoomLevel, newZoomLevel) {\r\n\t\t\tvar bounds = this._getExpandedVisibleBounds(),\r\n\t\t\t fg = this._featureGroup,\r\n\t\t\t\tminZoom = Math.floor(this._map.getMinZoom()),\r\n\t\t\t i;\r\n\r\n\t\t\tthis._ignoreMove = true;\r\n\r\n\t\t\t//Add all children of current clusters to map and remove those clusters from map\r\n\t\t\tthis._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) {\r\n\t\t\t\tvar startPos = c._latlng,\r\n\t\t\t\t markers = c._markers,\r\n\t\t\t\t m;\r\n\r\n\t\t\t\tif (!bounds.contains(startPos)) {\r\n\t\t\t\t\tstartPos = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { //Immediately add the new child and remove us\r\n\t\t\t\t\tfg.removeLayer(c);\r\n\t\t\t\t\tc._recursivelyAddChildrenToMap(null, newZoomLevel, bounds);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Fade out old cluster\r\n\t\t\t\t\tc.clusterHide();\r\n\t\t\t\t\tc._recursivelyAddChildrenToMap(startPos, newZoomLevel, bounds);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Remove all markers that aren't visible any more\r\n\t\t\t\t//TODO: Do we actually need to do this on the higher levels too?\r\n\t\t\t\tfor (i = markers.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tm = markers[i];\r\n\t\t\t\t\tif (!bounds.contains(m._latlng)) {\r\n\t\t\t\t\t\tfg.removeLayer(m);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t\tthis._forceLayout();\r\n\r\n\t\t\t//Update opacities\r\n\t\t\tthis._topClusterLevel._recursivelyBecomeVisible(bounds, newZoomLevel);\r\n\t\t\t//TODO Maybe? Update markers in _recursivelyBecomeVisible\r\n\t\t\tfg.eachLayer(function (n) {\r\n\t\t\t\tif (!(n instanceof L.MarkerCluster) && n._icon) {\r\n\t\t\t\t\tn.clusterShow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t//update the positions of the just added clusters/markers\r\n\t\t\tthis._topClusterLevel._recursively(bounds, previousZoomLevel, newZoomLevel, function (c) {\r\n\t\t\t\tc._recursivelyRestoreChildPositions(newZoomLevel);\r\n\t\t\t});\r\n\r\n\t\t\tthis._ignoreMove = false;\r\n\r\n\t\t\t//Remove the old clusters and close the zoom animation\r\n\t\t\tthis._enqueue(function () {\r\n\t\t\t\t//update the positions of the just added clusters/markers\r\n\t\t\t\tthis._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) {\r\n\t\t\t\t\tfg.removeLayer(c);\r\n\t\t\t\t\tc.clusterShow();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis._animationEnd();\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t_animationZoomOut: function (previousZoomLevel, newZoomLevel) {\r\n\t\t\tthis._animationZoomOutSingle(this._topClusterLevel, previousZoomLevel - 1, newZoomLevel);\r\n\r\n\t\t\t//Need to add markers for those that weren't on the map before but are now\r\n\t\t\tthis._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());\r\n\t\t\t//Remove markers that were on the map before but won't be now\r\n\t\t\tthis._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel, this._getExpandedVisibleBounds());\r\n\t\t},\r\n\r\n\t\t_animationAddLayer: function (layer, newCluster) {\r\n\t\t\tvar me = this,\r\n\t\t\t fg = this._featureGroup;\r\n\r\n\t\t\tfg.addLayer(layer);\r\n\t\t\tif (newCluster !== layer) {\r\n\t\t\t\tif (newCluster._childCount > 2) { //Was already a cluster\r\n\r\n\t\t\t\t\tnewCluster._updateIcon();\r\n\t\t\t\t\tthis._forceLayout();\r\n\t\t\t\t\tthis._animationStart();\r\n\r\n\t\t\t\t\tlayer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng()));\r\n\t\t\t\t\tlayer.clusterHide();\r\n\r\n\t\t\t\t\tthis._enqueue(function () {\r\n\t\t\t\t\t\tfg.removeLayer(layer);\r\n\t\t\t\t\t\tlayer.clusterShow();\r\n\r\n\t\t\t\t\t\tme._animationEnd();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t} else { //Just became a cluster\r\n\t\t\t\t\tthis._forceLayout();\r\n\r\n\t\t\t\t\tme._animationStart();\r\n\t\t\t\t\tme._animationZoomOutSingle(newCluster, this._map.getMaxZoom(), this._zoom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Private methods for animated versions.\r\n\t_animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) {\r\n\t\tvar bounds = this._getExpandedVisibleBounds(),\r\n\t\t\tminZoom = Math.floor(this._map.getMinZoom());\r\n\r\n\t\t//Animate all of the markers in the clusters to move to their cluster center point\r\n\t\tcluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, minZoom, previousZoomLevel + 1, newZoomLevel);\r\n\r\n\t\tvar me = this;\r\n\r\n\t\t//Update the opacity (If we immediately set it they won't animate)\r\n\t\tthis._forceLayout();\r\n\t\tcluster._recursivelyBecomeVisible(bounds, newZoomLevel);\r\n\r\n\t\t//TODO: Maybe use the transition timing stuff to make this more reliable\r\n\t\t//When the animations are done, tidy up\r\n\t\tthis._enqueue(function () {\r\n\r\n\t\t\t//This cluster stopped being a cluster before the timeout fired\r\n\t\t\tif (cluster._childCount === 1) {\r\n\t\t\t\tvar m = cluster._markers[0];\r\n\t\t\t\t//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it\r\n\t\t\t\tthis._ignoreMove = true;\r\n\t\t\t\tm.setLatLng(m.getLatLng());\r\n\t\t\t\tthis._ignoreMove = false;\r\n\t\t\t\tif (m.clusterShow) {\r\n\t\t\t\t\tm.clusterShow();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcluster._recursively(bounds, newZoomLevel, minZoom, function (c) {\r\n\t\t\t\t\tc._recursivelyRemoveChildrenFromMap(bounds, minZoom, previousZoomLevel + 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tme._animationEnd();\r\n\t\t});\r\n\t},\r\n\r\n\t_animationEnd: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', '');\r\n\t\t}\r\n\t\tthis._inZoomAnimation--;\r\n\t\tthis.fire('animationend');\r\n\t},\r\n\r\n\t//Force a browser layout of stuff in the map\r\n\t// Should apply the current opacity and location to all elements so we can update them again for an animation\r\n\t_forceLayout: function () {\r\n\t\t//In my testing this works, infact offsetWidth of any element seems to work.\r\n\t\t//Could loop all this._layers and do this for each _icon if it stops working\r\n\r\n\t\tL.Util.falseFn(document.body.offsetWidth);\r\n\t}\r\n});\r\n\r\nL.markerClusterGroup = function (options) {\r\n\treturn new L.MarkerClusterGroup(options);\r\n};\r\n","export var MarkerCluster = L.MarkerCluster = L.Marker.extend({\r\n\toptions: L.Icon.prototype.options,\r\n\r\n\tinitialize: function (group, zoom, a, b) {\r\n\r\n\t\tL.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0),\r\n { icon: this, pane: group.options.clusterPane });\r\n\r\n\t\tthis._group = group;\r\n\t\tthis._zoom = zoom;\r\n\r\n\t\tthis._markers = [];\r\n\t\tthis._childClusters = [];\r\n\t\tthis._childCount = 0;\r\n\t\tthis._iconNeedsUpdate = true;\r\n\t\tthis._boundsNeedUpdate = true;\r\n\r\n\t\tthis._bounds = new L.LatLngBounds();\r\n\r\n\t\tif (a) {\r\n\t\t\tthis._addChild(a);\r\n\t\t}\r\n\t\tif (b) {\r\n\t\t\tthis._addChild(b);\r\n\t\t}\r\n\t},\r\n\r\n\t//Recursively retrieve all child markers of this cluster\r\n\tgetAllChildMarkers: function (storageArray, ignoreDraggedMarker) {\r\n\t\tstorageArray = storageArray || [];\r\n\r\n\t\tfor (var i = this._childClusters.length - 1; i >= 0; i--) {\r\n\t\t\tthis._childClusters[i].getAllChildMarkers(storageArray);\r\n\t\t}\r\n\r\n\t\tfor (var j = this._markers.length - 1; j >= 0; j--) {\r\n\t\t\tif (ignoreDraggedMarker && this._markers[j].__dragStart) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tstorageArray.push(this._markers[j]);\r\n\t\t}\r\n\r\n\t\treturn storageArray;\r\n\t},\r\n\r\n\t//Returns the count of how many child markers we have\r\n\tgetChildCount: function () {\r\n\t\treturn this._childCount;\r\n\t},\r\n\r\n\t//Zoom to the minimum of showing all of the child markers, or the extents of this cluster\r\n\tzoomToBounds: function (fitBoundsOptions) {\r\n\t\tvar childClusters = this._childClusters.slice(),\r\n\t\t\tmap = this._group._map,\r\n\t\t\tboundsZoom = map.getBoundsZoom(this._bounds),\r\n\t\t\tzoom = this._zoom + 1,\r\n\t\t\tmapZoom = map.getZoom(),\r\n\t\t\ti;\r\n\r\n\t\t//calculate how far we need to zoom down to see all of the markers\r\n\t\twhile (childClusters.length > 0 && boundsZoom > zoom) {\r\n\t\t\tzoom++;\r\n\t\t\tvar newClusters = [];\r\n\t\t\tfor (i = 0; i < childClusters.length; i++) {\r\n\t\t\t\tnewClusters = newClusters.concat(childClusters[i]._childClusters);\r\n\t\t\t}\r\n\t\t\tchildClusters = newClusters;\r\n\t\t}\r\n\r\n\t\tif (boundsZoom > zoom) {\r\n\t\t\tthis._group._map.setView(this._latlng, zoom);\r\n\t\t} else if (boundsZoom <= mapZoom) { //If fitBounds wouldn't zoom us down, zoom us down instead\r\n\t\t\tthis._group._map.setView(this._latlng, mapZoom + 1);\r\n\t\t} else {\r\n\t\t\tthis._group._map.fitBounds(this._bounds, fitBoundsOptions);\r\n\t\t}\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new L.LatLngBounds();\r\n\t\tbounds.extend(this._bounds);\r\n\t\treturn bounds;\r\n\t},\r\n\r\n\t_updateIcon: function () {\r\n\t\tthis._iconNeedsUpdate = true;\r\n\t\tif (this._icon) {\r\n\t\t\tthis.setIcon(this);\r\n\t\t}\r\n\t},\r\n\r\n\t//Cludge for Icon, we pretend to be an icon for performance\r\n\tcreateIcon: function () {\r\n\t\tif (this._iconNeedsUpdate) {\r\n\t\t\tthis._iconObj = this._group.options.iconCreateFunction(this);\r\n\t\t\tthis._iconNeedsUpdate = false;\r\n\t\t}\r\n\t\treturn this._iconObj.createIcon();\r\n\t},\r\n\tcreateShadow: function () {\r\n\t\treturn this._iconObj.createShadow();\r\n\t},\r\n\r\n\r\n\t_addChild: function (new1, isNotificationFromChild) {\r\n\r\n\t\tthis._iconNeedsUpdate = true;\r\n\r\n\t\tthis._boundsNeedUpdate = true;\r\n\t\tthis._setClusterCenter(new1);\r\n\r\n\t\tif (new1 instanceof L.MarkerCluster) {\r\n\t\t\tif (!isNotificationFromChild) {\r\n\t\t\t\tthis._childClusters.push(new1);\r\n\t\t\t\tnew1.__parent = this;\r\n\t\t\t}\r\n\t\t\tthis._childCount += new1._childCount;\r\n\t\t} else {\r\n\t\t\tif (!isNotificationFromChild) {\r\n\t\t\t\tthis._markers.push(new1);\r\n\t\t\t}\r\n\t\t\tthis._childCount++;\r\n\t\t}\r\n\r\n\t\tif (this.__parent) {\r\n\t\t\tthis.__parent._addChild(new1, true);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Makes sure the cluster center is set. If not, uses the child center if it is a cluster, or the marker position.\r\n\t * @param child L.MarkerCluster|L.Marker that will be used as cluster center if not defined yet.\r\n\t * @private\r\n\t */\r\n\t_setClusterCenter: function (child) {\r\n\t\tif (!this._cLatLng) {\r\n\t\t\t// when clustering, take position of the first point as the cluster center\r\n\t\t\tthis._cLatLng = child._cLatLng || child._latlng;\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Assigns impossible bounding values so that the next extend entirely determines the new bounds.\r\n\t * This method avoids having to trash the previous L.LatLngBounds object and to create a new one, which is much slower for this class.\r\n\t * As long as the bounds are not extended, most other methods would probably fail, as they would with bounds initialized but not extended.\r\n\t * @private\r\n\t */\r\n\t_resetBounds: function () {\r\n\t\tvar bounds = this._bounds;\r\n\r\n\t\tif (bounds._southWest) {\r\n\t\t\tbounds._southWest.lat = Infinity;\r\n\t\t\tbounds._southWest.lng = Infinity;\r\n\t\t}\r\n\t\tif (bounds._northEast) {\r\n\t\t\tbounds._northEast.lat = -Infinity;\r\n\t\t\tbounds._northEast.lng = -Infinity;\r\n\t\t}\r\n\t},\r\n\r\n\t_recalculateBounds: function () {\r\n\t\tvar markers = this._markers,\r\n\t\t childClusters = this._childClusters,\r\n\t\t latSum = 0,\r\n\t\t lngSum = 0,\r\n\t\t totalCount = this._childCount,\r\n\t\t i, child, childLatLng, childCount;\r\n\r\n\t\t// Case where all markers are removed from the map and we are left with just an empty _topClusterLevel.\r\n\t\tif (totalCount === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Reset rather than creating a new object, for performance.\r\n\t\tthis._resetBounds();\r\n\r\n\t\t// Child markers.\r\n\t\tfor (i = 0; i < markers.length; i++) {\r\n\t\t\tchildLatLng = markers[i]._latlng;\r\n\r\n\t\t\tthis._bounds.extend(childLatLng);\r\n\r\n\t\t\tlatSum += childLatLng.lat;\r\n\t\t\tlngSum += childLatLng.lng;\r\n\t\t}\r\n\r\n\t\t// Child clusters.\r\n\t\tfor (i = 0; i < childClusters.length; i++) {\r\n\t\t\tchild = childClusters[i];\r\n\r\n\t\t\t// Re-compute child bounds and weighted position first if necessary.\r\n\t\t\tif (child._boundsNeedUpdate) {\r\n\t\t\t\tchild._recalculateBounds();\r\n\t\t\t}\r\n\r\n\t\t\tthis._bounds.extend(child._bounds);\r\n\r\n\t\t\tchildLatLng = child._wLatLng;\r\n\t\t\tchildCount = child._childCount;\r\n\r\n\t\t\tlatSum += childLatLng.lat * childCount;\r\n\t\t\tlngSum += childLatLng.lng * childCount;\r\n\t\t}\r\n\r\n\t\tthis._latlng = this._wLatLng = new L.LatLng(latSum / totalCount, lngSum / totalCount);\r\n\r\n\t\t// Reset dirty flag.\r\n\t\tthis._boundsNeedUpdate = false;\r\n\t},\r\n\r\n\t//Set our markers position as given and add it to the map\r\n\t_addToMap: function (startPos) {\r\n\t\tif (startPos) {\r\n\t\t\tthis._backupLatlng = this._latlng;\r\n\t\t\tthis.setLatLng(startPos);\r\n\t\t}\r\n\t\tthis._group._featureGroup.addLayer(this);\r\n\t},\r\n\r\n\t_recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) {\r\n\t\tthis._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1,\r\n\t\t\tfunction (c) {\r\n\t\t\t\tvar markers = c._markers,\r\n\t\t\t\t\ti, m;\r\n\t\t\t\tfor (i = markers.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tm = markers[i];\r\n\r\n\t\t\t\t\t//Only do it if the icon is still on the map\r\n\t\t\t\t\tif (m._icon) {\r\n\t\t\t\t\t\tm._setPos(center);\r\n\t\t\t\t\t\tm.clusterHide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tfunction (c) {\r\n\t\t\t\tvar childClusters = c._childClusters,\r\n\t\t\t\t\tj, cm;\r\n\t\t\t\tfor (j = childClusters.length - 1; j >= 0; j--) {\r\n\t\t\t\t\tcm = childClusters[j];\r\n\t\t\t\t\tif (cm._icon) {\r\n\t\t\t\t\t\tcm._setPos(center);\r\n\t\t\t\t\t\tcm.clusterHide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\r\n\t_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, mapMinZoom, previousZoomLevel, newZoomLevel) {\r\n\t\tthis._recursively(bounds, newZoomLevel, mapMinZoom,\r\n\t\t\tfunction (c) {\r\n\t\t\t\tc._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel);\r\n\r\n\t\t\t\t//TODO: depthToAnimateIn affects _isSingleParent, if there is a multizoom we may/may not be.\r\n\t\t\t\t//As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate\r\n\t\t\t\tif (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) {\r\n\t\t\t\t\tc.clusterShow();\r\n\t\t\t\t\tc._recursivelyRemoveChildrenFromMap(bounds, mapMinZoom, previousZoomLevel); //Immediately remove our children as we are replacing them. TODO previousBounds not bounds\r\n\t\t\t\t} else {\r\n\t\t\t\t\tc.clusterHide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tc._addToMap();\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\r\n\t_recursivelyBecomeVisible: function (bounds, zoomLevel) {\r\n\t\tthis._recursively(bounds, this._group._map.getMinZoom(), zoomLevel, null, function (c) {\r\n\t\t\tc.clusterShow();\r\n\t\t});\r\n\t},\r\n\r\n\t_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) {\r\n\t\tthis._recursively(bounds, this._group._map.getMinZoom() - 1, zoomLevel,\r\n\t\t\tfunction (c) {\r\n\t\t\t\tif (zoomLevel === c._zoom) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Add our child markers at startPos (so they can be animated out)\r\n\t\t\t\tfor (var i = c._markers.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tvar nm = c._markers[i];\r\n\r\n\t\t\t\t\tif (!bounds.contains(nm._latlng)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (startPos) {\r\n\t\t\t\t\t\tnm._backupLatlng = nm.getLatLng();\r\n\r\n\t\t\t\t\t\tnm.setLatLng(startPos);\r\n\t\t\t\t\t\tif (nm.clusterHide) {\r\n\t\t\t\t\t\t\tnm.clusterHide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tc._group._featureGroup.addLayer(nm);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tfunction (c) {\r\n\t\t\t\tc._addToMap(startPos);\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\r\n\t_recursivelyRestoreChildPositions: function (zoomLevel) {\r\n\t\t//Fix positions of child markers\r\n\t\tfor (var i = this._markers.length - 1; i >= 0; i--) {\r\n\t\t\tvar nm = this._markers[i];\r\n\t\t\tif (nm._backupLatlng) {\r\n\t\t\t\tnm.setLatLng(nm._backupLatlng);\r\n\t\t\t\tdelete nm._backupLatlng;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (zoomLevel - 1 === this._zoom) {\r\n\t\t\t//Reposition child clusters\r\n\t\t\tfor (var j = this._childClusters.length - 1; j >= 0; j--) {\r\n\t\t\t\tthis._childClusters[j]._restorePosition();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var k = this._childClusters.length - 1; k >= 0; k--) {\r\n\t\t\t\tthis._childClusters[k]._recursivelyRestoreChildPositions(zoomLevel);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_restorePosition: function () {\r\n\t\tif (this._backupLatlng) {\r\n\t\t\tthis.setLatLng(this._backupLatlng);\r\n\t\t\tdelete this._backupLatlng;\r\n\t\t}\r\n\t},\r\n\r\n\t//exceptBounds: If set, don't remove any markers/clusters in it\r\n\t_recursivelyRemoveChildrenFromMap: function (previousBounds, mapMinZoom, zoomLevel, exceptBounds) {\r\n\t\tvar m, i;\r\n\t\tthis._recursively(previousBounds, mapMinZoom - 1, zoomLevel - 1,\r\n\t\t\tfunction (c) {\r\n\t\t\t\t//Remove markers at every level\r\n\t\t\t\tfor (i = c._markers.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tm = c._markers[i];\r\n\t\t\t\t\tif (!exceptBounds || !exceptBounds.contains(m._latlng)) {\r\n\t\t\t\t\t\tc._group._featureGroup.removeLayer(m);\r\n\t\t\t\t\t\tif (m.clusterShow) {\r\n\t\t\t\t\t\t\tm.clusterShow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tfunction (c) {\r\n\t\t\t\t//Remove child clusters at just the bottom level\r\n\t\t\t\tfor (i = c._childClusters.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tm = c._childClusters[i];\r\n\t\t\t\t\tif (!exceptBounds || !exceptBounds.contains(m._latlng)) {\r\n\t\t\t\t\t\tc._group._featureGroup.removeLayer(m);\r\n\t\t\t\t\t\tif (m.clusterShow) {\r\n\t\t\t\t\t\t\tm.clusterShow();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\r\n\t//Run the given functions recursively to this and child clusters\r\n\t// boundsToApplyTo: a L.LatLngBounds representing the bounds of what clusters to recurse in to\r\n\t// zoomLevelToStart: zoom level to start running functions (inclusive)\r\n\t// zoomLevelToStop: zoom level to stop running functions (inclusive)\r\n\t// runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level\r\n\t// runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level\r\n\t_recursively: function (boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) {\r\n\t\tvar childClusters = this._childClusters,\r\n\t\t zoom = this._zoom,\r\n\t\t i, c;\r\n\r\n\t\tif (zoomLevelToStart <= zoom) {\r\n\t\t\tif (runAtEveryLevel) {\r\n\t\t\t\trunAtEveryLevel(this);\r\n\t\t\t}\r\n\t\t\tif (runAtBottomLevel && zoom === zoomLevelToStop) {\r\n\t\t\t\trunAtBottomLevel(this);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (zoom < zoomLevelToStart || zoom < zoomLevelToStop) {\r\n\t\t\tfor (i = childClusters.length - 1; i >= 0; i--) {\r\n\t\t\t\tc = childClusters[i];\r\n\t\t\t\tif (c._boundsNeedUpdate) {\r\n\t\t\t\t\tc._recalculateBounds();\r\n\t\t\t\t}\r\n\t\t\t\tif (boundsToApplyTo.intersects(c._bounds)) {\r\n\t\t\t\t\tc._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t//Returns true if we are the parent of only one cluster and that cluster is the same as us\r\n\t_isSingleParent: function () {\r\n\t\t//Don't need to check this._markers as the rest won't work if there are any\r\n\t\treturn this._childClusters.length > 0 && this._childClusters[0]._childCount === this._childCount;\r\n\t}\r\n});\r\n\r\n","/*\r\n* Extends L.Marker to include two extra methods: clusterHide and clusterShow.\r\n* \r\n* They work as setOpacity(0) and setOpacity(1) respectively, but\r\n* don't overwrite the options.opacity\r\n* \r\n*/\r\n\r\nL.Marker.include({\r\n\tclusterHide: function () {\r\n\t\tvar backup = this.options.opacity;\r\n\t\tthis.setOpacity(0);\r\n\t\tthis.options.opacity = backup;\r\n\t\treturn this;\r\n\t},\r\n\t\r\n\tclusterShow: function () {\r\n\t\treturn this.setOpacity(this.options.opacity);\r\n\t}\r\n});\r\n\r\n\r\n","\r\nL.DistanceGrid = function (cellSize) {\r\n\tthis._cellSize = cellSize;\r\n\tthis._sqCellSize = cellSize * cellSize;\r\n\tthis._grid = {};\r\n\tthis._objectPoint = { };\r\n};\r\n\r\nL.DistanceGrid.prototype = {\r\n\r\n\taddObject: function (obj, point) {\r\n\t\tvar x = this._getCoord(point.x),\r\n\t\t y = this._getCoord(point.y),\r\n\t\t grid = this._grid,\r\n\t\t row = grid[y] = grid[y] || {},\r\n\t\t cell = row[x] = row[x] || [],\r\n\t\t stamp = L.Util.stamp(obj);\r\n\r\n\t\tthis._objectPoint[stamp] = point;\r\n\r\n\t\tcell.push(obj);\r\n\t},\r\n\r\n\tupdateObject: function (obj, point) {\r\n\t\tthis.removeObject(obj);\r\n\t\tthis.addObject(obj, point);\r\n\t},\r\n\r\n\t//Returns true if the object was found\r\n\tremoveObject: function (obj, point) {\r\n\t\tvar x = this._getCoord(point.x),\r\n\t\t y = this._getCoord(point.y),\r\n\t\t grid = this._grid,\r\n\t\t row = grid[y] = grid[y] || {},\r\n\t\t cell = row[x] = row[x] || [],\r\n\t\t i, len;\r\n\r\n\t\tdelete this._objectPoint[L.Util.stamp(obj)];\r\n\r\n\t\tfor (i = 0, len = cell.length; i < len; i++) {\r\n\t\t\tif (cell[i] === obj) {\r\n\r\n\t\t\t\tcell.splice(i, 1);\r\n\r\n\t\t\t\tif (len === 1) {\r\n\t\t\t\t\tdelete row[x];\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t},\r\n\r\n\teachObject: function (fn, context) {\r\n\t\tvar i, j, k, len, row, cell, removed,\r\n\t\t grid = this._grid;\r\n\r\n\t\tfor (i in grid) {\r\n\t\t\trow = grid[i];\r\n\r\n\t\t\tfor (j in row) {\r\n\t\t\t\tcell = row[j];\r\n\r\n\t\t\t\tfor (k = 0, len = cell.length; k < len; k++) {\r\n\t\t\t\t\tremoved = fn.call(context, cell[k]);\r\n\t\t\t\t\tif (removed) {\r\n\t\t\t\t\t\tk--;\r\n\t\t\t\t\t\tlen--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetNearObject: function (point) {\r\n\t\tvar x = this._getCoord(point.x),\r\n\t\t y = this._getCoord(point.y),\r\n\t\t i, j, k, row, cell, len, obj, dist,\r\n\t\t objectPoint = this._objectPoint,\r\n\t\t closestDistSq = this._sqCellSize,\r\n\t\t closest = null;\r\n\r\n\t\tfor (i = y - 1; i <= y + 1; i++) {\r\n\t\t\trow = this._grid[i];\r\n\t\t\tif (row) {\r\n\r\n\t\t\t\tfor (j = x - 1; j <= x + 1; j++) {\r\n\t\t\t\t\tcell = row[j];\r\n\t\t\t\t\tif (cell) {\r\n\r\n\t\t\t\t\t\tfor (k = 0, len = cell.length; k < len; k++) {\r\n\t\t\t\t\t\t\tobj = cell[k];\r\n\t\t\t\t\t\t\tdist = this._sqDist(objectPoint[L.Util.stamp(obj)], point);\r\n\t\t\t\t\t\t\tif (dist < closestDistSq ||\r\n\t\t\t\t\t\t\t\tdist <= closestDistSq && closest === null) {\r\n\t\t\t\t\t\t\t\tclosestDistSq = dist;\r\n\t\t\t\t\t\t\t\tclosest = obj;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\t},\r\n\r\n\t_getCoord: function (x) {\r\n\t\tvar coord = Math.floor(x / this._cellSize);\r\n\t\treturn isFinite(coord) ? coord : x;\r\n\t},\r\n\r\n\t_sqDist: function (p, p2) {\r\n\t\tvar dx = p2.x - p.x,\r\n\t\t dy = p2.y - p.y;\r\n\t\treturn dx * dx + dy * dy;\r\n\t}\r\n};\r\n","/* Copyright (c) 2012 the authors listed at the following URL, and/or\r\nthe authors of referenced articles or incorporated external code:\r\nhttp://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRetrieved from: http://en.literateprograms.org/Quickhull_(Javascript)?oldid=18434\r\n*/\r\n\r\n(function () {\r\n\tL.QuickHull = {\r\n\r\n\t\t/*\r\n\t\t * @param {Object} cpt a point to be measured from the baseline\r\n\t\t * @param {Array} bl the baseline, as represented by a two-element\r\n\t\t * array of latlng objects.\r\n\t\t * @returns {Number} an approximate distance measure\r\n\t\t */\r\n\t\tgetDistant: function (cpt, bl) {\r\n\t\t\tvar vY = bl[1].lat - bl[0].lat,\r\n\t\t\t\tvX = bl[0].lng - bl[1].lng;\r\n\t\t\treturn (vX * (cpt.lat - bl[0].lat) + vY * (cpt.lng - bl[0].lng));\r\n\t\t},\r\n\r\n\t\t/*\r\n\t\t * @param {Array} baseLine a two-element array of latlng objects\r\n\t\t * representing the baseline to project from\r\n\t\t * @param {Array} latLngs an array of latlng objects\r\n\t\t * @returns {Object} the maximum point and all new points to stay\r\n\t\t * in consideration for the hull.\r\n\t\t */\r\n\t\tfindMostDistantPointFromBaseLine: function (baseLine, latLngs) {\r\n\t\t\tvar maxD = 0,\r\n\t\t\t\tmaxPt = null,\r\n\t\t\t\tnewPoints = [],\r\n\t\t\t\ti, pt, d;\r\n\r\n\t\t\tfor (i = latLngs.length - 1; i >= 0; i--) {\r\n\t\t\t\tpt = latLngs[i];\r\n\t\t\t\td = this.getDistant(pt, baseLine);\r\n\r\n\t\t\t\tif (d > 0) {\r\n\t\t\t\t\tnewPoints.push(pt);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (d > maxD) {\r\n\t\t\t\t\tmaxD = d;\r\n\t\t\t\t\tmaxPt = pt;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn { maxPoint: maxPt, newPoints: newPoints };\r\n\t\t},\r\n\r\n\r\n\t\t/*\r\n\t\t * Given a baseline, compute the convex hull of latLngs as an array\r\n\t\t * of latLngs.\r\n\t\t *\r\n\t\t * @param {Array} latLngs\r\n\t\t * @returns {Array}\r\n\t\t */\r\n\t\tbuildConvexHull: function (baseLine, latLngs) {\r\n\t\t\tvar convexHullBaseLines = [],\r\n\t\t\t\tt = this.findMostDistantPointFromBaseLine(baseLine, latLngs);\r\n\r\n\t\t\tif (t.maxPoint) { // if there is still a point \"outside\" the base line\r\n\t\t\t\tconvexHullBaseLines =\r\n\t\t\t\t\tconvexHullBaseLines.concat(\r\n\t\t\t\t\t\tthis.buildConvexHull([baseLine[0], t.maxPoint], t.newPoints)\r\n\t\t\t\t\t);\r\n\t\t\t\tconvexHullBaseLines =\r\n\t\t\t\t\tconvexHullBaseLines.concat(\r\n\t\t\t\t\t\tthis.buildConvexHull([t.maxPoint, baseLine[1]], t.newPoints)\r\n\t\t\t\t\t);\r\n\t\t\t\treturn convexHullBaseLines;\r\n\t\t\t} else { // if there is no more point \"outside\" the base line, the current base line is part of the convex hull\r\n\t\t\t\treturn [baseLine[0]];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t/*\r\n\t\t * Given an array of latlngs, compute a convex hull as an array\r\n\t\t * of latlngs\r\n\t\t *\r\n\t\t * @param {Array} latLngs\r\n\t\t * @returns {Array}\r\n\t\t */\r\n\t\tgetConvexHull: function (latLngs) {\r\n\t\t\t// find first baseline\r\n\t\t\tvar maxLat = false, minLat = false,\r\n\t\t\t\tmaxLng = false, minLng = false,\r\n\t\t\t\tmaxLatPt = null, minLatPt = null,\r\n\t\t\t\tmaxLngPt = null, minLngPt = null,\r\n\t\t\t\tmaxPt = null, minPt = null,\r\n\t\t\t\ti;\r\n\r\n\t\t\tfor (i = latLngs.length - 1; i >= 0; i--) {\r\n\t\t\t\tvar pt = latLngs[i];\r\n\t\t\t\tif (maxLat === false || pt.lat > maxLat) {\r\n\t\t\t\t\tmaxLatPt = pt;\r\n\t\t\t\t\tmaxLat = pt.lat;\r\n\t\t\t\t}\r\n\t\t\t\tif (minLat === false || pt.lat < minLat) {\r\n\t\t\t\t\tminLatPt = pt;\r\n\t\t\t\t\tminLat = pt.lat;\r\n\t\t\t\t}\r\n\t\t\t\tif (maxLng === false || pt.lng > maxLng) {\r\n\t\t\t\t\tmaxLngPt = pt;\r\n\t\t\t\t\tmaxLng = pt.lng;\r\n\t\t\t\t}\r\n\t\t\t\tif (minLng === false || pt.lng < minLng) {\r\n\t\t\t\t\tminLngPt = pt;\r\n\t\t\t\t\tminLng = pt.lng;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (minLat !== maxLat) {\r\n\t\t\t\tminPt = minLatPt;\r\n\t\t\t\tmaxPt = maxLatPt;\r\n\t\t\t} else {\r\n\t\t\t\tminPt = minLngPt;\r\n\t\t\t\tmaxPt = maxLngPt;\r\n\t\t\t}\r\n\r\n\t\t\tvar ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs),\r\n\t\t\t\t\t\t\t\tthis.buildConvexHull([maxPt, minPt], latLngs));\r\n\t\t\treturn ch;\r\n\t\t}\r\n\t};\r\n}());\r\n\r\nL.MarkerCluster.include({\r\n\tgetConvexHull: function () {\r\n\t\tvar childMarkers = this.getAllChildMarkers(),\r\n\t\t\tpoints = [],\r\n\t\t\tp, i;\r\n\r\n\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\tp = childMarkers[i].getLatLng();\r\n\t\t\tpoints.push(p);\r\n\t\t}\r\n\r\n\t\treturn L.QuickHull.getConvexHull(points);\r\n\t}\r\n});\r\n","//This code is 100% based on https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet\r\n//Huge thanks to jawj for implementing it first to make my job easy :-)\r\n\r\nL.MarkerCluster.include({\r\n\r\n\t_2PI: Math.PI * 2,\r\n\t_circleFootSeparation: 25, //related to circumference of circle\r\n\t_circleStartAngle: 0,\r\n\r\n\t_spiralFootSeparation: 28, //related to size of spiral (experiment!)\r\n\t_spiralLengthStart: 11,\r\n\t_spiralLengthFactor: 5,\r\n\r\n\t_circleSpiralSwitchover: 9, //show spiral instead of circle from this marker count upwards.\r\n\t\t\t\t\t\t\t\t// 0 -> always spiral; Infinity -> always circle\r\n\r\n\tspiderfy: function () {\r\n\t\tif (this._group._spiderfied === this || this._group._inZoomAnimation) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar childMarkers = this.getAllChildMarkers(null, true),\r\n\t\t\tgroup = this._group,\r\n\t\t\tmap = group._map,\r\n\t\t\tcenter = map.latLngToLayerPoint(this._latlng),\r\n\t\t\tpositions;\r\n\r\n\t\tthis._group._unspiderfy();\r\n\t\tthis._group._spiderfied = this;\r\n\r\n\t\t//TODO Maybe: childMarkers order by distance to center\r\n\r\n\t\tif (childMarkers.length >= this._circleSpiralSwitchover) {\r\n\t\t\tpositions = this._generatePointsSpiral(childMarkers.length, center);\r\n\t\t} else {\r\n\t\t\tcenter.y += 10; // Otherwise circles look wrong => hack for standard blue icon, renders differently for other icons.\r\n\t\t\tpositions = this._generatePointsCircle(childMarkers.length, center);\r\n\t\t}\r\n\r\n\t\tthis._animationSpiderfy(childMarkers, positions);\r\n\t},\r\n\r\n\tunspiderfy: function (zoomDetails) {\r\n\t\t/// <param Name=\"zoomDetails\">Argument from zoomanim if being called in a zoom animation or null otherwise</param>\r\n\t\tif (this._group._inZoomAnimation) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._animationUnspiderfy(zoomDetails);\r\n\r\n\t\tthis._group._spiderfied = null;\r\n\t},\r\n\r\n\t_generatePointsCircle: function (count, centerPt) {\r\n\t\tvar circumference = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + count),\r\n\t\t\tlegLength = circumference / this._2PI, //radius from circumference\r\n\t\t\tangleStep = this._2PI / count,\r\n\t\t\tres = [],\r\n\t\t\ti, angle;\r\n\r\n\t\tlegLength = Math.max(legLength, 35); // Minimum distance to get outside the cluster icon.\r\n\r\n\t\tres.length = count;\r\n\r\n\t\tfor (i = 0; i < count; i++) { // Clockwise, like spiral.\r\n\t\t\tangle = this._circleStartAngle + i * angleStep;\r\n\t\t\tres[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t},\r\n\r\n\t_generatePointsSpiral: function (count, centerPt) {\r\n\t\tvar spiderfyDistanceMultiplier = this._group.options.spiderfyDistanceMultiplier,\r\n\t\t\tlegLength = spiderfyDistanceMultiplier * this._spiralLengthStart,\r\n\t\t\tseparation = spiderfyDistanceMultiplier * this._spiralFootSeparation,\r\n\t\t\tlengthFactor = spiderfyDistanceMultiplier * this._spiralLengthFactor * this._2PI,\r\n\t\t\tangle = 0,\r\n\t\t\tres = [],\r\n\t\t\ti;\r\n\r\n\t\tres.length = count;\r\n\r\n\t\t// Higher index, closer position to cluster center.\r\n\t\tfor (i = count; i >= 0; i--) {\r\n\t\t\t// Skip the first position, so that we are already farther from center and we avoid\r\n\t\t\t// being under the default cluster icon (especially important for Circle Markers).\r\n\t\t\tif (i < count) {\r\n\t\t\t\tres[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();\r\n\t\t\t}\r\n\t\t\tangle += separation / legLength + i * 0.0005;\r\n\t\t\tlegLength += lengthFactor / angle;\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\t_noanimationUnspiderfy: function () {\r\n\t\tvar group = this._group,\r\n\t\t\tmap = group._map,\r\n\t\t\tfg = group._featureGroup,\r\n\t\t\tchildMarkers = this.getAllChildMarkers(null, true),\r\n\t\t\tm, i;\r\n\r\n\t\tgroup._ignoreMove = true;\r\n\r\n\t\tthis.setOpacity(1);\r\n\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\tm = childMarkers[i];\r\n\r\n\t\t\tfg.removeLayer(m);\r\n\r\n\t\t\tif (m._preSpiderfyLatlng) {\r\n\t\t\t\tm.setLatLng(m._preSpiderfyLatlng);\r\n\t\t\t\tdelete m._preSpiderfyLatlng;\r\n\t\t\t}\r\n\t\t\tif (m.setZIndexOffset) {\r\n\t\t\t\tm.setZIndexOffset(0);\r\n\t\t\t}\r\n\r\n\t\t\tif (m._spiderLeg) {\r\n\t\t\t\tmap.removeLayer(m._spiderLeg);\r\n\t\t\t\tdelete m._spiderLeg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgroup.fire('unspiderfied', {\r\n\t\t\tcluster: this,\r\n\t\t\tmarkers: childMarkers\r\n\t\t});\r\n\t\tgroup._ignoreMove = false;\r\n\t\tgroup._spiderfied = null;\r\n\t}\r\n});\r\n\r\n//Non Animated versions of everything\r\nL.MarkerClusterNonAnimated = L.MarkerCluster.extend({\r\n\t_animationSpiderfy: function (childMarkers, positions) {\r\n\t\tvar group = this._group,\r\n\t\t\tmap = group._map,\r\n\t\t\tfg = group._featureGroup,\r\n\t\t\tlegOptions = this._group.options.spiderLegPolylineOptions,\r\n\t\t\ti, m, leg, newPos;\r\n\r\n\t\tgroup._ignoreMove = true;\r\n\r\n\t\t// Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition.\r\n\t\t// The reverse order trick no longer improves performance on modern browsers.\r\n\t\tfor (i = 0; i < childMarkers.length; i++) {\r\n\t\t\tnewPos = map.layerPointToLatLng(positions[i]);\r\n\t\t\tm = childMarkers[i];\r\n\r\n\t\t\t// Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it.\r\n\t\t\tleg = new L.Polyline([this._latlng, newPos], legOptions);\r\n\t\t\tmap.addLayer(leg);\r\n\t\t\tm._spiderLeg = leg;\r\n\r\n\t\t\t// Now add the marker.\r\n\t\t\tm._preSpiderfyLatlng = m._latlng;\r\n\t\t\tm.setLatLng(newPos);\r\n\t\t\tif (m.setZIndexOffset) {\r\n\t\t\t\tm.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING\r\n\t\t\t}\r\n\r\n\t\t\tfg.addLayer(m);\r\n\t\t}\r\n\t\tthis.setOpacity(0.3);\r\n\r\n\t\tgroup._ignoreMove = false;\r\n\t\tgroup.fire('spiderfied', {\r\n\t\t\tcluster: this,\r\n\t\t\tmarkers: childMarkers\r\n\t\t});\r\n\t},\r\n\r\n\t_animationUnspiderfy: function () {\r\n\t\tthis._noanimationUnspiderfy();\r\n\t}\r\n});\r\n\r\n//Animated versions here\r\nL.MarkerCluster.include({\r\n\r\n\t_animationSpiderfy: function (childMarkers, positions) {\r\n\t\tvar me = this,\r\n\t\t\tgroup = this._group,\r\n\t\t\tmap = group._map,\r\n\t\t\tfg = group._featureGroup,\r\n\t\t\tthisLayerLatLng = this._latlng,\r\n\t\t\tthisLayerPos = map.latLngToLayerPoint(thisLayerLatLng),\r\n\t\t\tsvg = L.Path.SVG,\r\n\t\t\tlegOptions = L.extend({}, this._group.options.spiderLegPolylineOptions), // Copy the options so that we can modify them for animation.\r\n\t\t\tfinalLegOpacity = legOptions.opacity,\r\n\t\t\ti, m, leg, legPath, legLength, newPos;\r\n\r\n\t\tif (finalLegOpacity === undefined) {\r\n\t\t\tfinalLegOpacity = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity;\r\n\t\t}\r\n\r\n\t\tif (svg) {\r\n\t\t\t// If the initial opacity of the spider leg is not 0 then it appears before the animation starts.\r\n\t\t\tlegOptions.opacity = 0;\r\n\r\n\t\t\t// Add the class for CSS transitions.\r\n\t\t\tlegOptions.className = (legOptions.className || '') + ' leaflet-cluster-spider-leg';\r\n\t\t} else {\r\n\t\t\t// Make sure we have a defined opacity.\r\n\t\t\tlegOptions.opacity = finalLegOpacity;\r\n\t\t}\r\n\r\n\t\tgroup._ignoreMove = true;\r\n\r\n\t\t// Add markers and spider legs to map, hidden at our center point.\r\n\t\t// Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition.\r\n\t\t// The reverse order trick no longer improves performance on modern browsers.\r\n\t\tfor (i = 0; i < childMarkers.length; i++) {\r\n\t\t\tm = childMarkers[i];\r\n\r\n\t\t\tnewPos = map.layerPointToLatLng(positions[i]);\r\n\r\n\t\t\t// Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it.\r\n\t\t\tleg = new L.Polyline([thisLayerLatLng, newPos], legOptions);\r\n\t\t\tmap.addLayer(leg);\r\n\t\t\tm._spiderLeg = leg;\r\n\r\n\t\t\t// Explanations: https://jakearchibald.com/2013/animated-line-drawing-svg/\r\n\t\t\t// In our case the transition property is declared in the CSS file.\r\n\t\t\tif (svg) {\r\n\t\t\t\tlegPath = leg._path;\r\n\t\t\t\tlegLength = legPath.getTotalLength() + 0.1; // Need a small extra length to avoid remaining dot in Firefox.\r\n\t\t\t\tlegPath.style.strokeDasharray = legLength; // Just 1 length is enough, it will be duplicated.\r\n\t\t\t\tlegPath.style.strokeDashoffset = legLength;\r\n\t\t\t}\r\n\r\n\t\t\t// If it is a marker, add it now and we'll animate it out\r\n\t\t\tif (m.setZIndexOffset) {\r\n\t\t\t\tm.setZIndexOffset(1000000); // Make normal markers appear on top of EVERYTHING\r\n\t\t\t}\r\n\t\t\tif (m.clusterHide) {\r\n\t\t\t\tm.clusterHide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Vectors just get immediately added\r\n\t\t\tfg.addLayer(m);\r\n\r\n\t\t\tif (m._setPos) {\r\n\t\t\t\tm._setPos(thisLayerPos);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgroup._forceLayout();\r\n\t\tgroup._animationStart();\r\n\r\n\t\t// Reveal markers and spider legs.\r\n\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\tnewPos = map.layerPointToLatLng(positions[i]);\r\n\t\t\tm = childMarkers[i];\r\n\r\n\t\t\t//Move marker to new position\r\n\t\t\tm._preSpiderfyLatlng = m._latlng;\r\n\t\t\tm.setLatLng(newPos);\r\n\t\t\t\r\n\t\t\tif (m.clusterShow) {\r\n\t\t\t\tm.clusterShow();\r\n\t\t\t}\r\n\r\n\t\t\t// Animate leg (animation is actually delegated to CSS transition).\r\n\t\t\tif (svg) {\r\n\t\t\t\tleg = m._spiderLeg;\r\n\t\t\t\tlegPath = leg._path;\r\n\t\t\t\tlegPath.style.strokeDashoffset = 0;\r\n\t\t\t\t//legPath.style.strokeOpacity = finalLegOpacity;\r\n\t\t\t\tleg.setStyle({opacity: finalLegOpacity});\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setOpacity(0.3);\r\n\r\n\t\tgroup._ignoreMove = false;\r\n\r\n\t\tsetTimeout(function () {\r\n\t\t\tgroup._animationEnd();\r\n\t\t\tgroup.fire('spiderfied', {\r\n\t\t\t\tcluster: me,\r\n\t\t\t\tmarkers: childMarkers\r\n\t\t\t});\r\n\t\t}, 200);\r\n\t},\r\n\r\n\t_animationUnspiderfy: function (zoomDetails) {\r\n\t\tvar me = this,\r\n\t\t\tgroup = this._group,\r\n\t\t\tmap = group._map,\r\n\t\t\tfg = group._featureGroup,\r\n\t\t\tthisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng),\r\n\t\t\tchildMarkers = this.getAllChildMarkers(null, true),\r\n\t\t\tsvg = L.Path.SVG,\r\n\t\t\tm, i, leg, legPath, legLength, nonAnimatable;\r\n\r\n\t\tgroup._ignoreMove = true;\r\n\t\tgroup._animationStart();\r\n\r\n\t\t//Make us visible and bring the child markers back in\r\n\t\tthis.setOpacity(1);\r\n\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\tm = childMarkers[i];\r\n\r\n\t\t\t//Marker was added to us after we were spiderfied\r\n\t\t\tif (!m._preSpiderfyLatlng) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t//Close any popup on the marker first, otherwise setting the location of the marker will make the map scroll\r\n\t\t\tm.closePopup();\r\n\r\n\t\t\t//Fix up the location to the real one\r\n\t\t\tm.setLatLng(m._preSpiderfyLatlng);\r\n\t\t\tdelete m._preSpiderfyLatlng;\r\n\r\n\t\t\t//Hack override the location to be our center\r\n\t\t\tnonAnimatable = true;\r\n\t\t\tif (m._setPos) {\r\n\t\t\t\tm._setPos(thisLayerPos);\r\n\t\t\t\tnonAnimatable = false;\r\n\t\t\t}\r\n\t\t\tif (m.clusterHide) {\r\n\t\t\t\tm.clusterHide();\r\n\t\t\t\tnonAnimatable = false;\r\n\t\t\t}\r\n\t\t\tif (nonAnimatable) {\r\n\t\t\t\tfg.removeLayer(m);\r\n\t\t\t}\r\n\r\n\t\t\t// Animate the spider leg back in (animation is actually delegated to CSS transition).\r\n\t\t\tif (svg) {\r\n\t\t\t\tleg = m._spiderLeg;\r\n\t\t\t\tlegPath = leg._path;\r\n\t\t\t\tlegLength = legPath.getTotalLength() + 0.1;\r\n\t\t\t\tlegPath.style.strokeDashoffset = legLength;\r\n\t\t\t\tleg.setStyle({opacity: 0});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgroup._ignoreMove = false;\r\n\r\n\t\tsetTimeout(function () {\r\n\t\t\t//If we have only <= one child left then that marker will be shown on the map so don't remove it!\r\n\t\t\tvar stillThereChildCount = 0;\r\n\t\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\t\tm = childMarkers[i];\r\n\t\t\t\tif (m._spiderLeg) {\r\n\t\t\t\t\tstillThereChildCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tfor (i = childMarkers.length - 1; i >= 0; i--) {\r\n\t\t\t\tm = childMarkers[i];\r\n\r\n\t\t\t\tif (!m._spiderLeg) { //Has already been unspiderfied\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (m.clusterShow) {\r\n\t\t\t\t\tm.clusterShow();\r\n\t\t\t\t}\r\n\t\t\t\tif (m.setZIndexOffset) {\r\n\t\t\t\t\tm.setZIndexOffset(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (stillThereChildCount > 1) {\r\n\t\t\t\t\tfg.removeLayer(m);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmap.removeLayer(m._spiderLeg);\r\n\t\t\t\tdelete m._spiderLeg;\r\n\t\t\t}\r\n\t\t\tgroup._animationEnd();\r\n\t\t\tgroup.fire('unspiderfied', {\r\n\t\t\t\tcluster: me,\r\n\t\t\t\tmarkers: childMarkers\r\n\t\t\t});\r\n\t\t}, 200);\r\n\t}\r\n});\r\n\r\n\r\nL.MarkerClusterGroup.include({\r\n\t//The MarkerCluster currently spiderfied (if any)\r\n\t_spiderfied: null,\r\n\r\n\tunspiderfy: function () {\r\n\t\tthis._unspiderfy.apply(this, arguments);\r\n\t},\r\n\r\n\t_spiderfierOnAdd: function () {\r\n\t\tthis._map.on('click', this._unspiderfyWrapper, this);\r\n\r\n\t\tif (this._map.options.zoomAnimation) {\r\n\t\t\tthis._map.on('zoomstart', this._unspiderfyZoomStart, this);\r\n\t\t}\r\n\t\t//Browsers without zoomAnimation or a big zoom don't fire zoomstart\r\n\t\tthis._map.on('zoomend', this._noanimationUnspiderfy, this);\r\n\r\n\t\tif (!L.Browser.touch) {\r\n\t\t\tthis._map.getRenderer(this);\r\n\t\t\t//Needs to happen in the pageload, not after, or animations don't work in webkit\r\n\t\t\t// http://stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements\r\n\t\t\t//Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticable\r\n\t\t}\r\n\t},\r\n\r\n\t_spiderfierOnRemove: function () {\r\n\t\tthis._map.off('click', this._unspiderfyWrapper, this);\r\n\t\tthis._map.off('zoomstart', this._unspiderfyZoomStart, this);\r\n\t\tthis._map.off('zoomanim', this._unspiderfyZoomAnim, this);\r\n\t\tthis._map.off('zoomend', this._noanimationUnspiderfy, this);\r\n\r\n\t\t//Ensure that markers are back where they should be\r\n\t\t// Use no animation to avoid a sticky leaflet-cluster-anim class on mapPane\r\n\t\tthis._noanimationUnspiderfy();\r\n\t},\r\n\r\n\t//On zoom start we add a zoomanim handler so that we are guaranteed to be last (after markers are animated)\r\n\t//This means we can define the animation they do rather than Markers doing an animation to their actual location\r\n\t_unspiderfyZoomStart: function () {\r\n\t\tif (!this._map) { //May have been removed from the map by a zoomEnd handler\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._map.on('zoomanim', this._unspiderfyZoomAnim, this);\r\n\t},\r\n\r\n\t_unspiderfyZoomAnim: function (zoomDetails) {\r\n\t\t//Wait until the first zoomanim after the user has finished touch-zooming before running the animation\r\n\t\tif (L.DomUtil.hasClass(this._map._mapPane, 'leaflet-touching')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._map.off('zoomanim', this._unspiderfyZoomAnim, this);\r\n\t\tthis._unspiderfy(zoomDetails);\r\n\t},\r\n\r\n\t_unspiderfyWrapper: function () {\r\n\t\t/// <summary>_unspiderfy but passes no arguments</summary>\r\n\t\tthis._unspiderfy();\r\n\t},\r\n\r\n\t_unspiderfy: function (zoomDetails) {\r\n\t\tif (this._spiderfied) {\r\n\t\t\tthis._spiderfied.unspiderfy(zoomDetails);\r\n\t\t}\r\n\t},\r\n\r\n\t_noanimationUnspiderfy: function () {\r\n\t\tif (this._spiderfied) {\r\n\t\t\tthis._spiderfied._noanimationUnspiderfy();\r\n\t\t}\r\n\t},\r\n\r\n\t//If the given layer is currently being spiderfied then we unspiderfy it so it isn't on the map anymore etc\r\n\t_unspiderfyLayer: function (layer) {\r\n\t\tif (layer._spiderLeg) {\r\n\t\t\tthis._featureGroup.removeLayer(layer);\r\n\r\n\t\t\tif (layer.clusterShow) {\r\n\t\t\t\tlayer.clusterShow();\r\n\t\t\t}\r\n\t\t\t\t//Position will be fixed up immediately in _animationUnspiderfy\r\n\t\t\tif (layer.setZIndexOffset) {\r\n\t\t\t\tlayer.setZIndexOffset(0);\r\n\t\t\t}\r\n\r\n\t\t\tthis._map.removeLayer(layer._spiderLeg);\r\n\t\t\tdelete layer._spiderLeg;\r\n\t\t}\r\n\t}\r\n});\r\n","/**\r\n * Adds 1 public method to MCG and 1 to L.Marker to facilitate changing\r\n * markers' icon options and refreshing their icon and their parent clusters\r\n * accordingly (case where their iconCreateFunction uses data of childMarkers\r\n * to make up the cluster icon).\r\n */\r\n\r\n\r\nL.MarkerClusterGroup.include({\r\n\t/**\r\n\t * Updates the icon of all clusters which are parents of the given marker(s).\r\n\t * In singleMarkerMode, also updates the given marker(s) icon.\r\n\t * @param layers L.MarkerClusterGroup|L.LayerGroup|Array(L.Marker)|Map(L.Marker)|\r\n\t * L.MarkerCluster|L.Marker (optional) list of markers (or single marker) whose parent\r\n\t * clusters need to be updated. If not provided, retrieves all child markers of this.\r\n\t * @returns {L.MarkerClusterGroup}\r\n\t */\r\n\trefreshClusters: function (layers) {\r\n\t\tif (!layers) {\r\n\t\t\tlayers = this._topClusterLevel.getAllChildMarkers();\r\n\t\t} else if (layers instanceof L.MarkerClusterGroup) {\r\n\t\t\tlayers = layers._topClusterLevel.getAllChildMarkers();\r\n\t\t} else if (layers instanceof L.LayerGroup) {\r\n\t\t\tlayers = layers._layers;\r\n\t\t} else if (layers instanceof L.MarkerCluster) {\r\n\t\t\tlayers = layers.getAllChildMarkers();\r\n\t\t} else if (layers instanceof L.Marker) {\r\n\t\t\tlayers = [layers];\r\n\t\t} // else: must be an Array(L.Marker)|Map(L.Marker)\r\n\t\tthis._flagParentsIconsNeedUpdate(layers);\r\n\t\tthis._refreshClustersIcons();\r\n\r\n\t\t// In case of singleMarkerMode, also re-draw the markers.\r\n\t\tif (this.options.singleMarkerMode) {\r\n\t\t\tthis._refreshSingleMarkerModeMarkers(layers);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/**\r\n\t * Simply flags all parent clusters of the given markers as having a \"dirty\" icon.\r\n\t * @param layers Array(L.Marker)|Map(L.Marker) list of markers.\r\n\t * @private\r\n\t */\r\n\t_flagParentsIconsNeedUpdate: function (layers) {\r\n\t\tvar id, parent;\r\n\r\n\t\t// Assumes layers is an Array or an Object whose prototype is non-enumerable.\r\n\t\tfor (id in layers) {\r\n\t\t\t// Flag parent clusters' icon as \"dirty\", all the way up.\r\n\t\t\t// Dumb process that flags multiple times upper parents, but still\r\n\t\t\t// much more efficient than trying to be smart and make short lists,\r\n\t\t\t// at least in the case of a hierarchy following a power law:\r\n\t\t\t// http://jsperf.com/flag-nodes-in-power-hierarchy/2\r\n\t\t\tparent = layers[id].__parent;\r\n\t\t\twhile (parent) {\r\n\t\t\t\tparent._iconNeedsUpdate = true;\r\n\t\t\t\tparent = parent.__parent;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Re-draws the icon of the supplied markers.\r\n\t * To be used in singleMarkerMode only.\r\n\t * @param layers Array(L.Marker)|Map(L.Marker) list of markers.\r\n\t * @private\r\n\t */\r\n\t_refreshSingleMarkerModeMarkers: function (layers) {\r\n\t\tvar id, layer;\r\n\r\n\t\tfor (id in layers) {\r\n\t\t\tlayer = layers[id];\r\n\r\n\t\t\t// Make sure we do not override markers that do not belong to THIS group.\r\n\t\t\tif (this.hasLayer(layer)) {\r\n\t\t\t\t// Need to re-create the icon first, then re-draw the marker.\r\n\t\t\t\tlayer.setIcon(this._overrideMarkerIcon(layer));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.Marker.include({\r\n\t/**\r\n\t * Updates the given options in the marker's icon and refreshes the marker.\r\n\t * @param options map object of icon options.\r\n\t * @param directlyRefreshClusters boolean (optional) true to trigger\r\n\t * MCG.refreshClustersOf() right away with this single marker.\r\n\t * @returns {L.Marker}\r\n\t */\r\n\trefreshIconOptions: function (options, directlyRefreshClusters) {\r\n\t\tvar icon = this.options.icon;\r\n\r\n\t\tL.setOptions(icon, options);\r\n\r\n\t\tthis.setIcon(icon);\r\n\r\n\t\t// Shortcut to refresh the associated MCG clusters right away.\r\n\t\t// To be used when refreshing a single marker.\r\n\t\t// Otherwise, better use MCG.refreshClusters() once at the end with\r\n\t\t// the list of modified markers.\r\n\t\tif (directlyRefreshClusters && this.__parent) {\r\n\t\t\tthis.__parent._group.refreshClusters(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;AAIA,AAAO,IAAI,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;;CAE5E,OAAO,EAAE;EACR,gBAAgB,EAAE,EAAE;EACpB,kBAAkB,EAAE,IAAI;EACxB,WAAW,EAAE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AAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IACzB;GACD;EACD;;;;;;;;CAQD,+BAA+B,EAAE,UAAU,MAAM,EAAE;EAClD,IAAI,EAAE,EAAE,KAAK,CAAC;;EAEd,KAAK,EAAE,IAAI,MAAM,EAAE;GAClB,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;;;GAGnB,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;;IAEzB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C;GACD;EACD;CACD,CAAC,CAAC;;AAEH,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;;;CAQhB,kBAAkB,EAAE,UAAU,OAAO,EAAE,uBAAuB,EAAE;EAC/D,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;;EAE7B,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;;EAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;;;;;;EAMnB,IAAI,uBAAuB,IAAI,IAAI,CAAC,QAAQ,EAAE;GAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;GAC3C;;EAED,OAAO,IAAI,CAAC;EACZ;CACD,CAAC,CAAC;;;;;"} \ No newline at end of file diff --git a/src/components/plugin/cluster-layer/leaflet.markercluster.freezable.js b/src/components/plugin/cluster-layer/leaflet.markercluster.freezable.js new file mode 100644 index 0000000..093a72a --- /dev/null +++ b/src/components/plugin/cluster-layer/leaflet.markercluster.freezable.js @@ -0,0 +1,6 @@ +/*! + Leaflet.MarkerCluster.Freezable 1.0.0+9db80a3 + (c) 2015-2016 Boris Seang + License MIT + */ +!function(e,i){"function"==typeof define&&define.amd?define(["leaflet"],i):i("object"==typeof module&&module.exports?require("leaflet"):e.L)}(this,function(e,i){e.MarkerClusterGroup.include({_originalOnAddFreezable:e.MarkerClusterGroup.prototype.onAdd,onAdd:function(e){var i=this._zoom;this._originalOnAddFreezable(e),this._frozen&&(i>=0&&i!==this._zoom&&(this._featureGroup.clearLayers(),this._zoom=i,this.addLayers([])),e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),e.on("zoomend moveend",this._viewChangeEndNotClustering,this))},_originalOnRemove:e.MarkerClusterGroup.prototype.onRemove,onRemove:function(e){e.off("zoomend moveend",this._viewChangeEndNotClustering,this),this._originalOnRemove(e)},disableClustering:function(){return this.freezeAtZoom(this._maxZoom+1)},disableClusteringKeepSpiderfy:function(){return this.freezeAtZoom(this._maxZoom)},enableClustering:function(){return this.unfreeze()},unfreeze:function(){return this.freezeAtZoom(!1)},freezeAtZoom:function(e){this._processQueue();var o=this._map;e===i||e===!0||e!==e?e=o?Math.round(o.getZoom()):-1:"max"===e?e=this._maxZoom+1:"maxKeepSpiderfy"===e&&(e=this._maxZoom);var t="number"==typeof e;if(this._frozen){if(!t)return this._unfreeze(),this}else{if(!t)return this;this._initiateFreeze()}return this._artificialZoomSafe(this._zoom,e),this},_initiateFreeze:function(){var e=this._map;this._frozen=!0,e&&(e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),e.on("zoomend moveend",this._viewChangeEndNotClustering,this))},_unfreeze:function(){var e=this._map;this._frozen=!1,e&&(e.off("zoomend moveend",this._viewChangeEndNotClustering,this),e.on("zoomend",this._zoomEnd,this),e.on("moveend",this._moveEnd,this),this._executeAfterUnspiderfy(function(){this._zoomEnd()},this))},_executeAfterUnspiderfy:function(e,i){return this._unspiderfy&&this._spiderfied?(this.once("animationend",function(){e.call(i)}),void this._unspiderfy()):void e.call(i)},_artificialZoomSafe:function(e,i){this._zoom=i,this._map&&e!==i&&this._executeAfterUnspiderfy(function(){this._artificialZoom(e,i)},this)},_artificialZoom:function(e,i){e<i?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._map.getMinZoom(),e,this._getExpandedVisibleBounds()),this._animationZoomIn(e,i)):e>i&&(this._animationStart(),this._animationZoomOut(e,i))},_viewChangeEndNotClustering:function(){var e=this._featureGroup,i=this._getExpandedVisibleBounds(),o=this._zoom;e.eachLayer(function(t){!i.contains(t._latlng)&&t.__parent&&t.__parent._zoom<o&&e.removeLayer(t)}),this._topClusterLevel._recursively(i,-1,o,function(t){if(t._zoom!==o)for(var n,r=t._markers,s=0;s<r.length;s++)n=t._markers[s],i.contains(n._latlng)&&e.addLayer(n)},function(e){e._addToMap()}),this._currentShownBounds=i},_originalZoomOrSpiderfy:e.MarkerClusterGroup.prototype._zoomOrSpiderfy,_zoomOrSpiderfy:function(e){this._frozen&&this.options.spiderfyOnMaxZoom?(e.layer.spiderfy(),e.originalEvent&&13===e.originalEvent.keyCode&&map._container.focus()):this._originalZoomOrSpiderfy(e)}})}); \ No newline at end of file diff --git a/src/components/plugin/cluster-layer/leaflet.markercluster.js b/src/components/plugin/cluster-layer/leaflet.markercluster.js new file mode 100644 index 0000000..67c52dc --- /dev/null +++ b/src/components/plugin/cluster-layer/leaflet.markercluster.js @@ -0,0 +1,3 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var i,n=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,a=this.options.chunkProgress,h=e.length,l=0,u=!0;if(this._map){var _=(new Date).getTime(),d=L.bind(function(){for(var c=(new Date).getTime();h>l;l++){if(s&&0===l%200){var p=(new Date).getTime()-c;if(p>o)break}if(i=e[l],i instanceof L.LayerGroup)u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),t||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var f=i.__parent.getAllChildMarkers(),m=f[0]===i?f[1]:f[0];n.removeLayer(m)}}else r.addLayer(i),t||this.fire("layeradd",{layer:i})}a&&a(l,h,(new Date).getTime()-_),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else for(var c=this._needsClustering;h>l;l++)i=e[l],i instanceof L.LayerGroup?(u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length):i.getLatLng?this.hasLayer(i)||c.push(i):r.addLayer(i);return this},removeLayers:function(e){var t,i,n=e.length,r=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=n;for(t=0;h>t;t++)i=a[t],i instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,n,r,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;n>=0;n--){for(i=!0,r=o.length-1;r>=0;r--)if(o[r].layer===s[n]){i=!1;break}i&&e.call(t,s[n])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(i){L.stamp(i)===e&&(t=i)}),t},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;t>=0;t--)if(i[t]===e)return!0;for(i=this._needsRemoving,t=i.length-1;t>=0;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var i=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;i>=0;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());t>=r&&n[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),r[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=" marker-cluster-";return i+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,i=t;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(e||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;r>=t;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,n,r=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=o;t--){i=this._map.project(e.getLatLng(),t);var a=r[t].getNearObject(i);if(a)return a._addChild(e),e.__parent=a,void 0;if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);r[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,e.__parent=l;var u=l;for(n=t-1;n>h._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));return h._addChild(u),this._removeFromGridUnclustered(a,t),void 0}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,n=e.getLayers(),r=0;for(t=t||[];r<n.length;r++)i=n[r],i instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){var t=e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}});return t}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(e,t){var i,n=this._getExpandedVisibleBounds(),r=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,s,function(s){var o,a=s._latlng,h=s._markers;for(n.contains(a)||(a=null),s._isSingleParent()&&e+1===t?(r.removeLayer(s),s._recursivelyAddChildrenToMap(null,t,n)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,t,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||r.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,s,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,n=this._featureGroup;n.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){n.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,t+1,i);var s=this;this._forceLayout(),e._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===e._childCount){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(n,i,r,function(e){e._recursivelyRemoveChildrenFromMap(n,r,t+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)t&&this._markers[n].__dragStart||e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),s=this._zoom+1,o=n.getZoom();i.length>0&&r>s;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}r>s?this._group._map.setView(this._latlng,s):o>=r?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,n,r=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<r.length;e++)i=r[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)t=s[e],t._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,n=t._childCount,o+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,i){this._recursively(e,this._group._map.getMinZoom(),i-1,function(e){var i,n,r=e._markers;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())},function(e){var i,n,r=e._childClusters;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,i,n){this._recursively(e,n,t,function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(e,t,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,i){this._recursively(i,this._group._map.getMinZoom()-1,t,function(n){if(t!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var s=n._markers[r];i.contains(s._latlng)&&(e&&(s._backupLatlng=s.getLatLng(),s.setLatLng(e),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,n){var r,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;s>=0;s--)r=e._markers[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(e){for(s=e._childClusters.length-1;s>=0;s--)r=e._childClusters[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(e,t,i,n,r){var s,o,a=this._childClusters,h=this._zoom;if(h>=t&&(n&&n(this),r&&h===i&&r(this)),t>h||i>h)for(s=a.length-1;s>=0;s--)o=a[s],o._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),n=this._getCoord(t.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,n,r=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,n=h.length;n>i;i++)if(h[i]===e)return h.splice(i,1),1===n&&delete a[r],!0},eachObject:function(e,t){var i,n,r,s,o,a,h,l=this._grid;for(i in l){o=l[i];for(n in o)for(a=o[n],r=0,s=a.length;s>r;r++)h=e.call(t,a[r]),h&&(r--,s--)}},getNearObject:function(e){var t,i,n,r,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,c=null;for(t=u-1;u+1>=t;t++)if(r=this._grid[t])for(i=l-1;l+1>=i;i++)if(s=r[i])for(n=0,o=s.length;o>n;n++)a=s[n],h=this._sqDist(_[L.Util.stamp(a)],e),(d>h||d>=h&&null===c)&&(d=h,c=a);return c},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat,n=t[0].lng-t[1].lng;return n*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,n,r,s=0,o=null,a=[];for(i=t.length-1;i>=0;i--)n=t[i],r=this.getDistant(n,e),r>0&&(a.push(n),r>s&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],n=this.findMostDistantPointFromBaseLine(e,t);return n.maxPoint?(i=i.concat(this.buildConvexHull([e[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,e[1]],n.newPoints))):[e[0]]},getConvexHull:function(e){var t,i=!1,n=!1,r=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;t>=0;t--){var d=e[t];(i===!1||d.lat>i)&&(o=d,i=d.lat),(n===!1||d.lat<n)&&(a=d,n=d.lat),(r===!1||d.lng>r)&&(h=d,r=d.lng),(s===!1||d.lng<s)&&(l=d,s=d.lng)}n!==i?(_=a,u=o):(_=l,u=h);var c=[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e));return c}}}(),L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),n=[];for(t=i.length-1;t>=0;t--)e=i[t].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,r=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,r):(r.y+=10,e=this._generatePointsCircle(t.length,r)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e),s=r/this._2PI,o=this._2PI/e,a=[];for(s=Math.max(s,35),a.length=e,i=0;e>i;i++)n=this._circleStartAngle+i*o,a[i]=new L.Point(t.x+s*Math.cos(n),t.y+s*Math.sin(n))._round();return a},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=e,i=e;i>=0;i--)e>i&&(h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round()),a+=s/r+5e-4*i,r+=o/a;return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;t>=0;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),n=e[i],r=new L.Polyline([this._latlng,s],l),a.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),o._ignoreMove=!1,o.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,n,r,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,c=u.latLngToLayerPoint(d),p=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)n=e[i],a=u.layerPointToLatLng(t[i]),r=new L.Polyline([d,a],f),u.addLayer(r),n._spiderLeg=r,p&&(s=r._path,o=s.getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),_.addLayer(n),n._setPos&&n._setPos(c);for(l._forceLayout(),l._animationStart(),i=e.length-1;i>=0;i--)a=u.layerPointToLatLng(t[i]),n=e[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&(r=n._spiderLeg,s=r._path,s.style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,n,r,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)t=d[i],t._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),c&&(n=t._spiderLeg,r=n._path,s=r.getTotalLength()+.1,r.style.strokeDashoffset=s,n.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&e++;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),e>1&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy() +},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i}); +//# sourceMappingURL=leaflet.markercluster.js.map \ No newline at end of file diff --git a/src/components/plugin/cluster-layer/leaflet.markercluster.js.map b/src/components/plugin/cluster-layer/leaflet.markercluster.js.map new file mode 100644 index 0000000..a4b459c --- /dev/null +++ b/src/components/plugin/cluster-layer/leaflet.markercluster.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/MarkerClusterGroup.js","../src/MarkerCluster.js","../src/MarkerOpacity.js","../src/DistanceGrid.js","../src/MarkerCluster.QuickHull.js","../src/MarkerCluster.Spiderfier.js","../src/MarkerClusterGroup.Refresh.js"],"names":[],"mappings":"0PAIO,IAAI,GAAqB,EAAE,mBAAqB,EAAE,aAAa,QAErE,SACC,iBAAkB,GAClB,mBAAoB,KACpB,YAAa,EAAE,OAAO,UAAU,QAAQ,KAExC,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAElB,wBAAyB,KAIzB,4BAA4B,EAK5B,SAAS,EAIT,sBAAsB,EAGtB,2BAA4B,EAG5B,0BAA4B,OAAQ,IAAK,MAAO,OAAQ,QAAS,IAGjE,gBAAgB,EAChB,cAAe,IACf,WAAY,GACZ,cAAe,KAGf,mBAGD,WAAY,SAAU,GACrB,EAAE,KAAK,WAAW,KAAM,GACnB,KAAK,QAAQ,qBACjB,KAAK,QAAQ,mBAAqB,KAAK,4BAGxC,KAAK,cAAgB,EAAE,eACvB,KAAK,cAAc,eAAe,MAElC,KAAK,eAAiB,EAAE,eACxB,KAAK,eAAe,eAAe,MAEnC,KAAK,iBAAmB,EACxB,KAAK,oBACL,KAAK,kBAEL,KAAK,oBAAsB,KAE3B,KAAK,UAEL,KAAK,2BACJ,UAAa,KAAK,sBAClB,KAAQ,KAAK,kBACb,QAAW,KAAK,oBAIjB,IAAI,GAAU,EAAE,QAAQ,YAAc,KAAK,QAAQ,OACnD,GAAE,OAAO,KAAM,EAAU,KAAK,eAAiB,KAAK,cAEpD,KAAK,eAAiB,EAAU,EAAE,cAAgB,EAAE,0BAGrD,SAAU,SAAU,GAEnB,GAAI,YAAiB,GAAE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AAiB,qBACvB,YAAkB,GAAE,WAC9B,EAAS,EAAO,QACN,YAAkB,GAAE,cAC9B,EAAS,EAAO,qBACN,YAAkB,GAAE,SAC9B,GAAU,IARV,EAAS,KAAK,iBAAiB,qBAUhC,KAAK,4BAA4B,GACjC,KAAK,wBAGD,KAAK,QAAQ,kBAChB,KAAK,gCAAgC,GAG/B,MAQR,4BAA6B,SAAU,GACtC,GAAI,GAAI,CAGR,KAAK,IAAM,GAOV,IADA,EAAS,EAAO,GAAI,SACb,GACN,EAAO,kBAAmB,EAC1B,EAAS,EAAO,UAWnB,gCAAiC,SAAU,GAC1C,GAAI,GAAI,CAER,KAAK,IAAM,GACV,EAAQ,EAAO,GAGX,KAAK,SAAS,IAEjB,EAAM,QAAQ,KAAK,oBAAoB,OAM3C,EAAE,OAAO,SAQR,mBAAoB,SAAU,EAAS,GACtC,GAAI,GAAO,KAAK,QAAQ,IAcxB,OAZA,GAAE,WAAW,EAAM,GAEnB,KAAK,QAAQ,GAMT,GAA2B,KAAK,UACnC,KAAK,SAAS,OAAO,gBAAgB,MAG/B","file":"dist/leaflet.markercluster.js"} \ No newline at end of file diff --git a/src/components/plugin/magicMarker.css b/src/components/plugin/magicMarker.css new file mode 100644 index 0000000..b379bf1 --- /dev/null +++ b/src/components/plugin/magicMarker.css @@ -0,0 +1,13 @@ +.magicDiv{ + height: 0; + width: 0; +} +.magicIcon{ + position:relative; + top:-5px; + left:-16px; +} +.leaflet-div-icon{ + background: transparent; + border:none; +} diff --git a/src/components/plugin/prune-cluster/LeafletStyleSheet.css b/src/components/plugin/prune-cluster/LeafletStyleSheet.css new file mode 100644 index 0000000..877bedb --- /dev/null +++ b/src/components/plugin/prune-cluster/LeafletStyleSheet.css @@ -0,0 +1,69 @@ +.prunecluster { + font-size: 12px; + border-radius: 20px; + transition: all 0.3s linear; +} +.leaflet-marker-icon.prunecluster-anim, +.leaflet-marker-shadow.prunecluster-anim, +.leaflet-markercluster-icon.prunecluster-anim { + transition: all 0.3s linear; +} + +.leaflet-zoom-anim .leaflet-zoom-animated.leaflet-marker-icon, +.leaflet-zoom-anim .leaflet-zoom-animated.leaflet-marker-shadow, +.leaflet-zoom-anim .leaflet-zoom-animated.leaflet-markercluster-icon { + transition: transform 0.25s cubic-bezier(0,0,0.25,1); +} +.prunecluster div { + width: 30px; + height: 30px; + text-align: center; + margin-left: 5px; + margin-top: 5px; + border-radius: 50%; +} +.prunecluster div span { + line-height: 30px; +} + +.prunecluster-small { + background-color: #b5e28c; + background-color: rgba(181, 226, 140, 0.6); +} + +.prunecluster-small div { + width: 28px; + height: 28px; + background-color: #6ecc39; + background-color: rgba(110, 204, 57, 0.6); +} + +.prunecluster-small div span { + line-height: 28px; +} + +.prunecluster-medium { + background-color: #f1d357; + background-color: rgba(241, 211, 87, 0.6); +} + +.prunecluster-medium div { + background-color: #f0c20c; + background-color: rgba(240, 194, 12, 0.6); +} + +.prunecluster-large { + background-color: #fd9c73; + background-color: rgba(253, 156, 115, 0.6); +} + +.prunecluster-large div { + width: 34px; + height: 34px; + background-color: #f18017; + background-color: rgba(241, 128, 23, 0.6); +} + +.prunecluster-large div span { + line-height: 34px; +} diff --git a/src/components/plugin/prune-cluster/PruneCluster.js b/src/components/plugin/prune-cluster/PruneCluster.js new file mode 100644 index 0000000..539077b --- /dev/null +++ b/src/components/plugin/prune-cluster/PruneCluster.js @@ -0,0 +1,930 @@ +/* eslint-disable */ +let __extends = (this && this.__extends) || (function () { + let extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b }) || + function (d, b) { for (let p in b) if (b.hasOwnProperty(p)) d[p] = b[p] } + return function (d, b) { + extendStatics(d, b) + function __() { this.constructor = d } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()) + } +})() +export let PruneCluster; +(function (PruneCluster_1) { + let Point = (function () { + function Point() { + } + return Point + }()) + PruneCluster_1.Point = Point + let ClusterObject = (function () { + function ClusterObject() { + } + return ClusterObject + }()) + PruneCluster_1.ClusterObject = ClusterObject + let hashCodeCounter = 1 + let maxHashCodeValue = Math.pow(2, 53) - 1 + let Marker = (function (_super) { + __extends(Marker, _super) + function Marker(lat, lng, data, category, weight, filtered) { + if (data === void 0) { data = {} } + if (weight === void 0) { weight = 1 } + if (filtered === void 0) { filtered = false } + let _this = _super.call(this) || this + _this.data = data + _this.position = { lat: +lat, lng: +lng } + _this.weight = weight + _this.category = category + _this.filtered = filtered + _this.hashCode = hashCodeCounter++ + return _this + } + Marker.prototype.Move = function (lat, lng) { + this.position.lat = +lat + this.position.lng = +lng + } + Marker.prototype.SetData = function (data) { + for (let key in data) { + this.data[key] = data[key] + } + } + return Marker + }(ClusterObject)) + PruneCluster_1.Marker = Marker + let Cluster = (function (_super) { + __extends(Cluster, _super) + function Cluster(marker) { + let _this = _super.call(this) || this + _this.stats = [0, 0, 0, 0, 0, 0, 0, 0] + _this.data = {} + if (!marker) { + _this.hashCode = 1 + if (Cluster.ENABLE_MARKERS_LIST) { + _this._clusterMarkers = [] + } + return _this + } + if (Cluster.ENABLE_MARKERS_LIST) { + _this._clusterMarkers = [marker] + } + _this.lastMarker = marker + _this.hashCode = 31 + marker.hashCode + _this.population = 1 + if (marker.category !== undefined) { + _this.stats[marker.category] = 1 + } + _this.totalWeight = marker.weight + _this.position = { + lat: marker.position.lat, + lng: marker.position.lng + } + _this.averagePosition = { + lat: marker.position.lat, + lng: marker.position.lng + } + return _this + } + Cluster.prototype.AddMarker = function (marker) { + if (Cluster.ENABLE_MARKERS_LIST) { + this._clusterMarkers.push(marker) + } + let h = this.hashCode + h = ((h << 5) - h) + marker.hashCode + if (h >= maxHashCodeValue) { + this.hashCode = h % maxHashCodeValue + } else { + this.hashCode = h + } + this.lastMarker = marker + let weight = marker.weight, currentTotalWeight = this.totalWeight, newWeight = weight + currentTotalWeight + this.averagePosition.lat = + (this.averagePosition.lat * currentTotalWeight + + marker.position.lat * weight) / newWeight + this.averagePosition.lng = + (this.averagePosition.lng * currentTotalWeight + + marker.position.lng * weight) / newWeight + ++this.population + this.totalWeight = newWeight + if (marker.category !== undefined) { + this.stats[marker.category] = (this.stats[marker.category] + 1) || 1 + } + } + Cluster.prototype.Reset = function () { + this.hashCode = 1 + this.lastMarker = undefined + this.population = 0 + this.totalWeight = 0 + this.stats = [0, 0, 0, 0, 0, 0, 0, 0] + if (Cluster.ENABLE_MARKERS_LIST) { + this._clusterMarkers = [] + } + } + Cluster.prototype.ComputeBounds = function (cluster) { + let proj = cluster.Project(this.position.lat, this.position.lng) + let size = cluster.Size + let nbX = Math.floor(proj.x / size), nbY = Math.floor(proj.y / size), startX = nbX * size, startY = nbY * size + let a = cluster.UnProject(startX, startY), b = cluster.UnProject(startX + size, startY + size) + this.bounds = { + minLat: b.lat, + maxLat: a.lat, + minLng: a.lng, + maxLng: b.lng + } + } + Cluster.prototype.GetClusterMarkers = function () { + return this._clusterMarkers + } + Cluster.prototype.ApplyCluster = function (newCluster) { + this.hashCode = this.hashCode * 41 + newCluster.hashCode * 43 + if (this.hashCode > maxHashCodeValue) { + this.hashCode = this.hashCode = maxHashCodeValue + } + let weight = newCluster.totalWeight, currentTotalWeight = this.totalWeight, newWeight = weight + currentTotalWeight + this.averagePosition.lat = + (this.averagePosition.lat * currentTotalWeight + + newCluster.averagePosition.lat * weight) / newWeight + this.averagePosition.lng = + (this.averagePosition.lng * currentTotalWeight + + newCluster.averagePosition.lng * weight) / newWeight + this.population += newCluster.population + this.totalWeight = newWeight + this.bounds.minLat = Math.min(this.bounds.minLat, newCluster.bounds.minLat) + this.bounds.minLng = Math.min(this.bounds.minLng, newCluster.bounds.minLng) + this.bounds.maxLat = Math.max(this.bounds.maxLat, newCluster.bounds.maxLat) + this.bounds.maxLng = Math.max(this.bounds.maxLng, newCluster.bounds.maxLng) + for (let category in newCluster.stats) { + if (newCluster.stats.hasOwnProperty(category)) { + if (this.stats.hasOwnProperty(category)) { + this.stats[category] += newCluster.stats[category] + } else { + this.stats[category] = newCluster.stats[category] + } + } + } + if (Cluster.ENABLE_MARKERS_LIST) { + this._clusterMarkers = this._clusterMarkers.concat(newCluster.GetClusterMarkers()) + } + } + Cluster.ENABLE_MARKERS_LIST = false + return Cluster + }(ClusterObject)) + PruneCluster_1.Cluster = Cluster + function checkPositionInsideBounds(a, b) { + return (a.lat >= b.minLat && a.lat <= b.maxLat) && + a.lng >= b.minLng && a.lng <= b.maxLng + } + function insertionSort(list) { + for (let i = 1, j, tmp, tmpLng, length = list.length; i < length; ++i) { + tmp = list[i] + tmpLng = tmp.position.lng + for (j = i - 1; j >= 0 && list[j].position.lng > tmpLng; --j) { + list[j + 1] = list[j] + } + list[j + 1] = tmp + } + } + function shouldUseInsertionSort(total, nbChanges) { + if (nbChanges > 300) { + return false + } else { + return (nbChanges / total) < 0.2 + } + } + let PruneCluster = (function () { + function PruneCluster() { + this._markers = [] + this._nbChanges = 0 + this._clusters = [] + this.Size = 166 + this.ViewPadding = 0.2 + } + PruneCluster.prototype.RegisterMarker = function (marker) { + if (marker._removeFlag) { + delete marker._removeFlag + } + this._markers.push(marker) + this._nbChanges += 1 + } + PruneCluster.prototype.RegisterMarkers = function (markers) { + let _this = this + markers.forEach(function (marker) { + _this.RegisterMarker(marker) + }) + } + PruneCluster.prototype._sortMarkers = function () { + let markers = this._markers, length = markers.length + if (this._nbChanges && !shouldUseInsertionSort(length, this._nbChanges)) { + this._markers.sort(function (a, b) { return a.position.lng - b.position.lng }) + } else { + insertionSort(markers) + } + this._nbChanges = 0 + } + PruneCluster.prototype._sortClusters = function () { + insertionSort(this._clusters) + } + PruneCluster.prototype._indexLowerBoundLng = function (lng) { + let markers = this._markers, it, step, first = 0, count = markers.length + while (count > 0) { + step = Math.floor(count / 2) + it = first + step + if (markers[it].position.lng < lng) { + first = ++it + count -= step + 1 + } else { + count = step + } + } + return first + } + PruneCluster.prototype._resetClusterViews = function () { + for (let i = 0, l = this._clusters.length; i < l; ++i) { + let cluster = this._clusters[i] + cluster.Reset() + cluster.ComputeBounds(this) + } + } + PruneCluster.prototype.ProcessView = function (bounds) { + let heightBuffer = Math.abs(bounds.maxLat - bounds.minLat) * this.ViewPadding, widthBuffer = Math.abs(bounds.maxLng - bounds.minLng) * this.ViewPadding + let extendedBounds = { + minLat: bounds.minLat - heightBuffer - heightBuffer, + maxLat: bounds.maxLat + heightBuffer + heightBuffer, + minLng: bounds.minLng - widthBuffer - widthBuffer, + maxLng: bounds.maxLng + widthBuffer + widthBuffer + } + this._sortMarkers() + this._resetClusterViews() + let firstIndex = this._indexLowerBoundLng(extendedBounds.minLng) + let markers = this._markers, clusters = this._clusters + let workingClusterList = clusters.slice(0) + for (let i = firstIndex, l = markers.length; i < l; ++i) { + let marker = markers[i], markerPosition = marker.position + if (markerPosition.lng > extendedBounds.maxLng) { + break + } + if (markerPosition.lat > extendedBounds.minLat && + markerPosition.lat < extendedBounds.maxLat && + !marker.filtered) { + let clusterFound = false, cluster + for (let j = 0, ll = workingClusterList.length; j < ll; ++j) { + cluster = workingClusterList[j] + if (cluster.bounds.maxLng < marker.position.lng) { + workingClusterList.splice(j, 1) + --j + --ll + continue + } + if (checkPositionInsideBounds(markerPosition, cluster.bounds)) { + cluster.AddMarker(marker) + clusterFound = true + break + } + } + if (!clusterFound) { + cluster = new Cluster(marker) + cluster.ComputeBounds(this) + clusters.push(cluster) + workingClusterList.push(cluster) + } + } + } + let newClustersList = [] + for (i = 0, l = clusters.length; i < l; ++i) { + let cluster = clusters[i] + if (cluster.population > 0) { + newClustersList.push(cluster) + } + } + this._clusters = newClustersList + this._sortClusters() + return this._clusters + } + PruneCluster.prototype.RemoveMarkers = function (markers) { + if (!markers) { + this._markers = [] + return + } + for (let i = 0, l = markers.length; i < l; ++i) { + markers[i]._removeFlag = true + } + let newMarkersList = [] + for (i = 0, l = this._markers.length; i < l; ++i) { + if (!this._markers[i]._removeFlag) { + newMarkersList.push(this._markers[i]) + } else { + delete this._markers[i]._removeFlag + } + } + this._markers = newMarkersList + } + PruneCluster.prototype.FindMarkersInArea = function (area) { + let aMinLat = area.minLat, aMaxLat = area.maxLat, aMinLng = area.minLng, aMaxLng = area.maxLng, markers = this._markers, result = [] + let firstIndex = this._indexLowerBoundLng(aMinLng) + for (let i = firstIndex, l = markers.length; i < l; ++i) { + let pos = markers[i].position + if (pos.lng > aMaxLng) { + break + } + if (pos.lat >= aMinLat && pos.lat <= aMaxLat && + pos.lng >= aMinLng) { + result.push(markers[i]) + } + } + return result + } + PruneCluster.prototype.ComputeBounds = function (markers, withFiltered) { + if (withFiltered === void 0) { withFiltered = true } + if (!markers || !markers.length) { + return null + } + let rMinLat = Number.MAX_VALUE, rMaxLat = -Number.MAX_VALUE, rMinLng = Number.MAX_VALUE, rMaxLng = -Number.MAX_VALUE + for (let i = 0, l = markers.length; i < l; ++i) { + if (!withFiltered && markers[i].filtered) { + continue + } + let pos = markers[i].position + if (pos.lat < rMinLat) { rMinLat = pos.lat } + if (pos.lat > rMaxLat) { rMaxLat = pos.lat } + if (pos.lng < rMinLng) { rMinLng = pos.lng } + if (pos.lng > rMaxLng) { rMaxLng = pos.lng } + } + return { + minLat: rMinLat, + maxLat: rMaxLat, + minLng: rMinLng, + maxLng: rMaxLng + } + } + PruneCluster.prototype.FindMarkersBoundsInArea = function (area) { + return this.ComputeBounds(this.FindMarkersInArea(area)) + } + PruneCluster.prototype.ComputeGlobalBounds = function (withFiltered) { + if (withFiltered === void 0) { withFiltered = true } + return this.ComputeBounds(this._markers, withFiltered) + } + PruneCluster.prototype.GetMarkers = function () { + return this._markers + } + PruneCluster.prototype.GetPopulation = function () { + return this._markers.length + } + PruneCluster.prototype.ResetClusters = function () { + this._clusters = [] + } + return PruneCluster + }()) + PruneCluster_1.PruneCluster = PruneCluster +})(PruneCluster || (PruneCluster = {})) + +// let PruneCluster; +// (function (PruneCluster) { +// })(PruneCluster || (PruneCluster = {})); + +export let PruneClusterForLeaflet = (L.Layer ? L.Layer : L.Class).extend({ + initialize: function (size, clusterMargin) { + let _this = this + if (size === void 0) { size = 120 } + if (clusterMargin === void 0) { clusterMargin = 20 } + this.Cluster = new PruneCluster.PruneCluster() + this.Cluster.Size = size + this.clusterMargin = Math.min(clusterMargin, size / 4) + this.Cluster.Project = function (lat, lng) { + return _this._map.project(new L.LatLng(lat, lng), Math.floor(_this._map.getZoom())) + } + this.Cluster.UnProject = function (x, y) { + return _this._map.unproject(new L.Point(x, y), Math.floor(_this._map.getZoom())) + } + this._objectsOnMap = [] + this.spiderfier = new PruneClusterLeafletSpiderfier(this) + this._hardMove = false + this._resetIcons = false + this._removeTimeoutId = 0 + this._markersRemoveListTimeout = [] + }, + RegisterMarker: function (marker) { + this.Cluster.RegisterMarker(marker) + }, + RegisterMarkers: function (markers) { + this.Cluster.RegisterMarkers(markers) + }, + RemoveMarkers: function (markers) { + this.Cluster.RemoveMarkers(markers) + }, + BuildLeafletCluster: function (cluster, position) { + let _this = this + let m = new L.Marker(position, { + icon: this.BuildLeafletClusterIcon(cluster) + }) + m._leafletClusterBounds = cluster.bounds + m.on('click', function () { + let cbounds = m._leafletClusterBounds + let markersArea = _this.Cluster.FindMarkersInArea(cbounds) + let b = _this.Cluster.ComputeBounds(markersArea) + if (b) { + let bounds = new L.LatLngBounds(new L.LatLng(b.minLat, b.maxLng), new L.LatLng(b.maxLat, b.minLng)) + let zoomLevelBefore = _this._map.getZoom(), zoomLevelAfter = _this._map.getBoundsZoom(bounds, false, new L.Point(20, 20)) + if (zoomLevelAfter === zoomLevelBefore) { + let filteredBounds = [] + for (let i = 0, l = _this._objectsOnMap.length; i < l; ++i) { + let o = _this._objectsOnMap[i] + if (o.data._leafletMarker !== m) { + if (o.bounds.minLat >= cbounds.minLat && + o.bounds.maxLat <= cbounds.maxLat && + o.bounds.minLng >= cbounds.minLng && + o.bounds.maxLng <= cbounds.maxLng) { + filteredBounds.push(o.bounds) + } + } + } + if (filteredBounds.length > 0) { + let newMarkersArea = [] + let ll = filteredBounds.length + for (i = 0, l = markersArea.length; i < l; ++i) { + let markerPos = markersArea[i].position + let isFiltered = false + for (let j = 0; j < ll; ++j) { + let currentFilteredBounds = filteredBounds[j] + if (markerPos.lat >= currentFilteredBounds.minLat && + markerPos.lat <= currentFilteredBounds.maxLat && + markerPos.lng >= currentFilteredBounds.minLng && + markerPos.lng <= currentFilteredBounds.maxLng) { + isFiltered = true + break + } + } + if (!isFiltered) { + newMarkersArea.push(markersArea[i]) + } + } + markersArea = newMarkersArea + } + if (markersArea.length < 200 || zoomLevelAfter >= _this._map.getMaxZoom()) { + _this._map.fire('overlappingmarkers', { + cluster: _this, + markers: markersArea, + center: m.getLatLng(), + marker: m + }) + } else { + zoomLevelAfter++ + } + _this._map.setView(m.getLatLng(), zoomLevelAfter) + } else { + _this._map.fitBounds(bounds) + } + } + }) + return m + }, + BuildLeafletClusterIcon: function (cluster) { + let c = 'prunecluster prunecluster-' + let iconSize = 38 + let maxPopulation = this.Cluster.GetPopulation() + if (cluster.population < Math.max(10, maxPopulation * 0.01)) { + c += 'small' + } else if (cluster.population < Math.max(100, maxPopulation * 0.05)) { + c += 'medium' + iconSize = 40 + } else { + c += 'large' + iconSize = 44 + } + return new L.DivIcon({ + html: '<div><span>' + cluster.population + '</span></div>', + className: c, + iconSize: L.point(iconSize, iconSize) + }) + }, + BuildLeafletMarker: function (marker, position) { + let m = new L.Marker(position) + this.PrepareLeafletMarker(m, marker.data, marker.category) + return m + }, + PrepareLeafletMarker: function (marker, data, category) { + if (data.icon) { + if (typeof data.icon === 'function') { + marker.setIcon(data.icon(data, category)) + } else { + marker.setIcon(data.icon) + } + } + if (data.popup) { + let content = typeof data.popup === 'function' ? data.popup(data, category) : data.popup + if (marker.getPopup()) { + marker.setPopupContent(content, data.popupOptions) + } else { + marker.bindPopup(content, data.popupOptions) + } + } + }, + onAdd: function (map) { + this._map = map + map.on('movestart', this._moveStart, this) + map.on('moveend', this._moveEnd, this) + map.on('zoomend', this._zoomStart, this) + map.on('zoomend', this._zoomEnd, this) + this.ProcessView() + map.addLayer(this.spiderfier) + }, + onRemove: function (map) { + map.off('movestart', this._moveStart, this) + map.off('moveend', this._moveEnd, this) + map.off('zoomend', this._zoomStart, this) + map.off('zoomend', this._zoomEnd, this) + for (let i = 0, l = this._objectsOnMap.length; i < l; ++i) { + map.removeLayer(this._objectsOnMap[i].data._leafletMarker) + } + this._objectsOnMap = [] + this.Cluster.ResetClusters() + map.removeLayer(this.spiderfier) + this._map = null + }, + _moveStart: function () { + this._moveInProgress = true + }, + _moveEnd: function (e) { + this._moveInProgress = false + this._hardMove = e.hard + this.ProcessView() + }, + _zoomStart: function () { + this._zoomInProgress = true + }, + _zoomEnd: function () { + this._zoomInProgress = false + this.ProcessView() + }, + ProcessView: function () { + let _this = this + if (!this._map || this._zoomInProgress || this._moveInProgress) { + return + } + let map = this._map, bounds = map.getBounds(), zoom = Math.floor(map.getZoom()), marginRatio = this.clusterMargin / this.Cluster.Size, resetIcons = this._resetIcons + let southWest = bounds.getSouthWest(), northEast = bounds.getNorthEast() + let clusters = this.Cluster.ProcessView({ + minLat: southWest.lat, + minLng: southWest.lng, + maxLat: northEast.lat, + maxLng: northEast.lng + }) + let objectsOnMap = this._objectsOnMap, newObjectsOnMap = [], markersOnMap = new Array(objectsOnMap.length) + for (let i = 0, l = objectsOnMap.length; i < l; ++i) { + let marker = objectsOnMap[i].data._leafletMarker + markersOnMap[i] = marker + marker._removeFromMap = true + } + let clusterCreationList = [] + let clusterCreationListPopOne = [] + let opacityUpdateList = [] + let workingList = [] + for (i = 0, l = clusters.length; i < l; ++i) { + let icluster = clusters[i], iclusterData = icluster.data + let latMargin = (icluster.bounds.maxLat - icluster.bounds.minLat) * marginRatio, lngMargin = (icluster.bounds.maxLng - icluster.bounds.minLng) * marginRatio + for (let j = 0, ll = workingList.length; j < ll; ++j) { + let c = workingList[j] + if (c.bounds.maxLng < icluster.bounds.minLng) { + workingList.splice(j, 1) + --j + --ll + continue + } + let oldMaxLng = c.averagePosition.lng + lngMargin, oldMinLat = c.averagePosition.lat - latMargin, oldMaxLat = c.averagePosition.lat + latMargin, newMinLng = icluster.averagePosition.lng - lngMargin, newMinLat = icluster.averagePosition.lat - latMargin, newMaxLat = icluster.averagePosition.lat + latMargin + if (oldMaxLng > newMinLng && oldMaxLat > newMinLat && oldMinLat < newMaxLat) { + iclusterData._leafletCollision = true + c.ApplyCluster(icluster) + break + } + } + if (!iclusterData._leafletCollision) { + workingList.push(icluster) + } + } + clusters.forEach(function (cluster) { + let m = undefined + let data = cluster.data + if (data._leafletCollision) { + data._leafletCollision = false + data._leafletOldPopulation = 0 + data._leafletOldHashCode = 0 + return + } + let position = new L.LatLng(cluster.averagePosition.lat, cluster.averagePosition.lng) + let oldMarker = data._leafletMarker + if (oldMarker) { + if (cluster.population === 1 && data._leafletOldPopulation === 1 && cluster.hashCode === oldMarker._hashCode) { + if (resetIcons || oldMarker._zoomLevel !== zoom || cluster.lastMarker.data.forceIconRedraw) { + _this.PrepareLeafletMarker(oldMarker, cluster.lastMarker.data, cluster.lastMarker.category) + if (cluster.lastMarker.data.forceIconRedraw) { + cluster.lastMarker.data.forceIconRedraw = false + } + } + oldMarker.setLatLng(position) + m = oldMarker + } else if (cluster.population > 1 && data._leafletOldPopulation > 1 && (oldMarker._zoomLevel === zoom || + data._leafletPosition.equals(position))) { + oldMarker.setLatLng(position) + if (resetIcons || cluster.population != data._leafletOldPopulation || + cluster.hashCode !== data._leafletOldHashCode) { + let boundsCopy = {} + L.Util.extend(boundsCopy, cluster.bounds) + oldMarker._leafletClusterBounds = boundsCopy + oldMarker.setIcon(_this.BuildLeafletClusterIcon(cluster)) + } + data._leafletOldPopulation = cluster.population + data._leafletOldHashCode = cluster.hashCode + m = oldMarker + } + } + if (!m) { + if (cluster.population === 1) { + clusterCreationListPopOne.push(cluster) + } else { + clusterCreationList.push(cluster) + } + data._leafletPosition = position + data._leafletOldPopulation = cluster.population + data._leafletOldHashCode = cluster.hashCode + } else { + m._removeFromMap = false + newObjectsOnMap.push(cluster) + m._zoomLevel = zoom + m._hashCode = cluster.hashCode + m._population = cluster.population + data._leafletMarker = m + data._leafletPosition = position + } + }) + clusterCreationList = clusterCreationListPopOne.concat(clusterCreationList) + for (i = 0, l = objectsOnMap.length; i < l; ++i) { + let icluster = objectsOnMap[i] + let idata = icluster.data + let marker = idata._leafletMarker + if (idata._leafletMarker._removeFromMap) { + let remove = true + if (marker._zoomLevel === zoom) { + let pa = icluster.averagePosition + let latMargin = (icluster.bounds.maxLat - icluster.bounds.minLat) * marginRatio, + lngMargin = (icluster.bounds.maxLng - icluster.bounds.minLng) * marginRatio + let ll= clusterCreationList.length + for (let j = 0; j < ll; ++j) { + let jcluster = clusterCreationList[j], jdata = jcluster.data + if (marker._population === 1 && jcluster.population === 1 && + marker._hashCode === jcluster.hashCode) { + if (resetIcons || jcluster.lastMarker.data.forceIconRedraw) { + this.PrepareLeafletMarker(marker, jcluster.lastMarker.data, jcluster.lastMarker.category) + if (jcluster.lastMarker.data.forceIconRedraw) { + jcluster.lastMarker.data.forceIconRedraw = false + } + } + marker.setLatLng(jdata._leafletPosition) + remove = false + } else { + let pb = jcluster.averagePosition + let oldMinLng = pa.lng - lngMargin, newMaxLng = pb.lng + lngMargin + let oldMaxLng = pa.lng + lngMargin + let oldMinLat = pa.lat - latMargin + let oldMaxLat = pa.lat + latMargin + let newMinLng = pb.lng - lngMargin + let newMinLat = pb.lat - latMargin + let newMaxLat = pb.lat + latMargin + if ((marker._population > 1 && jcluster.population > 1) && + (oldMaxLng > newMinLng && oldMinLng < newMaxLng && oldMaxLat > newMinLat && oldMinLat < newMaxLat)) { + marker.setLatLng(jdata._leafletPosition) + marker.setIcon(this.BuildLeafletClusterIcon(jcluster)) + let poisson = {} + L.Util.extend(poisson, jcluster.bounds) + marker._leafletClusterBounds = poisson + jdata._leafletOldPopulation = jcluster.population + jdata._leafletOldHashCode = jcluster.hashCode + marker._population = jcluster.population + remove = false + } + } + if (!remove) { + jdata._leafletMarker = marker + marker._removeFromMap = false + newObjectsOnMap.push(jcluster) + clusterCreationList.splice(j, 1) + --j + --ll + break + } + } + } + if (remove) { + if (!marker._removeFromMap) { console.error('wtf') } + } + } + } + for (i = 0, l = clusterCreationList.length; i < l; ++i) { + let icluster = clusterCreationList[i] + let idata = icluster.data + let iposition = idata._leafletPosition + let creationMarker + if (icluster.population === 1) { + creationMarker = this.BuildLeafletMarker(icluster.lastMarker, iposition) + } else { + creationMarker = this.BuildLeafletCluster(icluster, iposition) + } + creationMarker.addTo(map) + creationMarker.setOpacity(0) + opacityUpdateList.push(creationMarker) + idata._leafletMarker = creationMarker + creationMarker._zoomLevel = zoom + creationMarker._hashCode = icluster.hashCode + creationMarker._population = icluster.population + newObjectsOnMap.push(icluster) + } + window.setTimeout(function () { + for (i = 0, l = opacityUpdateList.length; i < l; ++i) { + let m = opacityUpdateList[i] + if (m._icon) { L.DomUtil.addClass(m._icon, 'prunecluster-anim') } + if (m._shadow) { L.DomUtil.addClass(m._shadow, 'prunecluster-anim') } + m.setOpacity(1) + } + }, 1) + if (this._hardMove) { + for (i = 0, l = markersOnMap.length; i < l; ++i) { + let marker = markersOnMap[i] + if (marker._removeFromMap) { + map.removeLayer(marker) + } + } + } else { + if (this._removeTimeoutId !== 0) { + window.clearTimeout(this._removeTimeoutId) + for (i = 0, l = this._markersRemoveListTimeout.length; i < l; ++i) { + map.removeLayer(this._markersRemoveListTimeout[i]) + } + } + let toRemove = [] + for (i = 0, l = markersOnMap.length; i < l; ++i) { + let marker = markersOnMap[i] + if (marker._removeFromMap) { + marker.setOpacity(0) + toRemove.push(marker) + } + } + if (toRemove.length > 0) { + this._removeTimeoutId = window.setTimeout(function () { + for (i = 0, l = toRemove.length; i < l; ++i) { + map.removeLayer(toRemove[i]) + } + _this._removeTimeoutId = 0 + }, 300) + } + this._markersRemoveListTimeout = toRemove + } + this._objectsOnMap = newObjectsOnMap + this._hardMove = false + this._resetIcons = false + }, + FitBounds: function (withFiltered) { + if (withFiltered === void 0) { withFiltered = true } + let bounds = this.Cluster.ComputeGlobalBounds(withFiltered) + if (bounds) { + this._map.fitBounds(new L.LatLngBounds(new L.LatLng(bounds.minLat, bounds.maxLng), new L.LatLng(bounds.maxLat, bounds.minLng))) + } + }, + GetMarkers: function () { + return this.Cluster.GetMarkers() + }, + RedrawIcons: function (processView) { + if (processView === void 0) { processView = true } + this._resetIcons = true + if (processView) { + this.ProcessView() + } + } +}) +export let PruneClusterLeafletSpiderfier = (L.Layer ? L.Layer : L.Class).extend({ + _2PI: Math.PI * 2, + _circleFootSeparation: 25, + _circleStartAngle: Math.PI / 6, + _spiralFootSeparation: 28, + _spiralLengthStart: 11, + _spiralLengthFactor: 5, + _spiralCountTrigger: 8, + spiderfyDistanceMultiplier: 1, + initialize: function (cluster) { + this._cluster = cluster + this._currentMarkers = [] + this._multiLines = !!L.multiPolyline + this._lines = this._multiLines + ? L.multiPolyline([], { weight: 1.5, color: '#222' }) + : L.polyline([], { weight: 1.5, color: '#222' }) + }, + onAdd: function (map) { + this._map = map + this._map.on('overlappingmarkers', this.Spiderfy, this) + this._map.on('click', this.Unspiderfy, this) + this._map.on('zoomend', this.Unspiderfy, this) + }, + Spiderfy: function (data) { + let _this = this + if (data.cluster !== this._cluster) { + return + } + this.Unspiderfy() + let markers = data.markers.filter(function (marker) { + return !marker.filtered + }) + this._currentCenter = data.center + let centerPoint = this._map.latLngToLayerPoint(data.center) + let points + if (markers.length >= this._spiralCountTrigger) { + points = this._generatePointsSpiral(markers.length, centerPoint) + } else { + if (this._multiLines) { + centerPoint.y += 10 + } + points = this._generatePointsCircle(markers.length, centerPoint) + } + let polylines = [] + let leafletMarkers = [] + let projectedPoints = [] + for (let i = 0, l = points.length; i < l; ++i) { + let pos = this._map.layerPointToLatLng(points[i]) + let m = this._cluster.BuildLeafletMarker(markers[i], data.center) + m.setZIndexOffset(5000) + m.setOpacity(0) + this._currentMarkers.push(m) + this._map.addLayer(m) + leafletMarkers.push(m) + projectedPoints.push(pos) + } + window.setTimeout(function () { + for (i = 0, l = points.length; i < l; ++i) { + leafletMarkers[i].setLatLng(projectedPoints[i]) + .setOpacity(1) + } + let startTime = +new Date() + let interval = 42, duration = 290 + let anim = window.setInterval(function () { + polylines = [] + let now = +new Date() + let d = now - startTime + if (d >= duration) { + window.clearInterval(anim) + let stepRatio = 1.0 + } else { + let stepRatio = d / duration + } + let center = data.center + for (i = 0, l = points.length; i < l; ++i) { + let p = projectedPoints[i], diffLat = p.lat - center.lat, diffLng = p.lng - center.lng + polylines.push([center, new L.LatLng(center.lat + diffLat * stepRatio, center.lng + diffLng * stepRatio)]) + } + _this._lines.setLatLngs(polylines) + }, interval) + }, 1) + this._lines.setLatLngs(polylines) + this._map.addLayer(this._lines) + if (data.marker) { + this._clusterMarker = data.marker.setOpacity(0.3) + } + }, + _generatePointsCircle: function (count, centerPt) { + let circumference = this.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + count), legLength = circumference / this._2PI, angleStep = this._2PI / count, res = [], i, angle + res.length = count + for (i = count - 1; i >= 0; i--) { + angle = this._circleStartAngle + i * angleStep + res[i] = new L.Point(Math.round(centerPt.x + legLength * Math.cos(angle)), Math.round(centerPt.y + legLength * Math.sin(angle))) + } + return res + }, + _generatePointsSpiral: function (count, centerPt) { + let legLength = this.spiderfyDistanceMultiplier * this._spiralLengthStart, separation = this.spiderfyDistanceMultiplier * this._spiralFootSeparation, lengthFactor = this.spiderfyDistanceMultiplier * this._spiralLengthFactor, angle = 0, res = [], i + res.length = count + for (i = count - 1; i >= 0; i--) { + angle += separation / legLength + i * 0.0005 + res[i] = new L.Point(Math.round(centerPt.x + legLength * Math.cos(angle)), Math.round(centerPt.y + legLength * Math.sin(angle))) + legLength += this._2PI * lengthFactor / angle + } + return res + }, + Unspiderfy: function () { + let _this = this + for (let i = 0, l = this._currentMarkers.length; i < l; ++i) { + this._currentMarkers[i].setLatLng(this._currentCenter).setOpacity(0) + } + let markers = this._currentMarkers + window.setTimeout(function () { + for (i = 0, l = markers.length; i < l; ++i) { + _this._map.removeLayer(markers[i]) + } + }, 300) + this._currentMarkers = [] + this._map.removeLayer(this._lines) + if (this._clusterMarker) { + this._clusterMarker.setOpacity(1) + } + }, + onRemove: function (map) { + this.Unspiderfy() + map.off('overlappingmarkers', this.Spiderfy, this) + map.off('click', this.Unspiderfy, this) + map.off('zoomend', this.Unspiderfy, this) + } +}) diff --git a/src/components/utils/AjaxUtils.js b/src/components/utils/AjaxUtils.js new file mode 100644 index 0000000..11d7517 --- /dev/null +++ b/src/components/utils/AjaxUtils.js @@ -0,0 +1,101 @@ +import $ from 'jquery' + +/** + * 瀵筳query鐨勫皝瑁卆jax鐨勪紶鏁版嵁鏂规硶 + * @param pUrl 璇锋眰鐨剈rl + * @param pData 鍙傛暟 + * @param pBackFun 鎴愬姛鍥炶皟 + */ +function post4JsonDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'post', + url: pUrl, + dataType: 'json', + data: pData, + async: true, + success: function(datas, nnn) { + pBackFun(datas) + }, + error: function(err, nnnn) { + console.error('鏁版嵁鑾峰彇澶辫触', err, pUrl) + } + }) +} + +/** + * 瀵筳query鐨勫皝瑁卆jax鐨勫彇鏁版嵁鏂规硶 + * @param pUrl 璇锋眰鐨剈rl + * @param pData 鍙傛暟 + * @param pBackFun 鎴愬姛鍥炶皟 + */ +function get4JsonDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'get', + url: pUrl, + dataType: 'json', + data: pData, + async: true, + success: function(datas, nnn) { + pBackFun(datas) + }, + error: function(err, nnnn) { + console.error('鏁版嵁鑾峰彇澶辫触', err, pUrl) + } + }) +} + +function GetDataAsynByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'GET', + url: pUrl, + data: pData, + timeout: 600000, + async: true, + success: function(datas, nnn) { + pBackFun(datas) + }, + error: function(e, nnnn) { + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} +function postDataAsynByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'post', + url: pUrl, + data: pData, + timeout: 600000, + async: true, + success: function(datas, nnn) { + pBackFun(datas) + }, + error: function(e, nnnn) { + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} + +function GetDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'GET', + url: pUrl, + data: pData, + timeout: 600000, + success: function(datas, nnn) { + pBackFun(datas) + }, + error: function(e, nnnn) { + // tmpErrJSONTextParse(e, pBackFun) // todo SGIS Server鏈変釜WFS鍥惧眰鏈嶅姟json瑙f瀽閿欒锛� 杩欓噷鏄殏鏃跺鐞嗭紝绛夎繃鍑犲ぉ榛庤��淇敼濂戒簡锛岃繖閲岄渶瑕佷慨鏀瑰洖鍘汇�� + console.log('杩斿洖鐨勯敊璇俊鎭細', e) + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} + +export default { + post4JsonDataByUrl, + get4JsonDataByUrl, + GetDataAsynByUrl, + postDataAsynByUrl, + GetDataByUrl +} diff --git a/src/components/utils/DateUtils.js b/src/components/utils/DateUtils.js new file mode 100644 index 0000000..6d6d868 --- /dev/null +++ b/src/components/utils/DateUtils.js @@ -0,0 +1,29 @@ +/** + * 鏃ユ湡鏍煎紡鍖� + * @param fmt + * @param date + * @returns {*} + */ +function dateFormat(fmt, date) { + let ret + const opt = { + 'Y+': date.getFullYear().toString(), // 骞� + 'm+': (date.getMonth() + 1).toString(), // 鏈� + 'd+': date.getDate().toString(), // 鏃� + 'H+': date.getHours().toString(), // 鏃� + 'M+': date.getMinutes().toString(), // 鍒� + 'S+': date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + } + for (let k in opt) { + ret = new RegExp('(' + k + ')').exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], (ret[1].length === 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, '0'))) + } + } + return fmt +} + +export default { + dateFormat +} diff --git a/src/components/utils/GISUtil.js b/src/components/utils/GISUtil.js new file mode 100644 index 0000000..c808bfd --- /dev/null +++ b/src/components/utils/GISUtil.js @@ -0,0 +1,156 @@ +// ==============鍧愭爣绯昏浆鎹�=============== +var GSP = { + PI: 3.14159265358979324, + x_pi: 3.14159265358979324 * 3000.0 / 180.0, + delta: function(lat, lon) { + // Krasovsky 1940 + // + // a = 6378245.0, 1/f = 298.3 + // b = a * (1 - f) + // ee = (a^2 - b^2) / a^2; + var a = 6378245.0 // a: 鍗槦妞悆鍧愭爣鎶曞奖鍒板钩闈㈠湴鍥惧潗鏍囩郴鐨勬姇褰卞洜瀛愩�� + var ee = 0.00669342162296594323 // ee: 妞悆鐨勫亸蹇冪巼銆� + var dLat = this.transformLat(lon - 105.0, lat - 35.0) + var dLon = this.transformLon(lon - 105.0, lat - 35.0) + var radLat = lat / 180.0 * this.PI + var magic = Math.sin(radLat) + magic = 1 - ee * magic * magic + var sqrtMagic = Math.sqrt(magic) + dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * this.PI) + dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * this.PI) + return { 'lat': dLat, 'lon': dLon } + }, + + // WGS-84 to GCJ-02 + gcj_encrypt: function(wgsLat, wgsLon) { + if (this.outOfChina(wgsLat, wgsLon)) { return { 'lat': wgsLat, 'lon': wgsLon } } + + var d = this.delta(wgsLat, wgsLon) + return { 'lat': wgsLat + d.lat, 'lon': wgsLon + d.lon } + }, + // GCJ-02 to WGS-84 + gcj_decrypt: function(gcjLat, gcjLon) { + if (this.outOfChina(gcjLat, gcjLon)) { return { 'lat': gcjLat, 'lon': gcjLon } } + + var d = this.delta(gcjLat, gcjLon) + return { 'lat': gcjLat - d.lat, 'lon': gcjLon - d.lon } + }, + // GCJ-02 to WGS-84 exactly + gcj_decrypt_exact: function(gcjLat, gcjLon) { + let initDelta = 0.01 + let threshold = 0.000000001 + let dLat = initDelta + let dLon = initDelta + let mLat = gcjLat - dLat + let mLon = gcjLon - dLon + let pLat = gcjLat + dLat + let pLon = gcjLon + dLon + let wgsLat + let wgsLon + let i = 0 + while (1) { + wgsLat = (mLat + pLat) / 2 + wgsLon = (mLon + pLon) / 2 + var tmp = this.gcj_encrypt(wgsLat, wgsLon) + dLat = tmp.lat - gcjLat + dLon = tmp.lon - gcjLon + if ((Math.abs(dLat) < threshold) && (Math.abs(dLon) < threshold)) { break } + + if (dLat > 0) pLat = wgsLat; else mLat = wgsLat + if (dLon > 0) pLon = wgsLon; else mLon = wgsLon + + if (++i > 10000) break + } + // console.log(i); + return { 'lat': wgsLat, 'lon': wgsLon } + }, + // GCJ-02 to BD-09 + bd_encrypt: function(gcjLat, gcjLon) { + let x = gcjLon + let y = gcjLat + let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * this.x_pi) + let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * this.x_pi) + let bdLon = z * Math.cos(theta) + 0.0065 + let bdLat = z * Math.sin(theta) + 0.006 + return { 'lat': bdLat, 'lon': bdLon } + }, + // BD-09 to GCJ-02 + bd_decrypt: function(bdLat, bdLon) { + let x = bdLon - 0.0065 + let y = bdLat - 0.006 + let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * this.x_pi) + let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * this.x_pi) + let gcjLon = z * Math.cos(theta) + let gcjLat = z * Math.sin(theta) + return { 'lat': gcjLat, 'lon': gcjLon } + }, + // WGS-84 to Web mercator + // mercatorLat -> y mercatorLon -> x + mercator_encrypt: function(wgsLat, wgsLon) { + let x = wgsLon * 20037508.34 / 180.0 + let y = Math.log(Math.tan((90.0 + wgsLat) * this.PI / 360.0)) / (this.PI / 180.0) + y = y * 20037508.34 / 180.0 + return { 'lat': y, 'lon': x } + /* + if ((Math.abs(wgsLon) > 180 || Math.abs(wgsLat) > 90)) + return null; + var x = 6378137.0 * wgsLon * 0.017453292519943295; + var a = wgsLat * 0.017453292519943295; + var y = 3189068.5 * Math.log((1.0 + Math.sin(a)) / (1.0 - Math.sin(a))); + return {'lat' : y, 'lon' : x}; + //*/ + }, + // Web mercator to WGS-84 + // mercatorLat -> y mercatorLon -> x + mercator_decrypt: function(mercatorLat, mercatorLon) { + var x = mercatorLon / 20037508.34 * 180.0 + var y = mercatorLat / 20037508.34 * 180.0 + y = 180 / this.PI * (2 * Math.atan(Math.exp(y * this.PI / 180.0)) - this.PI / 2) + return { 'lat': y, 'lon': x } + /* + if (Math.abs(mercatorLon) < 180 && Math.abs(mercatorLat) < 90) + return null; + if ((Math.abs(mercatorLon) > 20037508.3427892) || (Math.abs(mercatorLat) > 20037508.3427892)) + return null; + var a = mercatorLon / 6378137.0 * 57.295779513082323; + var x = a - (Math.floor(((a + 180.0) / 360.0)) * 360.0); + var y = (1.5707963267948966 - (2.0 * Math.atan(Math.exp((-1.0 * mercatorLat) / 6378137.0)))) * 57.295779513082323; + return {'lat' : y, 'lon' : x}; + //*/ + }, + // two point's distance + distance: function(latA, lonA, latB, lonB) { + var earthR = 6371000.0 + var x = Math.cos(latA * this.PI / 180.0) * Math.cos(latB * this.PI / 180.0) * Math.cos((lonA - lonB) * this.PI / 180) + var y = Math.sin(latA * this.PI / 180.0) * Math.sin(latB * this.PI / 180.0) + var s = x + y + if (s > 1) s = 1 + if (s < -1) s = -1 + var alpha = Math.acos(s) + var distance = alpha * earthR + return distance + }, + outOfChina: function(lat, lon) { + if (lon < 72.004 || lon > 137.8347) { return true } + if (lat < 0.8293 || lat > 55.8271) { return true } + return false + }, + transformLat: function(x, y) { + var ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x)) + ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0 + ret += (20.0 * Math.sin(y * this.PI) + 40.0 * Math.sin(y / 3.0 * this.PI)) * 2.0 / 3.0 + ret += (160.0 * Math.sin(y / 12.0 * this.PI) + 320 * Math.sin(y * this.PI / 30.0)) * 2.0 / 3.0 + return ret + }, + transformLon: function(x, y) { + var ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x)) + ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0 + ret += (20.0 * Math.sin(x * this.PI) + 40.0 * Math.sin(x / 3.0 * this.PI)) * 2.0 / 3.0 + ret += (150.0 * Math.sin(x / 12.0 * this.PI) + 300.0 * Math.sin(x / 30.0 * this.PI)) * 2.0 / 3.0 + return ret + } +} + +export default { + GSP +} diff --git a/src/components/utils/JsonUtils.js b/src/components/utils/JsonUtils.js new file mode 100644 index 0000000..d0cfef2 --- /dev/null +++ b/src/components/utils/JsonUtils.js @@ -0,0 +1,48 @@ +/** + * @param {Object} json + * @param {Object} type锛� 榛樿涓嶄紶 ==>鍏ㄩ儴灏忓啓;浼�1 ==>鍏ㄩ儴澶у啓;浼�2 ==>棣栧瓧姣嶅ぇ鍐� + * 灏唈son鐨刱ey鍊艰繘琛屽ぇ灏忓啓杞崲 + */ +function jsonKeysToCase(json, type) { + if (typeof json === 'object') { + var tempJson = JSON.parse(JSON.stringify(json)) + toCase(tempJson) + return tempJson + } else { + return json + } + + function toCase(json) { + if (typeof json === 'object') { + if (Array.isArray(json)) { + json.forEach(function(item) { + toCase(item) + }) + } else { + for (var key in json) { + var item = json[key] + if (typeof item === 'object') { + toCase(item) + } + delete (json[key]) + switch (type) { + case 1: + // key鍊煎叏閮ㄥぇ鍐� + json[key.toLocaleUpperCase()] = item + break + case 2: + // key鍊奸瀛楁瘝澶у啓锛屽叾浣欏皬鍐� + json[key.substring(0, 1).toLocaleUpperCase() + key.substring(1).toLocaleLowerCase()] = item + break + default: + // 榛樿key鍊煎叏閮ㄥ皬鍐� + json[key.toLocaleLowerCase()] = item + break + } + } + } + } + } +} + +export default jsonKeysToCase diff --git a/src/components/utils/MiscUtils.js b/src/components/utils/MiscUtils.js new file mode 100644 index 0000000..9752f95 --- /dev/null +++ b/src/components/utils/MiscUtils.js @@ -0,0 +1,118 @@ +// 鍙傛暟鍚嶇О:authCode 鍊�: 鎵�鏈�:0 鍖栧伐閿�鍞�:HXXT; 鐐兼补閿�鍞�:LXXT; 姹熻嫃鐭虫补:CPYXT; 閿�鍞崕涓�:XSHD +let SysAuthCode = '0' +/** + * Created by liangruizhe on 2019/01/14 + */ +// ==============鏃堕棿=============== +// 鑾峰彇褰撳墠鏃堕棿 +function GetCurrentTime() { + var today = new Date() + var year = today.getFullYear() + var month = today.getMonth() + 1 + var day = today.getDate() > 9 ? today.getDate() : '0' + today.getDate() + var hours = today.getHours() > 9 ? today.getHours() : '0' + today.getHours() + var minutes = today.getMinutes() > 9 ? today.getMinutes() : '0' + today.getMinutes() + var seconds = today.getSeconds() > 9 ? today.getSeconds() : '0' + today.getSeconds() + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds +} +// 鑾峰彇褰撳ぉ闆剁偣鏃堕棿 +function GetCurrentDayTime() { + var today = new Date() + var year = today.getFullYear() + var month = today.getMonth() + 1 + var day = today.getDate() > 9 ? today.getDate() : '0' + today.getDate() + return year + '-' + month + '-' + day + ' 00:01:01' +} +// UtcToDateTime +function UtcToDateTime(time) { + var date = new Date(time) + var year = date.getFullYear() + var month = date.getMonth() + 1 + var day = date.getDate() + var hour = date.getHours() + var minute = date.getMinutes() + var second = date.getSeconds() + return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second +} +// UtcToMonDate +function UtcToMonDate(time) { + var date = new Date(time) + var month = date.getMonth() + 1 + var day = date.getDate() + var hour = date.getHours() + var minute = date.getMinutes() + var second = date.getSeconds() + return month + '/' + day + ' ' + hour + ':' + minute + ':' + second +} +// yyyy-MM-dd +function convertDateFromString(dateString) { + if (dateString) { + var date = new Date(dateString.replace(/-/, '/')) + return date + } +} +// yyyy-MM-dd hh:mm:ss +function convertDateTimeFromString(dateString) { + if (dateString) { + var arr1 = dateString.split(' ') + var sdate = arr1[0].split('-') + var stime = arr1[1].split(':') + var date = new Date(sdate[0], sdate[1] - 1, sdate[2], stime[0], stime[1], stime[2]) + return date + } +} +// ==============绌洪棿璁$畻=============== +// 璁$畻鐐逛覆璺濈 +function getLength(arrPnts, isJwd) { + var dist = 0 + var length = 0 + var offset = 103133.845 + var fntPnt = null + var lastPnt = null + if (isJwd === undefined) isJwd = true + if (arrPnts.length < 2) { + return 0 + } + for (var i = 0; i < arrPnts.length - 1; i++) { + fntPnt = arrPnts[i] + lastPnt = arrPnts[i + 1] + if (lastPnt) { + var xD = Math.abs(fntPnt.x - lastPnt.x) + var yD = Math.abs(fntPnt.y - lastPnt.y) + + if (isJwd) { + if (Math.abs(fntPnt.x) > 180) { + xD = xD / 3600 + yD = yD / 3600 + } + dist = (Math.sqrt(Math.pow(xD, 2) + Math.pow(yD, 2))) * offset + } else { + dist = (Math.sqrt(Math.pow(xD, 2) + Math.pow(yD, 2))) + } + + length += dist + } + } + return length +} + +// 璁$畻鐐瑰埌绾挎鐨勮窛绂� +function getDistance(point, lineP1, lineP2) { + var a = Number((lineP1.y - lineP2.y) / (lineP1.x - lineP2.x)) + var b = -1 + var c = Number(lineP2.y - a * lineP2.x) + var td = Math.abs(a * point.x + b * point.y + c) / Math.sqrt(a * a + b * b) + return td +} + +export default { + SysAuthCode, + getDistance, + getLength, + GetCurrentTime, + GetCurrentDayTime, + UtcToDateTime, + UtcToMonDate, + convertDateFromString, + convertDateTimeFromString +} diff --git a/src/components/utils/wfsQueryUtils.js b/src/components/utils/wfsQueryUtils.js new file mode 100644 index 0000000..7901056 --- /dev/null +++ b/src/components/utils/wfsQueryUtils.js @@ -0,0 +1,56 @@ +/** + * wfs 澶氭潯浠跺睘鎬ф煡璇nd Or 绫诲瀷 + * @params params + * params={ + * Url:'', + * TypeName:'', + * Or:[{'PropertyName':'','PropertyValue',''},{}], + * And:[{'PropertyName':'PropertyValue'},{}] + * } + * @returns {string} + */ +function getPropertyNameQueryAndOrWFSUrl(params) { + var url = '' + if ((params.Or === undefined || params.Or.length === 0) && (params.And === undefined || params.And.length === 0) && (params.Not === undefined || params.Not.length === 0)) { + url = params.Url + '?VERSION=1.0.0&SERVICE=WFS&REQUEST=getfeature&TYPENAME=' + params.TypeName + '&outputformat=json&maxfeature=20000' + } else { + url = params.Url + '?VERSION=1.0.0&SERVICE=WFS&REQUEST=getfeature&TYPENAME=' + params.TypeName + '&outputformat=json&maxfeature=20000&Filter=<Filter>' + } + if (params.Or != null && params.Or.length !== 0) { + if (params.Or.length === 1) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Or[0].PropertyName + '</PropertyName><Literal>' + params.Or[0].PropertyValue + '</Literal></PropertyIsEqualTo>' + } else { + url += '<OR>' + for (let i = 0; i < params.Or.length; i++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Or[i].PropertyName + '</PropertyName><Literal>' + params.Or[i].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</OR>' + } + } + if (params.And != null && params.And.length !== 0) { + if (params.And.length === 1) { + url += '<PropertyIsEqualTo><PropertyName>' + params.And[0].PropertyName + '</PropertyName><Literal>' + params.And[0].PropertyValue + '</Literal></PropertyIsEqualTo>' + } else { + url += '<AND>' + for (let j = 0; j < params.And.length; j++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.And[j].PropertyName + '</PropertyName><Literal>' + params.And[j].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</AND>' + } + } + if (params.Not != null && params.Not.length !== 0) { + url += '<NOT>' + for (let k = 0; k < params.Not.length; k++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Not[k].PropertyName + '</PropertyName><Literal>' + params.Not[k].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</NOT>' + } + if ((params.Or !== undefined && params.Or.length !== 0) || (params.And !== undefined && params.And.length !== 0) || (params.Not !== undefined && params.Not.length !== 0)) { + url += '</Filter>' + } + return url +} + +export default { + getPropertyNameQueryAndOrWFSUrl +} diff --git a/src/conf/MODE.js b/src/conf/MODE.js new file mode 100644 index 0000000..4fb465d --- /dev/null +++ b/src/conf/MODE.js @@ -0,0 +1,10 @@ +// 甯搁噺 +const MODE_BIGSCREEN = 0 +const MODE_MONITOR = 1 +const MODE_ALARM = 2 + +export default { + MODE_BIGSCREEN, + MODE_MONITOR, + MODE_ALARM +} diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js new file mode 100644 index 0000000..8776d85 --- /dev/null +++ b/src/conf/MapConfig.js @@ -0,0 +1,241 @@ +锘縤mport * as L from 'leaflet' +import { $HOST } from '@/api/host' + +let curWwwPath = window.document.location.href +let pathname = window.document.location.pathname +let pos = curWwwPath.indexOf(pathname) +let HOST_URL = curWwwPath.substring(0, pos) +const sconfig = { + // 'ip' : '10.246.151.116', + // 'port' : '8093', + 'ip': '10.238.221.80', + 'port': '8088', + 'ifS': 'http', + 'name': '/hcss' +} +// const DMHttpService='http://10.246.146.111/IPMSAPI/' // 娴嬭瘯 +// var DMHttpService1='http://10.246.151.16:8094/' +const DMHttpService1 = sconfig.ifS + '://' + sconfig.ip + ':' + sconfig.port + sconfig.name + '/' +const GIS_URL = 'http://10.238.221.80:6080' +/* const config = { + ArcGisApiService: 'http://10.246.146.111/DigitalSand' +} */ +const mapConfig = { + IsLoadMapByToken: true, // 鏄惁閫氳繃token鍔犺浇鍦板浘 + showBaseMapType: 1, // 1鏄剧ず澶╁湴鍥撅紝2鏄剧ずarcgis鍦板浘 + TDTBaseMaps: [ + { + layerName: '澶╁湴鍥惧奖鍍忓湴鍥�', + type: 'wmts', + visible: false, + layerType: 'img_c', + isLoadMapByToken: true, + url: 'http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-image-globe/WMTS' + }, + { + layerName: '澶╁湴鍥惧奖鍍忔爣娉�', + type: 'wmts', + visible: false, + layerType: 'cia_c', + isLoadMapByToken: true, + url: 'http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-label-image/WMTS' + }, + { + layerName: '澶╁湴鍥剧煝閲忓湴鍥�', + type: 'wmts', + visible: false, + layerType: 'vec_c', + isLoadMapByToken: true, + url: 'http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-vector-globe/WMTS' + }, + { + layerName: '澶╁湴鍥剧煝閲忔爣娉�', + type: 'wmts', + visible: false, + layerType: 'cva_c', + isLoadMapByToken: true, + url: 'http://10.246.132.249:8080/OneMapServer/rest/services/base-tdt-label-vector/WMTS' + } + ], + ArcBaseMaps: [ + { + layerName: 'arcgis褰卞儚搴曞浘', + type: 'tile', + visible: true, + layerType: 'cia_c', + isLoadMapByToken: false, + url: 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-globe/MapServer' + }], + GeometryServer: GIS_URL + '/arcgis/rest/services/Utilities/Geometry/GeometryServer', + FenceUrl: GIS_URL + '/arcgis/rest/services/fence', + ChinaGj: $HOST + '/server/ogcserver/whp_guojie/wmts', + RailwayUrl: $HOST + '/server/ogcserver/railway_network_tile/wmts' +} + +const mapOptions = { + crs: L.CRS.EPSG4326, + minZoom: 3, + maxZoom: 18, + center: [26, 104], + zoom: 3, + zoomControl: false, + attributionControl: false, + editable: true +} + +const layerNameNew = { + TransportEnterprise: 'T_Carrier', // 杩愯緭浼佷笟 + Petrochemical: 'CHEMICAL_OIL_ENTERPRISE', // 鐐煎寲浼佷笟 + Chemical: 'CHEMICAL_ENTERPRISE', // 鍖栧伐浼佷笟 + Refinery: 'OIL_REFINING_ENTERPRISE', // 鐐兼补浼佷笟 + SalesEnterprise: 'SALES_ENTERPRISE', // 閿�鍞紒涓� + Dock: 'WHARF', // 鐮佸ご + StoreHouse: 'Warehouse', // 浠撳簱 + Sales: 'CHEMICAL_SALES_OUTLETS', // 鍖栭攢缁忚惀缃戠偣 + Petroleum: 'CRUDE_OIL_DEPOT', // 鍘熸补娌瑰簱 + ProductOil: 'PRODUCT_OIL_DEPOT', // 鎴愬搧娌规补搴� + LNGStation: 'LNG_RECEIVING_STATION', // LNG鎺ユ敹绔� + LNGStorage: 'LNG_TANK', // LNG鍌ㄧ綈 + TrainStation: 'TrainStation', // 閾佽矾鑷杞︾伀杞︾珯 + Railway: 'TrainWay', // 閾佽矾 + TransportPath: 'TRANS_PATH', // 杩愯緭璺緞 + TransportNode: 'TRANS_NODE_TOPOLOGY', // 杩愯緭鑺傜偣鎷撴墤 + FillingStation: 'FillingStation', // 鍔犳补绔� + TransportWarning: '杩愯緭鐩戞帶', + TransportWaste: '鍗卞簾鐩戞帶', + Train: 'Train', + Truck: 'Truck', + Ship: 'Ship', + Warning: '缁煎悎棰勮', + Track: '鍘嗗彶杞ㄨ抗', + Weather: '澶╂皵棰勮', + WarningLayer: 'warning', + RainFall: 'RainFall', + WindAndTemperature: 'WindAndTemperature', + Dust: 'Dust', + FogWarning: 'FogWarning', + HazeLayer: 'HazeLayer' +} + +const TokenConfig = { + url: 'http://10.246.132.249:8080/RemoteTokenServer', // 鑾峰彇token鐨勬湇鍔℃帴鍙� + option: { + request: 'getToken', + username: 'sipms', // 鑾峰彇token鐨勭敤鎴峰悕 + password: 'sinopecipms', // 鑾峰彇token鐨勫瘑鐮� + expiration: 1440, + clientid: 'ref.' + HOST_URL// 鑾峰彇token鐨勫簲鐢ㄦ湇鍔″櫒鍦板潃 + } +} +const layerNames = { + TransportEnterprise: '杩愯緭浼佷笟', + Petrochemical: '鐐煎寲浼佷笟', + Chemical: '鍖栧伐浼佷笟', + Refinery: '鐐兼补浼佷笟', + SalesEnterprise: '閿�鍞紒涓�', + Dock: '鐮佸ご', + StoreHouse: '浠撳簱', + Sales: '鍖栭攢缁忚惀缃戠偣', + Petroleum: '鍘熸补娌瑰簱', + ProductOil: '鎴愬搧娌规补搴�', + LNGStation: 'LNG鎺ユ敹绔�', + LNGStorage: 'LNG鍌ㄧ綈', + TrainStation: '閾佽矾鑷杞︾伀杞︾珯', + Railway: '閾佽矾', + TransportPath: '杩愯緭璺緞', + TransportNode: '杩愯緭鑺傜偣鎷撴墤', + FillingStation: '鍔犳补绔�', + TransportWarning: '杩愯緭鐩戞帶', + TransportWaste: '鍗卞簾鐩戞帶', + Train: '閾佽矾鑷杞�', + Ship: '鑸硅埗', + Warning: '缁煎悎棰勮', + Track: '鍘嗗彶杞ㄨ抗', + Weather: '澶╂皵棰勮' +} + +const moduleNames = { + Analysis: '缁忚惀鍒嗘瀽', + Facilities: '璁炬柦鍒嗗竷', + Pipeline: '绠$嚎', + CrudeOil: '鍘熸补', + NaturalGas: '澶╃劧姘�', + OilRefining: '鐐兼补', + Chemical: '鍖栧伐', + ProductOilSales: '鎴愬搧娌归攢鍞�', + ChemicalSales: '鍖栧伐閿�鍞�', + ProductOil_dq_Sales: '鎴愬搧娌瑰ぇ鍖洪攢鍞�', + ProductOli_ss_Sales: '鎴愬搧娌圭渷甯傞攢鍞�', + ImportedCrudeOil: '杩涘彛鍘熸补', + ImportedCrudeOil_dz: '杩涘彛鍘熸补澶ф床', + ImportedCrudeOil_dq: '杩涘彛鍘熸补鍦板尯', + ImportedCrudeOil_gj: '杩涘彛鍘熸补鍥藉', + ImportedCrudeOil_jc: '杩涘彛鍘熸补杩涘満', + Refining_ImportedCrudeOil: '鐐兼补杩涘彛鍘熸补', + Refining_HomeCrudeOil: '鐐兼补鍥藉唴鍘熸补', + Refining_Cpylx: '鐐兼补鎴愬搧娌规祦鍚�', + Dock_Yyly: '鐮佸ご鍘熸补鏉ユ簮', + Dock_Yylxqy: '鐮佸ご鍘熸补娴佸悜浼佷笟', + Oil_Yylxqy: '娌圭敯鍘熸补娴佸悜浼佷笟', + ProductOilSales_dq_drdc: '鎴愬搧娌归攢鍞ぇ鍖鸿皟鍏ヨ皟鍑�', + + jyfx_tb: '缁忚惀鍒嗘瀽鍥捐〃', + gx_tb: '绠$嚎鍥捐〃', + yq_tb: '娌规皵鍥捐〃', + ly_tb: '鐐兼补鍥捐〃', + hg_tb: '鍖栧伐鍥捐〃', + cpyxs_tb: '鎴愬搧娌归攢鍞浘琛�', + cpyxs_dq_tb: '鎴愬搧娌归攢鍞ぇ鍖哄浘琛�', + cpyxs_ck_tb: '鎴愬搧娌归攢鍞嚭鍙e浘琛�' +} +const imageIDlayerCode = { + '1_1': 'sinopec_yout', + '1_2': 'petro_yout', + '1_3': 'cnooc_yout', + '1_4': 'other_yout', + '2_1': 'sinopec_qit', + '2_2': 'petro_qit', + '2_3': 'cnooc_qit', + '2_4': 'other_qit', + '3_1': 'sinopec_jinkyy', + '3_2': 'petro_jinkyy', + '3_3': 'cnooc_jinkyy', + '3_4': 'other_jinkyy', + '4_1': 'sinopec_mat', + '4_2': 'petro_mat', + '4_3': 'cnooc_mat', + '4_4': 'other_mat', + '5_1': 'sinopec_lianyqy', + '5_2': 'petro_lianyqy', + '5_3': 'cnooc_lianyqy', + '5_4': 'other_lianyqy', + '6_1': 'sinopec_huagqy', + '6_2': 'petro_huagqy', + '6_3': 'cnooc_huagqy', + '6_4': 'other_huagqy', + '7_1': 'sinopec_chengpy', + '7_2': 'petro_chengpy', + '7_3': 'cnooc_chengpy', + '7_4': 'other_chengpy', + '8_1': 'sinopec_huag', + '8_2': 'petro_huag', + '8_3': 'cnooc_huag', + '8_4': 'other_huag' + } + +const API_URLS = { + vehicleAlarmUrl: '', + corpTransVolumeUrl: '' +} + +export default { + mapConfig, + layerNameNew, + imageIDlayerCode, + moduleNames, + TokenConfig, + layerNames, + mapOptions, + DMHttpService1, + API_URLS +} diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..82425e2 --- /dev/null +++ b/src/main.js @@ -0,0 +1,28 @@ +import Vue from 'vue' +import App from './App.vue' +// import router from './router' +import store from './store' +// import registerDirectives from './directive' +import echarts from 'echarts' +import echartsDarkTheme from '@/styles/theme-dark/echarts/theme.json' +import ElementUI from 'element-ui' + +Vue.config.productionTip = false + +Vue.use(ElementUI, { size: 'small' }) +// 娉ㄥ唽鎸囦护 +// registerDirectives(Vue) + +// 娉ㄥ唽echarts鐨偆 +echarts.registerTheme('dark', echartsDarkTheme) + +// 寮�鍙戠幆澧冧笅鍔犺浇鍋囨暟鎹� +if (process.env.NODE_ENV === 'development') { + console.log('褰撳墠澶勪簬寮�鍙戞ā寮忥紒') +} + +window.vm = new Vue({ + // router, + store, + render: h => h(App), +}).$mount('#app') diff --git a/src/store/index.js b/src/store/index.js new file mode 100644 index 0000000..8c9e626 --- /dev/null +++ b/src/store/index.js @@ -0,0 +1,36 @@ +import Vue from 'vue' +import Vuex from 'vuex' +import map from './map' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: { + L: null, + map: null, // 瀹炰緥鍖栫殑map + layerHelper: {}, // 鍥惧眰鎺у埗鍣ㄥ疄鐜板姪鎵嬬▼搴� + layerControllerVisible: { // 鍥惧眰鎺у埗闈㈡澘鐨勬樉绀虹姸鎬佲�衡�� + layerController: true, // 鐖哥埜鏍忕洰锛氭槸鍚︽樉绀哄浘灞傛帶鍒堕潰鏉� + } + }, + mutations: { + setMapObj(state, mObject) { + state.L = mObject.L + state.map = mObject.map + }, + setLayerHelper(state, layerHelper) { + state.layerHelper = layerHelper + }, + updateLayerControllerVisible(state, preset) { + state.layerControllerVisible = preset + }, + }, + actions: { + // + }, + getters: { + }, + modules: { + map + } +}) \ No newline at end of file diff --git a/src/store/map.js b/src/store/map.js new file mode 100644 index 0000000..ac63037 --- /dev/null +++ b/src/store/map.js @@ -0,0 +1,16 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + namespace: true, + state: { + }, + mutations: { + }, + actions: { + }, + getters: { + } +}) \ No newline at end of file diff --git a/src/styles/theme-blue/el-ui/dialog.less b/src/styles/theme-blue/el-ui/dialog.less new file mode 100644 index 0000000..c1ec5d2 --- /dev/null +++ b/src/styles/theme-blue/el-ui/dialog.less @@ -0,0 +1,16 @@ +.el-dialog { + .el-dialog__header { + border-bottom: 1px solid #c3c2c2; + background-color: #f5f5f5; + } + .el-dialog__title { + color: @color-text-regular; + } + .el-dialog__body { + background-color: @popup-background-base; + } + .el-dialog__footer { + border-top: 1px solid #dbdbdb; + background-color: #f5f5f5; + } +} \ No newline at end of file diff --git a/src/styles/theme-blue/el-ui/input.less b/src/styles/theme-blue/el-ui/input.less new file mode 100644 index 0000000..b80c280 --- /dev/null +++ b/src/styles/theme-blue/el-ui/input.less @@ -0,0 +1,7 @@ +.el-input{ + &.is-disabled { + .el-input__inner { + color: @color-text-secondary; + } + } +} \ No newline at end of file diff --git a/src/styles/theme-blue/el-ui/table.less b/src/styles/theme-blue/el-ui/table.less new file mode 100644 index 0000000..62d4178 --- /dev/null +++ b/src/styles/theme-blue/el-ui/table.less @@ -0,0 +1,13 @@ +.el-table { + border: 1px solid #dcdee2; + color: @color-text-primary; + thead { + color: @color-text-primary; + } + .el-table__header-wrapper { + background-color: #eef1f6; + } + th { + background-color: #eef1f6; + } +} \ No newline at end of file diff --git a/src/styles/theme-blue/index.less b/src/styles/theme-blue/index.less new file mode 100644 index 0000000..1077197 --- /dev/null +++ b/src/styles/theme-blue/index.less @@ -0,0 +1,48 @@ +@import "./variable"; + +.blue { + color: @color-text-regular; + background-color: @color-white; + + // 瀹氫箟婊氬姩鏉¢珮瀹藉強鑳屾櫙 楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄 + ::-webkit-scrollbar { + width: 9px; + height: 9px; + background-color: #fff; + border-left: 1px solid #e8e8e8; + } + + // 瀹氫箟婊氬姩鏉¤建閬� 鍐呴槾褰�+鍦嗚 + ::-webkit-scrollbar-track { + box-shadow: inset 0 0 1px rgba(0, 0, 0, 0); + border-radius: 5px; + background-color: #ececec; + } + + // 瀹氫箟婊戝潡 鍐呴槾褰�+鍦嗚 + ::-webkit-scrollbar-thumb { + border: 1px solid #fff; + border-radius: 6px; + background-color: #c9c9c9; + } + + .vef-icon-danger { + color: @color-red + } + + .vef-icon-primary { + color: @color-primary; + } + + // 鑷畾涔塪ialog搴曢儴footer鏍峰紡 + .vef-dialog-slot-footer { + border-top: 1px solid #dbdbdb; + background-color: #f5f5f5; + text-align: right; + padding: 10px 20px; + } + + @import "./el-ui/table"; + @import "./el-ui/dialog"; + @import "./el-ui/input"; +} diff --git a/src/styles/theme-blue/variable.less b/src/styles/theme-blue/variable.less new file mode 100644 index 0000000..e451034 --- /dev/null +++ b/src/styles/theme-blue/variable.less @@ -0,0 +1,23 @@ +@import "../common/variable"; + +/* 涓婚鑹� +-------------------------- */ +@color-primary: #409EFF; + +/* text +-------------------------- */ +@color-text-primary: #303133; +@color-text-regular: #606266; +@color-text-secondary: #909399; +@color-text-placeholder: #c0c4cc; + +/* border +-------------------------- */ +@border-color-base: #dcdfe6; +@border-color-light: #e4e7ed; +@border-color-lighter: #ebeef5; +@border-color-extra-light: #f2f6fc; + +/* popup +-------------------------- */ +@popup-background-base: #eaedf1; diff --git a/src/styles/theme-dark/base/BaseCard.less b/src/styles/theme-dark/base/BaseCard.less new file mode 100644 index 0000000..8e674c0 --- /dev/null +++ b/src/styles/theme-dark/base/BaseCard.less @@ -0,0 +1,3 @@ +.base-card-wrap { + +} \ No newline at end of file diff --git a/src/styles/theme-dark/echarts/theme.json b/src/styles/theme-dark/echarts/theme.json new file mode 100644 index 0000000..20abbaf --- /dev/null +++ b/src/styles/theme-dark/echarts/theme.json @@ -0,0 +1,502 @@ +{ + "color": [ + "#29d0b0", + "#2d99ed", + "#fd8667", + "#72ccff", + "#f7c5a0", + "#d4a4eb", + "#fdc547", + "#76f2f2", + "#da4d00", + "#b0419e" + ], + "backgroundColor": "rgba(0,0,0,0)", + "textStyle": {}, + "itemStyle": { + "normal": { + "color": "#fff" + } + }, + "title": { + "textStyle": { + "color": "#ffffff" + }, + "subtextStyle": { + "color": "#dddddd" + } + }, + "line": { + "itemStyle": { + "normal": { + "borderWidth": "1" + } + }, + "lineStyle": { + "normal": { + "width": "1" + } + }, + "symbolSize": "4", + "symbol": "circle", + "smooth": true + }, + "radar": { + "itemStyle": { + "normal": { + "borderWidth": "4" + } + }, + "lineStyle": { + "normal": { + "width": "3" + } + }, + "symbolSize": "1", + "symbol": "circle", + "smooth": true + }, + "bar": { + "itemStyle": { + "normal": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + }, + "emphasis": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + } + }, + "pie": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "scatter": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "boxplot": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "parallel": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "sankey": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "funnel": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "emphasis": { + "borderWidth": 0, + "borderColor": "#ccc" + } + } + }, + "gauge": { + "itemStyle": { + "normal": { + "borderWidth": 1, + "borderColor": "#fff" + }, + "emphasis": { + "borderWidth": 1, + "borderColor": "#fff" + } + } + }, + "candlestick": { + "itemStyle": { + "normal": { + "color": "#fc97af", + "color0": "transparent", + "borderColor": "#fc97af", + "borderColor0": "#87f7cf", + "borderWidth": "2" + } + } + }, + "graph": { + "itemStyle": { + "normal": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "lineStyle": { + "normal": { + "width": "1", + "color": "#ffffff" + } + }, + "symbolSize": "5", + "symbol": "circle", + "smooth": true, + "color": [ + "#29d0b0", + "#2d99ed", + "#fd8667", + "#72ccff", + "#f7c5a0", + "#d4a4eb", + "#fdc547", + "#76f2f2", + "#da4d00", + "#b0419e" + ], + "label": { + "normal": { + "textStyle": { + "color": "#293441" + } + } + } + }, + "map": { + "itemStyle": { + "normal": { + "areaColor": "#f3f3f3", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "emphasis": { + "areaColor": "rgba(255,178,72,1)", + "borderColor": "#eb8146", + "borderWidth": 1 + } + }, + "label": { + "normal": { + "textStyle": { + "color": "#893448" + } + }, + "emphasis": { + "textStyle": { + "color": "rgb(137,52,72)" + } + } + } + }, + "geo": { + "itemStyle": { + "normal": { + "areaColor": "#f3f3f3", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "emphasis": { + "areaColor": "rgba(255,178,72,1)", + "borderColor": "#eb8146", + "borderWidth": 1 + } + }, + "label": { + "normal": { + "textStyle": { + "color": "#893448" + } + }, + "emphasis": { + "textStyle": { + "color": "rgb(137,52,72)" + } + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#fff" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#fff" + } + }, + "axisLabel": { + "show": true, + "textStyle": { + "color": "#fff" + } + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#fff" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#fff" + } + }, + "axisLabel": { + "show": true, + "textStyle": { + "color": "#fff" + } + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#fff" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "textStyle": { + "color": "#fff" + } + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#fff" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#fff" + } + }, + "axisLabel": { + "show": true, + "textStyle": { + "color": "#fff" + } + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#fff" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "normal": { + "borderColor": "#999999" + }, + "emphasis": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#e0e0e0" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#87f7cf", + "width": 1 + }, + "itemStyle": { + "normal": { + "color": "#87f7cf", + "borderWidth": 1 + }, + "emphasis": { + "color": "#f7f494" + } + }, + "controlStyle": { + "normal": { + "color": "#87f7cf", + "borderColor": "#87f7cf", + "borderWidth": 0.5 + }, + "emphasis": { + "color": "#87f7cf", + "borderColor": "#87f7cf", + "borderWidth": 0.5 + } + }, + "checkpointStyle": { + "color": "#fc97af", + "borderColor": "rgba(252,151,175,0.3)" + }, + "label": { + "normal": { + "textStyle": { + "color": "#87f7cf" + } + }, + "emphasis": { + "textStyle": { + "color": "#87f7cf" + } + } + } + }, + "visualMap": { + "color": [ + "#fc97af", + "#87f7cf" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(255,255,255,0)", + "dataBackgroundColor": "rgba(114,204,255,1)", + "fillerColor": "rgba(114,204,255,0.2)", + "handleColor": "#72ccff", + "handleSize": "100%", + "textStyle": { + "color": "#fff" + } + }, + "markPoint": { + "label": { + "normal": { + "textStyle": { + "color": "#293441" + } + }, + "emphasis": { + "textStyle": { + "color": "#293441" + } + } + } + } +} \ No newline at end of file diff --git a/src/styles/theme-dark/el-ui/button.less b/src/styles/theme-dark/el-ui/button.less new file mode 100644 index 0000000..4f9d1f8 --- /dev/null +++ b/src/styles/theme-dark/el-ui/button.less @@ -0,0 +1,62 @@ +.el-button--primary{ + color: @dark--text-base; + background-color: @dark--button-primary-background-color; + border-color: @dark--primary-color; +} + +.el-button--primary:hover, .el-button--primary:focus{ + background: rgb(51, 163, 182); + border-color: rgb(81, 229, 253); + color: @dark--title-color; +} + +.el-button--primary:active{ + background: rgb(0, 126, 148); + border-color: rgb(34, 200, 228); + color: @dark--title-color; + outline: none; +} + +.el-button--primary.is-active{ + background: rgb(0, 126, 148); + border-color: rgb(34, 200, 228); + color: @dark--title-color; +} + +.el-button--primary.is-plain{ + background: transparent; + border: 1px solid #198CA7; + color: rgb(31, 45, 61); +} + +.el-button--primary.is-plain:hover, .el-button--primary.is-plain:focus{ + background: transparent; + border-color: @dark--primary-color; + color: @dark--button-primary-background-color; +} + +.el-button--primary.is-plain:active{ + background: transparent; + border-color: rgb(34, 200, 228); + color: rgb(0, 126, 148); + outline: none; +} +.el-button--default{ + background: transparent; + color: @dark--text-base; + border: 1px solid @dark--primary-color; +} +.el-button--default:hover{ + background: transparent; + border-color: #0f93a9; + color: @dark--title-color; +} +.el-button--default:active{ + border-color: #0f93a9; + color: @dark--title-color; + outline: none; +} +.el-button--default.is-active{ + border-color: #0f93a9; + color: @dark--title-color; +} diff --git a/src/styles/theme-dark/el-ui/card.less b/src/styles/theme-dark/el-ui/card.less new file mode 100644 index 0000000..1744845 --- /dev/null +++ b/src/styles/theme-dark/el-ui/card.less @@ -0,0 +1,4 @@ +.el-card{ + background-color: @dark--background-base; + border: 1px solid @dark--border-color-base; +} diff --git a/src/styles/theme-dark/el-ui/cascader.less b/src/styles/theme-dark/el-ui/cascader.less new file mode 100644 index 0000000..5246398 --- /dev/null +++ b/src/styles/theme-dark/el-ui/cascader.less @@ -0,0 +1,26 @@ +.el-cascader-menu{ + background-color:@dark--select-dropdown-background; +} +.el-cascader-menu__item{ + color: @dark--input-text-color; +} +.el-cascader-menu__item.is-active{ + color: @dark--select-text-color; + background-color: @dark--select-selected-background; +} +.el-cascader-menu__item.is-active:hover{ + background-color: @dark--select-selected-background; +} +.el-cascader-menu__item:hover{ + background-color: @dark--select-hover-background; +} +.el-cascader-menus{ + border: 1px solid @dark--border-color-base; +} +.el-cascader__label{ + color:@dark--input-text-color; +} +.el-cascader-menu__item.is-disabled{ + background-color: @dark--select-dropdown-background; + text-align: center; +} \ No newline at end of file diff --git a/src/styles/theme-dark/el-ui/checkbox-button.less b/src/styles/theme-dark/el-ui/checkbox-button.less new file mode 100644 index 0000000..5265e4b --- /dev/null +++ b/src/styles/theme-dark/el-ui/checkbox-button.less @@ -0,0 +1,92 @@ +.el-checkbox-button{ + position: relative; + display: inline-block; +} +.el-checkbox-button.is-checked{} +.el-checkbox-button.is-checked .el-checkbox-button__inner{ + color: transparent; + background-color: #20a0ff; + border-color: #20a0ff; + box-shadow: -1px 0 0 0 #20a0ff; +} +.el-checkbox-button.is-disabled{} +.el-checkbox-button.is-disabled .el-checkbox-button__inner{ + color: #198CA7; + cursor: not-allowed; + background-image: none; + background-color: #194B5B; + border-color: #198CA7; + box-shadow: none; +} +.el-checkbox-button.is-focus{} +.el-checkbox-button.is-focus .el-checkbox-button__inner{ + border-color: #20a0ff; +} +.el-checkbox-button:first-child .el-checkbox-button__inner{ + border-left: 1px solid #198CA7; + border-radius: 4px 0 0 4px; + box-shadow: none !important; +} +.el-checkbox-button:last-child .el-checkbox-button__inner{ + border-radius: 0 4px 4px 0; +} +.el-checkbox-button__inner{ + display: inline-block; + line-height: 1; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + background: transparent; + border: 1px solid #198CA7; + border-left: 0; + color: rgb(31, 45, 61); + -webkit-appearance: none; + text-align: center; + box-sizing: border-box; + outline: none; + margin: 0; + position: relative; + cursor: pointer; + transition: all .3s cubic-bezier(.645,.045,.355,1); + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + padding: 10px 15px; + font-size: 14px; + border-radius: 0; +} +.el-checkbox-button__inner:hover{ + color: #20a0ff; +} +.el-checkbox-button__inner [class*="el-icon-"]{ + line-height: 0.9; +} +.el-checkbox-button__inner [class*="el-icon-"] + span{ + margin-left: 5px; +} +.el-checkbox-button__original{ + opacity: 0; + outline: none; + position: absolute; + margin: 0; + visibility: hidden; + left: -999px; +} +.el-checkbox-button--large{} +.el-checkbox-button--large .el-checkbox-button__inner{ + padding: 11px 19px; + font-size: 16px; + border-radius: 0; +} +.el-checkbox-button--small{} +.el-checkbox-button--small .el-checkbox-button__inner{ + padding: 7px 9px; + font-size: 12px; + border-radius: 0; +} +.el-checkbox-button--mini{} +.el-checkbox-button--mini .el-checkbox-button__inner{ + padding: 4px 4px; + font-size: 12px; + border-radius: 0; +} diff --git a/src/styles/theme-dark/el-ui/checkbox.less b/src/styles/theme-dark/el-ui/checkbox.less new file mode 100644 index 0000000..cf3cfad --- /dev/null +++ b/src/styles/theme-dark/el-ui/checkbox.less @@ -0,0 +1,10 @@ +.el-checkbox{ + color: @dark--text-base; + .el-checkbox__inner{ + background-color: @dark--background-base; + border: 1px solid @dark--border-color-base; + } + .el-checkbox__inner::after{ + border-color: @dark--select-border-color; + } +} diff --git a/src/styles/theme-dark/el-ui/collapse.less b/src/styles/theme-dark/el-ui/collapse.less new file mode 100644 index 0000000..bfda323 --- /dev/null +++ b/src/styles/theme-dark/el-ui/collapse.less @@ -0,0 +1,19 @@ +.el-collapse { + background-color: transparent; + border: 1px solid @dark--collapse-border-color; + .el-collapse-item__header { + background: @dark--collapse-header-background; + color: @dark--collapse-title-color; + border-bottom: 1px solid @dark--collapse-border-color; + .collapse-title { + font-size: 20px; + } + } + .el-collapse-item__wrap { + background-color: @dark--collapse-container-background; + color: @dark--collapse-text-color; + border-bottom: 1px solid @dark--collapse-border-color; + } + .is-active { + } +} diff --git a/src/styles/theme-dark/el-ui/date-picker.less b/src/styles/theme-dark/el-ui/date-picker.less new file mode 100644 index 0000000..a6ebafd --- /dev/null +++ b/src/styles/theme-dark/el-ui/date-picker.less @@ -0,0 +1,169 @@ +.el-range-editor .el-range-input{ + background-color:transparent; + color: @dark--text-base; +} +.el-date-editor .el-range-separator{ + color: @dark--text-base; +} +.el-picker-panel{ + border: 1px solid @dark--border-color-base; + box-shadow: 0 2px 6px @dark--border-color-base; + background: @dark--background-base; + color: @dark--text-base; + .el-picker-panel__sidebar{ + border-right: 1px solid @dark--border-color-base; + background-color: @dark--background-base; + .el-picker-panel__shortcut{ + color: @dark--text-base; + } + .el-picker-panel__shortcut:hover{ + background-color: @dark--select-selected-background; + } + } + .prev-month{ + color: @dark--text-disabled; + } + .next-month{ + color: @dark--text-disabled; + } + .available:hover{ + background-color: @dark--select-selected-background; + } + .start-date{ + background-color: @dark--primary-opacity-color-3 !important; + } + .end-date{ + background-color: @dark--primary-opacity-color-3 !important; + } + .in-range{ + background-color: @dark--primary-opacity-color-1; + } + .today{ + color: @dark--primary-color; + } + .today:before{ + border-top: .5em solid @dark--primary-color; + } + .el-date-table th{ + color: @dark--text-secondary; + } + .el-icon-arrow-left:hover{ + color: @dark--primary-color; + } + .el-icon-d-arrow-left:hover{ + color: @dark--primary-color; + } + .el-icon-d-arrow-right:hover{ + color: @dark--primary-color; + } + .el-icon-arrow-right:hover{ + color: @dark--primary-color; + } + .disabled{ + background: transparent; + color: @dark--text-disabled; + } + .cell{ + color: @dark--text-base; + } + .cell:hover{ + background: @dark--primary-opacity-color-3; + } + .el-date-table td.current:not(.disabled), .el-date-table td.end-date, .el-date-table td.start-date{ + color: @dark--text-base; + background-color: @dark--primary-opacity-color-3 !important; + } + .el-time-panel{ + border: 1px solid @dark--border-color-base; + // box-shadow: 0 2px 6px @dark--border-color-base; + background: @dark--background-base; + color: @dark--text-base; + .el-time-spinner__item:hover{ + background-color: @dark--select-selected-background; + } + .el-time-panel__content::after, .el-time-panel__content::before{ + background-color: @dark--primary-opacity-color-3; + color: @dark--text-base; + content: ""; + top: 50%; + // color: #fff; + position: absolute; + font-size: 14px; + margin-top: -12px; + line-height: 16px; + height: 32px; + z-index: -1; + left: 0; + right: 0; + box-sizing: border-box; + padding-top: 6px; + text-align: left; + } + .el-time-panel__footer{ + border-top: 1px solid @dark--border-color-base; + .cancel{ + color: @dark--link-disabled-color; + } + .confirm{ + color: @dark--button-text-color; + } + } + .el-date-picker__header-label:hover{ + color: @dark--select-selected-background !important; + } + } + .el-picker-panel__footer{ + border-top: 1px solid @dark--border-color-base; + background: @dark--background-base; + color: @dark--text-base; + .el-picker-panel__link-btn{ + color: @dark--text-base; + } + .el-picker-panel__btn{ + border: 1px solid @dark--border-color-base; + color: @dark--button-text-color; + } + } + .el-year-table td.current:not(.disabled) .cell{ + background-color: @dark--primary-opacity-color-3 !important; + color: @dark--text-base; + } + .el-date-picker__time-header{ + border-bottom: 1px solid @dark--border-color-base; + } + + .el-date-table td.in-range div, .el-date-table td.in-range div:hover, .el-date-table.is-week-mode .el-date-table__row.current div, .el-date-table.is-week-mode .el-date-table__row:hover div{ + background-color: transparent; + } + .el-date-table td.end-date span, .el-date-table td.start-date span{ + background-color:transparent; + } + .el-picker-panel__footer .el-button.is-disabled.is-plain{ + background-color:@dark--button-primary-background-color; + border-color:@dark--primary-color; + } + .el-picker-panel__footer .el-picker-panel__link-btn{ + padding: 8px 15px; + border: 1px solid @dark--primary-color; + } + .el-picker-panel__footer .el-picker-panel__link-btn:hover{ + border-color: #0f93a9; + } + .el-picker-panel__footer .is-plain{ + background-color:@dark--button-primary-background-color; + border-color:@dark--primary-color; + } + .el-picker-panel__footer .is-plain:hover{ + background-color:#33a3b6; + border-color: rgb(81, 229, 253); + } + .el-date-range-picker__content.is-left,.el-date-range-picker__time-header{ + border-color:@dark--primary-color; + } + .el-date-table th{ + border-bottom:1px solid @dark--primary-color; + } + .popper__arrow{ + display:none; + } +} diff --git a/src/styles/theme-dark/el-ui/dialog.less b/src/styles/theme-dark/el-ui/dialog.less new file mode 100644 index 0000000..cf40fc0 --- /dev/null +++ b/src/styles/theme-dark/el-ui/dialog.less @@ -0,0 +1,28 @@ +.el-dialog { + background: transparent; + border: 1px solid @dark--popup-border-color; + .el-dialog__header { + border-bottom: 1px solid @dark--popup-border-color; + background-color: @dark--popup-title-background; + } + .el-dialog__title { + color: @dark--popup-title-color; + } + .el-dialog__body { + background-color: @dark--popup-background; + } + .el-dialog__footer { + border-top: 1px solid @dark--popup-border-color; + background-color: @dark--popup-title-background; + } + + .el-dialog__close { + color: @dark--popup-title-color; + } + + &:focus, &:hover { + .el-dialog__close { + color: @dark--primary-color; + } + } +} diff --git a/src/styles/theme-dark/el-ui/eChartBtn.less b/src/styles/theme-dark/el-ui/eChartBtn.less new file mode 100644 index 0000000..8660390 --- /dev/null +++ b/src/styles/theme-dark/el-ui/eChartBtn.less @@ -0,0 +1,39 @@ + .chart-btn-wrap { + padding: 5px; + + .chart-button { + display: block; + line-height: 1; + white-space: nowrap; + cursor: pointer; + background: transparent; + border: none; + -webkit-appearance: none; + text-align: center; + box-sizing: border-box; + outline: none; + margin-bottom: 35px; + padding: 0; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + &:last-child { + margin-bottom: 0; + } + } + .chart-font { + font-size: 20px; + } + .chart-button__color { + color: #1a6d7c !important; + &:hover { + color: #fff !important; + } + &.on { + color: #fff !important; + } + } + .hide { + display: none; + } + } diff --git a/src/styles/theme-dark/el-ui/form.less b/src/styles/theme-dark/el-ui/form.less new file mode 100644 index 0000000..beae30c --- /dev/null +++ b/src/styles/theme-dark/el-ui/form.less @@ -0,0 +1,85 @@ +.el-form--inline .el-form-item,.el-form--inline .el-form-item__content { + display: inline-block; + vertical-align: top +} + +.el-form-item:after,.el-form-item__content:after { + clear: both +} + +.el-form--label-left .el-form-item__label { + text-align: left +} + +.el-form--label-top .el-form-item__label { + float: none; + display: inline-block; + text-align: left; + padding: 0 0 10px +} + +.el-form--inline .el-form-item { + margin-right: 10px +} + +.el-form--inline .el-form-item__label { + float: none; + display: inline-block +} + +.el-form--inline.el-form--label-top .el-form-item__content { + display: block +} + +.el-form-item { + margin-bottom: 22px +} + +.el-form-item:after,.el-form-item:before { + display: table; + content: "" +} + +.el-form-item .el-form-item { + margin-bottom: 0 +} + +.el-form-item .el-form-item .el-form-item__content { + margin-left: 0!important +} + +.el-form-item.is-error .el-input-group__append .el-input__inner,.el-form-item.is-error .el-input-group__prepend .el-input__inner,.el-form-item.is-error .el-input__inner { + border-color: transparent +} + +.el-form-item.is-error .el-input__inner,.el-form-item.is-error .el-textarea__inner { + border-color: #ff4949 +} + +.el-form-item.is-required .el-form-item__label:before { + content: '*'; + color: #ff4949; + margin-right: 4px +} + +.el-form-item__label { + text-align: right; + vertical-align: middle; + float: left; + font-size: 14px; + color: #fff; + line-height: 1; + padding: 11px 12px 11px 0; + box-sizing: border-box +} + +.el-form-item__content { + line-height: 36px; + position: relative; + font-size: 14px +} + +.el-form-item__content:after,.el-form-item__content:before { + display: table; + content: "" +} diff --git a/src/styles/theme-dark/el-ui/index.less b/src/styles/theme-dark/el-ui/index.less new file mode 100644 index 0000000..1074045 --- /dev/null +++ b/src/styles/theme-dark/el-ui/index.less @@ -0,0 +1,30 @@ +@import "../../common/variable-dark"; + +.dark { + //background: url("./bg.png") no-repeat; + //background-size: 100% 100%; + @import "./table"; + @import "./pagination"; + @import "./select"; + @import "./select-dropdown"; + @import "./button"; + @import "./tabs"; + @import "./tree"; + @import "./checkbox"; + @import "./input"; + @import "./checkbox-button"; + @import "./form"; + @import "./dialog"; + @import "./eChartBtn"; + @import "./popover"; + @import "./date-picker"; + @import "./radio"; + @import "./card"; + @import "./collapse"; + @import "./textarea"; + @import "./upload"; + @import "./cascader"; + @import "./tag"; + @import "./message"; + @import "./loading"; +} diff --git a/src/styles/theme-dark/el-ui/input.less b/src/styles/theme-dark/el-ui/input.less new file mode 100644 index 0000000..edd49dc --- /dev/null +++ b/src/styles/theme-dark/el-ui/input.less @@ -0,0 +1,94 @@ +.el-input.is-disabled .el-input__inner { + background-color: #194B5B; + border-color: #26defd; + color: #fff; + cursor: not-allowed +} + +.el-input.is-disabled .el-input__inner:-ms-input-placeholder { + color: #198CA7 +} + +.el-input.is-disabled .el-input__inner::placeholder { + color: #198CA7 +} + +.el-input.is-active .el-input__inner { + outline: none; + border-color: #20a0ff; +} + +.el-input__inner { + background-color: @dark--background-body; + background-image: none; + border: 1px solid @dark--border-color-base; + color: @dark--input-text-color; +} + +.el-input__inner:-ms-input-placeholder { + color: @dark--text-placeholder; +} + +.el-input__inner::placeholder { + color: @dark--text-placeholder; +} + +.el-input__inner:hover { + border-color: @dark--border-color-light +} + +.el-input__inner:focus { + border-color: @dark--border-color-light +} + +.el-input__icon { + color: @dark--input-text-color; +} + +.el-input__icon.is-clickable:hover { + cursor: pointer; + color: rgb(131, 145, 165) +} + +.el-input__icon.is-clickable:hover + .el-input__inner { + border-color: rgb(131, 145, 165) +} + +.el-input-group__append, .el-input-group__prepend { + color: rgb(151, 168, 190); + border: 1px solid #26defd; +} + +.el-textarea.is-disabled .el-textarea__inner { + background-color: #194B5B; + border-color: #26defd; + color: #fff; +} + +.el-textarea.is-disabled .el-textarea__inner:-ms-input-placeholder { + color: #198CA7 +} + +.el-textarea.is-disabled .el-textarea__inner::placeholder { + color: #198CA7 +} + +.el-textarea__inner { + border: 1px solid #26defd; +} + +.el-textarea__inner:-ms-input-placeholder { + color: rgb(151, 168, 190) +} + +.el-textarea__inner::placeholder { + color: rgb(151, 168, 190) +} + +.el-textarea__inner:hover { + border-color: rgb(131, 145, 165) +} + +.el-textarea__inner:focus { + border-color: #20a0ff +} diff --git a/src/styles/theme-dark/el-ui/loading.less b/src/styles/theme-dark/el-ui/loading.less new file mode 100644 index 0000000..92ee4eb --- /dev/null +++ b/src/styles/theme-dark/el-ui/loading.less @@ -0,0 +1,3 @@ +.el-loading-mask{ + background-color: rgba(0,0,0,0.5); +} diff --git a/src/styles/theme-dark/el-ui/message.less b/src/styles/theme-dark/el-ui/message.less new file mode 100644 index 0000000..f0d5a74 --- /dev/null +++ b/src/styles/theme-dark/el-ui/message.less @@ -0,0 +1,12 @@ +.el-message-box{ + background-color:@dark--background-body; + .el-message-box__title{ + color: @dark--title-color; + } + .el-message-box__content{ + color: @dark--text-base; + } + .el-message-box__status el-icon-warning{ + color: @color-yellow; + } +} diff --git a/src/styles/theme-dark/el-ui/pagination.less b/src/styles/theme-dark/el-ui/pagination.less new file mode 100644 index 0000000..b74e160 --- /dev/null +++ b/src/styles/theme-dark/el-ui/pagination.less @@ -0,0 +1,51 @@ +.el-pagination { + color: @dark--pagination-text-color; +} + +.el-pagination button:hover { + color: @dark--pagination-text-hover-color; +} + +.el-pagination button.disabled { + color: @color-white; + background-color: transparent; + cursor: not-allowed; +} + +.el-pagination .btn-prev, .el-pagination .btn-next { + background-color: transparent; + border: 1px solid @dark--pagination-border-color; + color: @dark--pagination-text-color; +} + +.el-pagination__sizes .el-input .el-input__inner { + border-color: @dark--pagination-border-color +} + +.el-pagination__sizes .el-input .el-input__inner:hover { + border-color: @dark--pagination-text-hover-color; +} + +.el-pager li { + background: transparent; + border: 1px solid @dark--pagination-border-color; +} + +.el-pager li:hover { + color: @dark--pagination-text-hover-color; +} + +.el-pager li.active { + border-color: @dark--pagination-border-color; + background-color: @dark--pagination-selected-background; + color: @dark--pagination-text-color; +} + +.el-pagination__editor { + border: 1px solid @dark--pagination-border-color; + background: @dark--pagination-selected-background; + color: @dark--pagination-text-color; +} +.el-pagination--small .el-pager li:last-child{ + border: 1px solid @dark--pagination-border-color; +} \ No newline at end of file diff --git a/src/styles/theme-dark/el-ui/popover.less b/src/styles/theme-dark/el-ui/popover.less new file mode 100644 index 0000000..1a80e70 --- /dev/null +++ b/src/styles/theme-dark/el-ui/popover.less @@ -0,0 +1,24 @@ +.el-popover { + background: @dark--popover-body-color; + border: 1px solid @dark--popover-border-color; +} + +.el-popover[x-placement^=bottom] .popper__arrow::after { + border-bottom-color: @dark--popover-border-color +} + +.el-popover[x-placement^="top"] .popper__arrow { + border-top-color: @dark--popover-border-color; +} + +.el-popover[x-placement^="bottom"] .popper__arrow { + border-bottom-color: @dark--popover-border-color; +} + +.el-popover[x-placement^="right"] .popper__arrow { + border-right-color: @dark--popover-border-color; +} + +.el-popover[x-placement^="left"] .popper__arrow { + border-left-color: @dark--popover-border-color; +} diff --git a/src/styles/theme-dark/el-ui/radio.less b/src/styles/theme-dark/el-ui/radio.less new file mode 100644 index 0000000..4fbe46f --- /dev/null +++ b/src/styles/theme-dark/el-ui/radio.less @@ -0,0 +1,8 @@ +.el-radio__inner{ + border-color: @dark--text-base; + background: @dark--text-base; +} +.el-radio__input.is-checked .el-radio__inner{ + background: @dark--primary-darkness-color-2; + border-color: @dark--border-color-base; +} diff --git a/src/styles/theme-dark/el-ui/select-dropdown.less b/src/styles/theme-dark/el-ui/select-dropdown.less new file mode 100644 index 0000000..2f8e9c3 --- /dev/null +++ b/src/styles/theme-dark/el-ui/select-dropdown.less @@ -0,0 +1,25 @@ +.el-select-dropdown { + border: solid 1px @dark--select-border-color; + background-color: @dark--select-dropdown-background; +} + +.el-select-dropdown__item { + color: @dark--select-text-color; +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected { + color: @dark--select-text-color; + background-color: rgba(48, 60, 62, .9); +} + +.el-select-dropdown__item.selected, .el-select-dropdown__item.selected.hover { + background-color: @dark--select-selected-background; +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected.hover, .el-select-dropdown__item.hover, .el-select-dropdown__item:hover { + background-color: @dark--select-hover-background +} + +.el-select-dropdown__empty { + color: @dark--select-text-color; +} diff --git a/src/styles/theme-dark/el-ui/select.less b/src/styles/theme-dark/el-ui/select.less new file mode 100644 index 0000000..388d46b --- /dev/null +++ b/src/styles/theme-dark/el-ui/select.less @@ -0,0 +1,29 @@ +.el-select:hover .el-input__inner{ + border-color: @dark--select-border-light-color; +} +.el-select .el-input__inner:focus{ + border-color: @dark--select-border-color; +} +.el-select .el-input .el-input__icon{ + color: @dark--select-text-color; +} + +.el-select .el-input .el-input__icon.is-show-close{ + color: @dark--select-text-color; +} +.el-select .el-input .el-input__icon.is-show-close:hover{ + color: rgb(151, 168, 190); +} +.el-select .el-input.is-disabled .el-input__inner:hover{ + border-color: #198CA7; +} +.el-select__close{ + color: #198CA7; +} +.el-select__close:hover{ + color: rgb(151, 168, 190); +} +.el-select__tag{ + color: transparent; + background-color: #194B5B; +} diff --git a/src/styles/theme-dark/el-ui/table.less b/src/styles/theme-dark/el-ui/table.less new file mode 100644 index 0000000..c22231b --- /dev/null +++ b/src/styles/theme-dark/el-ui/table.less @@ -0,0 +1,56 @@ +.el-table { + border: 1px solid @dark--table-border-color; + font-size: 14px; + background-color: transparent; + color: @dark--table-text-color; + + th { + background-color: @dark--table-title-background; + } + + tr { + background-color: transparent; + } + &::after { + width: 0; + } + &::before { + width: 0; + } +} + +.el-table__header-wrapper thead div { + background-color: transparent; + color: @dark--table-title-color; +} + +.el-table--border td, .el-table--border th { + border-right: 1px solid @dark--table-border-color; +} + +.el-table td, .el-table th.is-leaf { + border-bottom: 1px solid @dark--table-border-color; +} + +.el-table--enable-row-hover .el-table__body tr:hover > td { + background-color: @dark--table-row-hover-background; +} + +.el-table__body tr.current-row > td { + background: @dark--table-row-current-background; +} + +.el-table::before { + background-color: @dark--table-border-color; +} + +.el-table::after { + background-color: @dark--table-border-color; +} + +.el-table__column-resize-proxy{ + border-left: 1px solid @dark--table-border-color; +} +.el-table__empty-text { + color: @dark--table-text-color; +} diff --git a/src/styles/theme-dark/el-ui/tabs.less b/src/styles/theme-dark/el-ui/tabs.less new file mode 100644 index 0000000..3ca346b --- /dev/null +++ b/src/styles/theme-dark/el-ui/tabs.less @@ -0,0 +1,287 @@ +.el-tabs{} + +.el-tabs__header{ + border-bottom: 1px solid #26defd; + padding: 0; + position: relative; + margin: 0 0 15px; +} + +.el-tabs__active-bar{ + position: absolute; + bottom: 0; + left: 0; + height: 3px; + background-color: #26defd; + z-index: 1; + transition: transform .3s cubic-bezier(.645,.045,.355,1); + list-style: none; +} + +.el-tabs__new-tab{ + float: right; + border: 1px solid #d3dce6; + height: 18px; + width: 18px; + line-height: 18px; + margin: 12px 0 9px 10px; + border-radius: 3px; + text-align: center; + font-size: 12px; + color: #d3dce6; + cursor: pointer; + transition: all .15s; +} + +.el-tabs__new-tab .el-icon-plus { + transform: scale(0.8, 0.8); +} + +.el-tabs__new-tab:hover{ + color: #26defd; +} + +.el-tabs__nav-wrap{ + overflow: hidden; + margin-bottom: -1px; + position: relative; +} + +.el-tabs__nav-wrap.is-scrollable{ + padding: 0 15px; +} + +.el-tabs__nav-scroll{ + overflow: hidden; +} + +.el-tabs__nav-next, .el-tabs__nav-prev{ + position: absolute; + cursor: pointer; + line-height: 44px; + font-size: 12px; + color: rgb(131, 145, 165); +} + +.el-tabs__nav-next{ + right: 0; +} + +.el-tabs__nav-prev{ + left: 0; +} + +.el-tabs__nav{ + white-space: nowrap; + position: relative; + transition: transform .3s; + float: left; +} + +.el-tabs__item{ + padding: 0 16px; + height: 42px; + box-sizing: border-box; + line-height: 42px; + display: inline-block; + list-style: none; + font-size: 14px; + color: #fff; + position: relative; +} + +.el-tabs__item .el-icon-close{ + border-radius: 50%; + text-align: center; + transition: all .3s cubic-bezier(.645,.045,.355,1); + margin-left: 5px; +} + +.el-tabs__item .el-icon-close:before{ + transform: scale(.7, .7); + display: inline-block; +} + +.el-tabs__item .el-icon-close:hover{ + background-color: rgb(151, 168, 190); + color: transparent; +} + +.el-tabs__item:hover{ + color: #26defd; + cursor: pointer; +} + +.el-tabs__item.is-disabled{ + color: #bbb; + cursor: default; +} + +.el-tabs__item.is-active{ + color: #26defd; +} + +.el-tabs__content{ + overflow: hidden; + position: relative; +} + +.el-tabs--card > .el-tabs__header .el-tabs__active-bar { + display: none; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item .el-icon-close { + position: relative; + font-size: 12px; + width: 0; + height: 14px; + vertical-align: middle; + line-height: 15px; + overflow: hidden; + top: -1px; + right: -2px; + transform-origin: 100% 50%; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item { + border: 1px solid transparent; + transition: all .3s cubic-bezier(.645,.045,.355,1) +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-closable{} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-closable:hover{ + padding-right: 9px; + padding-left: 9px; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-closable:hover .el-icon-close{ + width: 14px; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active{ + border: 1px solid #26defd; + border-bottom-color: transparent; + border-radius: 4px 4px 0 0; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable{ + padding-right: 16px; + padding-left: 16px; +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable .el-icon-close{ + width: 14px; +} + +.el-tabs--border-card{ + background: transparent; + border: 1px solid #26defd; + box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.12), 0px 0px 6px 0px rgba(0,0,0,0.04); +} + +.el-tabs--border-card >.el-tabs__content { + padding: 15px; +} + +.el-tabs--border-card >.el-tabs__header { + background-color: #194B5B; + margin: 0; +} + +.el-tabs--border-card >.el-tabs__header .el-tabs__item { + transition: all .3s cubic-bezier(.645,.045,.355,1); + border: 1px solid transparent; + border-top: 0; + margin-right: -1px; + margin-left: -1px +} + +.el-tabs--border-card >.el-tabs__header .el-tabs__item.is-active{ + background-color: transparent; + border-right-color: #26defd; + border-left-color: #26defd; +} + +.el-tabs--border-card >.el-tabs__header .el-tabs__item.is-active:first-child{ + border-left-color: #26defd; +} + +.el-tabs--border-card >.el-tabs__header .el-tabs__item.is-active:last-child{ + border-right-color: #26defd; +} + +.slideInRight-transition, .slideInLeft-transition { + display: inline-block; +} +.slideInRight-enter { + animation: slideInRight-enter .3s; +} +.slideInRight-leave { + position: absolute; + left: 0; + right: 0; + animation: slideInRight-leave .3s; +} +.slideInLeft-enter { + animation: slideInLeft-enter .3s; +} +.slideInLeft-leave { + position: absolute; + left: 0; + right: 0; + animation: slideInLeft-leave .3s; +} + +@keyframes slideInRight-enter { + 0% { + opacity: 0; + transform-origin: 0 0; + transform: translateX(100%) + } + + to { + opacity: 1; + transform-origin: 0 0; + transform: translateX(0) + } +} +@keyframes slideInRight-leave { + 0% { + transform-origin: 0 0; + transform: translateX(0); + opacity: 1 + } + + 100% { + transform-origin: 0 0; + transform: translateX(100%); + opacity: 0 + } +} +@keyframes slideInLeft-enter { + 0% { + opacity: 0; + transform-origin: 0 0; + transform: translateX(-100%) + } + + to { + opacity: 1; + transform-origin: 0 0; + transform: translateX(0) + } +} +@keyframes slideInLeft-leave { + 0% { + transform-origin: 0 0; + transform: translateX(0); + opacity: 1 + } + + 100% { + transform-origin: 0 0; + transform: translateX(-100%); + opacity: 0 + } +} diff --git a/src/styles/theme-dark/el-ui/tag.less b/src/styles/theme-dark/el-ui/tag.less new file mode 100644 index 0000000..38a85f7 --- /dev/null +++ b/src/styles/theme-dark/el-ui/tag.less @@ -0,0 +1,3 @@ +.el-tag--primary{ + color: @dark--text-base; +} \ No newline at end of file diff --git a/src/styles/theme-dark/el-ui/textarea.less b/src/styles/theme-dark/el-ui/textarea.less new file mode 100644 index 0000000..280a1d3 --- /dev/null +++ b/src/styles/theme-dark/el-ui/textarea.less @@ -0,0 +1,11 @@ +.el-textarea__inner{ + background-color: @dark--background-base; + border: 1px solid @dark--border-color-base; + color: @dark--text-base; +} +.el-textarea__inner:hover{ + border: 1px solid @dark--primary-color; +} +.el-textarea__inner:focus{ + border: 1px solid @dark--primary-color; +} diff --git a/src/styles/theme-dark/el-ui/tree.less b/src/styles/theme-dark/el-ui/tree.less new file mode 100644 index 0000000..3c8f4b1 --- /dev/null +++ b/src/styles/theme-dark/el-ui/tree.less @@ -0,0 +1,105 @@ +.el-tree{ + cursor: default; + background: transparent; + border: none; + color: #a5a8ad; +} + +.el-tree__empty-block{ + position: relative; + min-height: 60px; + text-align: center; + width: 100%; + height: 100%; +} + +.el-tree__empty-text{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: rgb(94, 115, 130); +} + +.el-tree-node{ + white-space: nowrap; +} + +.el-tree-node > .el-tree-node__children{ + overflow: hidden; + background-color: transparent; +} + +.el-tree-node.is-expanded > .el-tree-node__children{ + display: block; +} + +.el-tree-node__content{ + line-height: 36px; + height: 36px; + cursor: pointer; +} + +.el-tree-node__content > .el-checkbox, .el-tree-node__content > .el-tree-node__expand-icon{ + margin-right: 8px; +} + +.el-tree-node__content > .el-checkbox{ + vertical-align: middle; +} + +.el-tree-node__content:hover{ + background: #1b90ab; + color: #fff; +} + +.el-tree-node__expand-icon{ + display: inline-block; + cursor: pointer; + width: 0; + height: 0; + vertical-align: middle; + margin-left: 10px; + border: 6px solid transparent; + border-right-width: 0; + border-left-color: rgb(151, 168, 190); + border-left-width: 7px; + transform: rotate(0deg); + transition: transform 0.3s ease-in-out; +} + +.el-tree-node__expand-icon:hover{ + border-left-color: #fff; +} + +.el-tree-node__expand-icon.expanded{ + transform: rotate(90deg); +} + +.el-tree-node__expand-icon.is-leaf{ + border-color: transparent; + cursor: default; +} + +.el-tree-node__label{ + font-size: 14px; + vertical-align: middle; + display: inline-block; +} + +.el-tree-node__loading-icon{ + display: inline-block; + vertical-align: middle; + margin-right: 4px; + font-size: 14px; + color: rgb(151, 168, 190); +} + +.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { + background-color: #1b90ab; + color: #fff; +} + +.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content > .el-tree-node__expand-icon { + border-left-color: #fff; +} diff --git a/src/styles/theme-dark/el-ui/upload.less b/src/styles/theme-dark/el-ui/upload.less new file mode 100644 index 0000000..bfcb2ff --- /dev/null +++ b/src/styles/theme-dark/el-ui/upload.less @@ -0,0 +1,8 @@ +.el-upload-dragger{ + background-color: @dark--background-base; + border: 1px solid @dark--border-color-base; + color: @dark--text-base; +} +.el-upload-dragger .el-upload__text em{ + color: @dark--link-color; +} diff --git a/src/styles/theme-dark/index.less b/src/styles/theme-dark/index.less new file mode 100644 index 0000000..c4a25b1 --- /dev/null +++ b/src/styles/theme-dark/index.less @@ -0,0 +1,98 @@ +@import "./variable"; + +.dark { + background-color: @dark--background-base; + color: @dark--primary-color; + + // 瀹氫箟婊氬姩鏉¢珮瀹藉強鑳屾櫙 楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄 + ::-webkit-scrollbar { + width: 9px; + height: 9px; + background: transparent; + } + + // 瀹氫箟婊氬姩鏉¤建閬� 鍐呴槾褰�+鍦嗚 + ::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0); + border-radius: 10px; + background-color: transparent; + } + + // 瀹氫箟婊戝潡 鍐呴槾褰�+鍦嗚 + ::-webkit-scrollbar-thumb { + border: 1px solid #4c5a62; + border-radius: 10px; + background: rgba(76, 90, 98, .7); + } + + // 鏂囧瓧閫変腑鑳屾櫙 + * ::selection { + background: rgba(64, 158, 255, .6); + } + + // 瓒呴摼鎺� + a { + color: @dark--link-color; + background: transparent; + + &:hover { + color: @dark--link-hover-color; + } + + &:active { + color: @dark--link-active-color; + } + + &:active, + &:hover { + outline: 0; + text-decoration: none; + } + + &[disabled] { + color: #ccc; + cursor: @dark--link-disabled-color; + pointer-events: none; + } + } + + // 鑷畾涔塪ialog搴曢儴footer鏍峰紡 + .vef-dialog-slot-footer { + border-top: 1px solid @dark--popup-border-color; + background-color: @dark--popup-title-background; + text-align: right; + padding: 10px 20px; + } + + /* app + -------------------------- */ + @import "./base/BaseCard"; + + + /* Element-UI + -------------------------- */ + @import "./el-ui/table"; + @import "./el-ui/pagination"; + @import "./el-ui/select"; + @import "./el-ui/select-dropdown"; + @import "./el-ui/button"; + @import "./el-ui/tabs"; + @import "./el-ui/tree"; + @import "./el-ui/checkbox"; + @import "./el-ui/input"; + @import "./el-ui/checkbox-button"; + @import "./el-ui/form"; + @import "./el-ui/dialog"; + @import "./el-ui/eChartBtn"; + @import "./el-ui/popover"; + @import "./el-ui/date-picker"; + @import "./el-ui/radio"; + @import "./el-ui/card"; + @import "./el-ui/collapse"; + @import "./el-ui/textarea"; + @import "./el-ui/upload"; + @import "./el-ui/cascader"; + @import "./el-ui/tag"; + @import "./el-ui/message"; + @import "./el-ui/loading"; +} diff --git a/src/styles/theme-dark/variable.less b/src/styles/theme-dark/variable.less new file mode 100644 index 0000000..430a7b4 --- /dev/null +++ b/src/styles/theme-dark/variable.less @@ -0,0 +1,92 @@ +@import "../common/variable"; + +/* 涓婚鑹� +-------------------------- */ +@dark--primary-color: #26DEFD; +@dark--primary-darkness-color-1: #27CBEB; // 涓婚鑹蹭寒搴�20 +@dark--primary-darkness-color-2: #25AECD; // 涓婚鑹蹭寒搴�50 +@dark--primary-darkness-color-3: #20809B; // 涓婚鑹蹭寒搴�100 + +@dark--primary-opacity-color-1: rgba(38, 222, 253, .1); +@dark--primary-opacity-color-1-5: rgba(38, 222, 253, .15); +@dark--primary-opacity-color-3: rgba(38, 222, 253, .3); + +/* Base +-------------------------- */ +@dark--title-color: #f7faff; +@dark--text-base: #e4e8f1; +@dark--text-secondary: #BBC3CD; +@dark--text-placeholder: #97a8be; +@dark--text-disabled: #677287; + +@dark--background-base: #091e33; +@dark--background-header: #324157; +@dark--background-body: #202e3e; + +/* border +-------------------------- */ +@dark--border-color-base: @dark--primary-darkness-color-2; // 涓婚鑹蹭寒搴�50 +@dark--border-color-light: @dark--primary-darkness-color-1; // 涓婚鑹蹭寒搴�20 + +/* popover +-------------------------- */ +@dark--popover-body-color: @dark--background-body; +@dark--popover-border-color: @dark--border-color-base; + +/* collapse +-------------------------- */ +@dark--collapse-text-color: @dark--text-base; +@dark--collapse-title-color: @dark--title-color; +@dark--collapse-header-background: @dark--background-header; +@dark--collapse-container-background: @dark--background-base; +@dark--collapse-border-color: @dark--border-color-base; + +/* popup +-------------------------- */ +@dark--popup-title-color: @dark--title-color; + +@dark--popup-border-color-1: #092c42; // 璁惧閰嶇疆鏌ョ湅椤甸潰锛屼笅闈ivew绮梑order +@dark--popup-title-background: @dark--background-header; +@dark--popup-border-color: @dark--background-header; +@dark--popup-background: @dark--background-base; + +/* link +-------------------------- */ +@dark--link-color: @color-blue; +@dark--link-hover-color: @color-blue-light; +@dark--link-active-color: @color-blue-light; +@dark--link-disabled-color: @dark--text-secondary; + +/* table +-------------------------- */ +@dark--table-title-color: @dark--title-color; +@dark--table-text-color: @dark--text-base; +@dark--table-title-background: @dark--primary-opacity-color-3; +@dark--table-row-current-background: @dark--primary-opacity-color-1-5; +@dark--table-row-hover-background: @dark--primary-opacity-color-1-5; +@dark--table-border-color: @dark--border-color-base; + +/* select +-------------------------- */ +@dark--select-text-color: @dark--text-base; +@dark--select-dropdown-background: @dark--background-body; +@dark--select-border-color: @dark--border-color-base; +@dark--select-border-light-color: @dark--border-color-light; +@dark--select-hover-background: @dark--primary-opacity-color-1; +@dark--select-selected-background: @dark--primary-opacity-color-3; + +/* input +-------------------------- */ +@dark--input-text-color: @dark--text-base; + +/* pagination +-------------------------- */ +@dark--pagination-text-color: @dark--text-base; +@dark--pagination-text-hover-color: @dark--primary-color; +@dark--pagination-border-color: @dark--border-color-base; +@dark--pagination-selected-background: @dark--primary-opacity-color-3; + +/* Button +-------------------------- */ +@dark--button-text-color: @dark--text-base; +@dark--button-primary-background-color: @dark--primary-darkness-color-3; diff --git a/src/utils/AjaxUtils.js b/src/utils/AjaxUtils.js new file mode 100644 index 0000000..c040419 --- /dev/null +++ b/src/utils/AjaxUtils.js @@ -0,0 +1,111 @@ +import $ from 'jquery' + +/** + * 瀵筳query鐨勫皝瑁卆jax鐨勪紶鏁版嵁鏂规硶 + * @param pUrl 璇锋眰鐨剈rl + * @param pData 鍙傛暟 + * @param pBackFun 鎴愬姛鍥炶皟 + */ +function post4JsonDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'post', + url: pUrl, + dataType: 'json', + data: pData, + async: true, + success: function(datas, nnn) { + console.log(nnn) + pBackFun(datas) + }, + error: function(err, nnnn) { + console.log(nnnn) + console.error('鏁版嵁鑾峰彇澶辫触', err, pUrl) + } + }) +} + +/** + * 瀵筳query鐨勫皝瑁卆jax鐨勫彇鏁版嵁鏂规硶 + * @param pUrl 璇锋眰鐨剈rl + * @param pData 鍙傛暟 + * @param pBackFun 鎴愬姛鍥炶皟 + */ +function get4JsonDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'get', + url: pUrl, + dataType: 'json', + data: pData, + async: true, + success: function(datas, nnn) { + console.log(nnn) + pBackFun(datas) + }, + error: function(err, nnnn) { + console.log(nnnn) + console.error('鏁版嵁鑾峰彇澶辫触', err, pUrl) + } + }) +} + +function GetDataAsynByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'GET', + url: pUrl, + data: pData, + timeout: 600000, + async: true, + success: function(datas, nnn) { + console.log(nnn) + pBackFun(datas) + }, + error: function(e, nnnn) { + console.log(e,nnnn) + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} +function postDataAsynByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'post', + url: pUrl, + data: pData, + timeout: 600000, + async: true, + success: function(datas, nnn) { + console.log(nnn) + pBackFun(datas) + }, + error: function(e, nnnn) { + console.log(e,nnnn) + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} + +function GetDataByUrl(pUrl, pData, pBackFun) { + $.ajax({ + type: 'GET', + url: pUrl, + data: pData, + timeout: 600000, + success: function(datas, nnn) { + console.log(nnn) + pBackFun(datas) + }, + error: function(e, nnnn) { + console.log(nnnn) + // tmpErrJSONTextParse(e, pBackFun) // todo SGIS Server鏈変釜WFS鍥惧眰鏈嶅姟json瑙f瀽閿欒锛� 杩欓噷鏄殏鏃跺鐞嗭紝绛夎繃鍑犲ぉ榛庤��淇敼濂戒簡锛岃繖閲岄渶瑕佷慨鏀瑰洖鍘汇�� + console.log('杩斿洖鐨勯敊璇俊鎭細', e) + console.error('鏁版嵁鑾峰彇澶辫触', pUrl) + } + }) +} + +export default { + post4JsonDataByUrl, + get4JsonDataByUrl, + GetDataAsynByUrl, + postDataAsynByUrl, + GetDataByUrl +} diff --git a/src/utils/DateUtils.js b/src/utils/DateUtils.js new file mode 100644 index 0000000..6d6d868 --- /dev/null +++ b/src/utils/DateUtils.js @@ -0,0 +1,29 @@ +/** + * 鏃ユ湡鏍煎紡鍖� + * @param fmt + * @param date + * @returns {*} + */ +function dateFormat(fmt, date) { + let ret + const opt = { + 'Y+': date.getFullYear().toString(), // 骞� + 'm+': (date.getMonth() + 1).toString(), // 鏈� + 'd+': date.getDate().toString(), // 鏃� + 'H+': date.getHours().toString(), // 鏃� + 'M+': date.getMinutes().toString(), // 鍒� + 'S+': date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + } + for (let k in opt) { + ret = new RegExp('(' + k + ')').exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], (ret[1].length === 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, '0'))) + } + } + return fmt +} + +export default { + dateFormat +} diff --git a/src/utils/GISUtil.js b/src/utils/GISUtil.js new file mode 100644 index 0000000..c808bfd --- /dev/null +++ b/src/utils/GISUtil.js @@ -0,0 +1,156 @@ +// ==============鍧愭爣绯昏浆鎹�=============== +var GSP = { + PI: 3.14159265358979324, + x_pi: 3.14159265358979324 * 3000.0 / 180.0, + delta: function(lat, lon) { + // Krasovsky 1940 + // + // a = 6378245.0, 1/f = 298.3 + // b = a * (1 - f) + // ee = (a^2 - b^2) / a^2; + var a = 6378245.0 // a: 鍗槦妞悆鍧愭爣鎶曞奖鍒板钩闈㈠湴鍥惧潗鏍囩郴鐨勬姇褰卞洜瀛愩�� + var ee = 0.00669342162296594323 // ee: 妞悆鐨勫亸蹇冪巼銆� + var dLat = this.transformLat(lon - 105.0, lat - 35.0) + var dLon = this.transformLon(lon - 105.0, lat - 35.0) + var radLat = lat / 180.0 * this.PI + var magic = Math.sin(radLat) + magic = 1 - ee * magic * magic + var sqrtMagic = Math.sqrt(magic) + dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * this.PI) + dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * this.PI) + return { 'lat': dLat, 'lon': dLon } + }, + + // WGS-84 to GCJ-02 + gcj_encrypt: function(wgsLat, wgsLon) { + if (this.outOfChina(wgsLat, wgsLon)) { return { 'lat': wgsLat, 'lon': wgsLon } } + + var d = this.delta(wgsLat, wgsLon) + return { 'lat': wgsLat + d.lat, 'lon': wgsLon + d.lon } + }, + // GCJ-02 to WGS-84 + gcj_decrypt: function(gcjLat, gcjLon) { + if (this.outOfChina(gcjLat, gcjLon)) { return { 'lat': gcjLat, 'lon': gcjLon } } + + var d = this.delta(gcjLat, gcjLon) + return { 'lat': gcjLat - d.lat, 'lon': gcjLon - d.lon } + }, + // GCJ-02 to WGS-84 exactly + gcj_decrypt_exact: function(gcjLat, gcjLon) { + let initDelta = 0.01 + let threshold = 0.000000001 + let dLat = initDelta + let dLon = initDelta + let mLat = gcjLat - dLat + let mLon = gcjLon - dLon + let pLat = gcjLat + dLat + let pLon = gcjLon + dLon + let wgsLat + let wgsLon + let i = 0 + while (1) { + wgsLat = (mLat + pLat) / 2 + wgsLon = (mLon + pLon) / 2 + var tmp = this.gcj_encrypt(wgsLat, wgsLon) + dLat = tmp.lat - gcjLat + dLon = tmp.lon - gcjLon + if ((Math.abs(dLat) < threshold) && (Math.abs(dLon) < threshold)) { break } + + if (dLat > 0) pLat = wgsLat; else mLat = wgsLat + if (dLon > 0) pLon = wgsLon; else mLon = wgsLon + + if (++i > 10000) break + } + // console.log(i); + return { 'lat': wgsLat, 'lon': wgsLon } + }, + // GCJ-02 to BD-09 + bd_encrypt: function(gcjLat, gcjLon) { + let x = gcjLon + let y = gcjLat + let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * this.x_pi) + let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * this.x_pi) + let bdLon = z * Math.cos(theta) + 0.0065 + let bdLat = z * Math.sin(theta) + 0.006 + return { 'lat': bdLat, 'lon': bdLon } + }, + // BD-09 to GCJ-02 + bd_decrypt: function(bdLat, bdLon) { + let x = bdLon - 0.0065 + let y = bdLat - 0.006 + let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * this.x_pi) + let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * this.x_pi) + let gcjLon = z * Math.cos(theta) + let gcjLat = z * Math.sin(theta) + return { 'lat': gcjLat, 'lon': gcjLon } + }, + // WGS-84 to Web mercator + // mercatorLat -> y mercatorLon -> x + mercator_encrypt: function(wgsLat, wgsLon) { + let x = wgsLon * 20037508.34 / 180.0 + let y = Math.log(Math.tan((90.0 + wgsLat) * this.PI / 360.0)) / (this.PI / 180.0) + y = y * 20037508.34 / 180.0 + return { 'lat': y, 'lon': x } + /* + if ((Math.abs(wgsLon) > 180 || Math.abs(wgsLat) > 90)) + return null; + var x = 6378137.0 * wgsLon * 0.017453292519943295; + var a = wgsLat * 0.017453292519943295; + var y = 3189068.5 * Math.log((1.0 + Math.sin(a)) / (1.0 - Math.sin(a))); + return {'lat' : y, 'lon' : x}; + //*/ + }, + // Web mercator to WGS-84 + // mercatorLat -> y mercatorLon -> x + mercator_decrypt: function(mercatorLat, mercatorLon) { + var x = mercatorLon / 20037508.34 * 180.0 + var y = mercatorLat / 20037508.34 * 180.0 + y = 180 / this.PI * (2 * Math.atan(Math.exp(y * this.PI / 180.0)) - this.PI / 2) + return { 'lat': y, 'lon': x } + /* + if (Math.abs(mercatorLon) < 180 && Math.abs(mercatorLat) < 90) + return null; + if ((Math.abs(mercatorLon) > 20037508.3427892) || (Math.abs(mercatorLat) > 20037508.3427892)) + return null; + var a = mercatorLon / 6378137.0 * 57.295779513082323; + var x = a - (Math.floor(((a + 180.0) / 360.0)) * 360.0); + var y = (1.5707963267948966 - (2.0 * Math.atan(Math.exp((-1.0 * mercatorLat) / 6378137.0)))) * 57.295779513082323; + return {'lat' : y, 'lon' : x}; + //*/ + }, + // two point's distance + distance: function(latA, lonA, latB, lonB) { + var earthR = 6371000.0 + var x = Math.cos(latA * this.PI / 180.0) * Math.cos(latB * this.PI / 180.0) * Math.cos((lonA - lonB) * this.PI / 180) + var y = Math.sin(latA * this.PI / 180.0) * Math.sin(latB * this.PI / 180.0) + var s = x + y + if (s > 1) s = 1 + if (s < -1) s = -1 + var alpha = Math.acos(s) + var distance = alpha * earthR + return distance + }, + outOfChina: function(lat, lon) { + if (lon < 72.004 || lon > 137.8347) { return true } + if (lat < 0.8293 || lat > 55.8271) { return true } + return false + }, + transformLat: function(x, y) { + var ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x)) + ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0 + ret += (20.0 * Math.sin(y * this.PI) + 40.0 * Math.sin(y / 3.0 * this.PI)) * 2.0 / 3.0 + ret += (160.0 * Math.sin(y / 12.0 * this.PI) + 320 * Math.sin(y * this.PI / 30.0)) * 2.0 / 3.0 + return ret + }, + transformLon: function(x, y) { + var ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x)) + ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0 + ret += (20.0 * Math.sin(x * this.PI) + 40.0 * Math.sin(x / 3.0 * this.PI)) * 2.0 / 3.0 + ret += (150.0 * Math.sin(x / 12.0 * this.PI) + 300.0 * Math.sin(x / 30.0 * this.PI)) * 2.0 / 3.0 + return ret + } +} + +export default { + GSP +} diff --git a/src/utils/JsonUtils.js b/src/utils/JsonUtils.js new file mode 100644 index 0000000..d0cfef2 --- /dev/null +++ b/src/utils/JsonUtils.js @@ -0,0 +1,48 @@ +/** + * @param {Object} json + * @param {Object} type锛� 榛樿涓嶄紶 ==>鍏ㄩ儴灏忓啓;浼�1 ==>鍏ㄩ儴澶у啓;浼�2 ==>棣栧瓧姣嶅ぇ鍐� + * 灏唈son鐨刱ey鍊艰繘琛屽ぇ灏忓啓杞崲 + */ +function jsonKeysToCase(json, type) { + if (typeof json === 'object') { + var tempJson = JSON.parse(JSON.stringify(json)) + toCase(tempJson) + return tempJson + } else { + return json + } + + function toCase(json) { + if (typeof json === 'object') { + if (Array.isArray(json)) { + json.forEach(function(item) { + toCase(item) + }) + } else { + for (var key in json) { + var item = json[key] + if (typeof item === 'object') { + toCase(item) + } + delete (json[key]) + switch (type) { + case 1: + // key鍊煎叏閮ㄥぇ鍐� + json[key.toLocaleUpperCase()] = item + break + case 2: + // key鍊奸瀛楁瘝澶у啓锛屽叾浣欏皬鍐� + json[key.substring(0, 1).toLocaleUpperCase() + key.substring(1).toLocaleLowerCase()] = item + break + default: + // 榛樿key鍊煎叏閮ㄥ皬鍐� + json[key.toLocaleLowerCase()] = item + break + } + } + } + } + } +} + +export default jsonKeysToCase diff --git a/src/utils/MiscUtils.js b/src/utils/MiscUtils.js new file mode 100644 index 0000000..9752f95 --- /dev/null +++ b/src/utils/MiscUtils.js @@ -0,0 +1,118 @@ +// 鍙傛暟鍚嶇О:authCode 鍊�: 鎵�鏈�:0 鍖栧伐閿�鍞�:HXXT; 鐐兼补閿�鍞�:LXXT; 姹熻嫃鐭虫补:CPYXT; 閿�鍞崕涓�:XSHD +let SysAuthCode = '0' +/** + * Created by liangruizhe on 2019/01/14 + */ +// ==============鏃堕棿=============== +// 鑾峰彇褰撳墠鏃堕棿 +function GetCurrentTime() { + var today = new Date() + var year = today.getFullYear() + var month = today.getMonth() + 1 + var day = today.getDate() > 9 ? today.getDate() : '0' + today.getDate() + var hours = today.getHours() > 9 ? today.getHours() : '0' + today.getHours() + var minutes = today.getMinutes() > 9 ? today.getMinutes() : '0' + today.getMinutes() + var seconds = today.getSeconds() > 9 ? today.getSeconds() : '0' + today.getSeconds() + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds +} +// 鑾峰彇褰撳ぉ闆剁偣鏃堕棿 +function GetCurrentDayTime() { + var today = new Date() + var year = today.getFullYear() + var month = today.getMonth() + 1 + var day = today.getDate() > 9 ? today.getDate() : '0' + today.getDate() + return year + '-' + month + '-' + day + ' 00:01:01' +} +// UtcToDateTime +function UtcToDateTime(time) { + var date = new Date(time) + var year = date.getFullYear() + var month = date.getMonth() + 1 + var day = date.getDate() + var hour = date.getHours() + var minute = date.getMinutes() + var second = date.getSeconds() + return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second +} +// UtcToMonDate +function UtcToMonDate(time) { + var date = new Date(time) + var month = date.getMonth() + 1 + var day = date.getDate() + var hour = date.getHours() + var minute = date.getMinutes() + var second = date.getSeconds() + return month + '/' + day + ' ' + hour + ':' + minute + ':' + second +} +// yyyy-MM-dd +function convertDateFromString(dateString) { + if (dateString) { + var date = new Date(dateString.replace(/-/, '/')) + return date + } +} +// yyyy-MM-dd hh:mm:ss +function convertDateTimeFromString(dateString) { + if (dateString) { + var arr1 = dateString.split(' ') + var sdate = arr1[0].split('-') + var stime = arr1[1].split(':') + var date = new Date(sdate[0], sdate[1] - 1, sdate[2], stime[0], stime[1], stime[2]) + return date + } +} +// ==============绌洪棿璁$畻=============== +// 璁$畻鐐逛覆璺濈 +function getLength(arrPnts, isJwd) { + var dist = 0 + var length = 0 + var offset = 103133.845 + var fntPnt = null + var lastPnt = null + if (isJwd === undefined) isJwd = true + if (arrPnts.length < 2) { + return 0 + } + for (var i = 0; i < arrPnts.length - 1; i++) { + fntPnt = arrPnts[i] + lastPnt = arrPnts[i + 1] + if (lastPnt) { + var xD = Math.abs(fntPnt.x - lastPnt.x) + var yD = Math.abs(fntPnt.y - lastPnt.y) + + if (isJwd) { + if (Math.abs(fntPnt.x) > 180) { + xD = xD / 3600 + yD = yD / 3600 + } + dist = (Math.sqrt(Math.pow(xD, 2) + Math.pow(yD, 2))) * offset + } else { + dist = (Math.sqrt(Math.pow(xD, 2) + Math.pow(yD, 2))) + } + + length += dist + } + } + return length +} + +// 璁$畻鐐瑰埌绾挎鐨勮窛绂� +function getDistance(point, lineP1, lineP2) { + var a = Number((lineP1.y - lineP2.y) / (lineP1.x - lineP2.x)) + var b = -1 + var c = Number(lineP2.y - a * lineP2.x) + var td = Math.abs(a * point.x + b * point.y + c) / Math.sqrt(a * a + b * b) + return td +} + +export default { + SysAuthCode, + getDistance, + getLength, + GetCurrentTime, + GetCurrentDayTime, + UtcToDateTime, + UtcToMonDate, + convertDateFromString, + convertDateTimeFromString +} diff --git a/src/utils/MixinAuthority.js b/src/utils/MixinAuthority.js new file mode 100644 index 0000000..5403f9b --- /dev/null +++ b/src/utils/MixinAuthority.js @@ -0,0 +1,83 @@ +import $API from '@/api' +import $http from '@/utils/axios' +import * as $T from '@utils/tools' + +export default { + data() { + return { + isOauthAdd: true, + isOauthEdit: true, + isOauthDelete: true, + isOauthExport: true, + isOauthImport: true, + isOauthStart: true, + isOauthStop: true, + isOnlyQuery: false + } + }, + provide: function() { + return { + oauth: this.$data + } + }, + methods: {}, + created() {}, + mounted() {}, + beforeRouteEnter(to, from, next) { + const routerName = to.name + $http.get($API.AAA_GET_PAGES_RESOURCE, { + pageCode: routerName + }).then(response => { + const str = response.data + if (!str.includes('query')) { + $T.warning('鎮ㄦ病鏈夋潈闄愭煡鐪嬮〉闈㈠唴瀹癸紝璇疯仈绯荤鐞嗗憳鍒嗛厤鏉冮檺锛�') + return + } + // 澶勭悊鏉冮檺 + next(vm => { + // 浠呮湁鏌ヨ鏉冮檺鐨勬椂鍊� + if (str === 'query') { + vm.isOnlyQuery = true + } + + // 娌℃湁娣诲姞鏉冮檺鐨勫満鏅� + if (!str.includes('add')) { + vm.isOauthAdd = false + } + + // 娌℃湁淇敼鏉冮檺鐨勫満鏅� + if (!str.includes('edit')) { + vm.isOauthEdit = false + } + + // 娌℃湁鍒犻櫎鏉冮檺鐨勫満鏅� + if (!str.includes('delete')) { + vm.isOauthDelete = false + } + + // 娌℃湁瀵煎嚭鏉冮檺鐨勫満鏅� + if (!str.includes('export')) { + vm.isOauthExport = false + } + + // 娌℃湁瀵煎叆鏉冮檺鐨勫満鏅� + if (!str.includes('import')) { + vm.isOauthImport = false + } + + // 娌℃湁鍚敤鏉冮檺鐨勫満鏅� + if (!str.includes('start')) { + vm.isOauthStart = false + } + + // 娌℃湁鍋滅敤鏉冮檺鐨勫満鏅� + if (!str.includes('stop')) { + vm.isOauthStop = false + } + }) + }).catch(() => { + $T.error('鑾峰彇椤甸潰璧勬簮鏉冮檺澶辫触锛�') + // next() + }) + } +} diff --git a/src/utils/MixinEmitter.js b/src/utils/MixinEmitter.js new file mode 100644 index 0000000..ba41db1 --- /dev/null +++ b/src/utils/MixinEmitter.js @@ -0,0 +1,57 @@ +function broadcast(componentName, eventName, params) { + this.$children.forEach(child => { + const name = child.$options.name + + if (name === componentName) { + child.$emit.apply(child, [eventName].concat(params)) + } else { + // todo 濡傛灉 params 鏄┖鏁扮粍锛屾帴鏀跺埌鐨勪細鏄� undefined + broadcast.apply(child, [componentName, eventName].concat([params])) + } + }) +} + +export default { + methods: { + dispatch(componentName, eventName, params) { + let parent = this.$parent || this.$root + let name = parent.$options.name + + while (parent && (!name || name !== componentName)) { + parent = parent.$parent + + if (parent) { + name = parent.$options.name + } + } + if (parent) { + parent.$emit.apply(parent, [eventName].concat(params)) + } + }, + broadcast(componentName, eventName, params) { + broadcast.call(this, componentName, eventName, params) + }, + findComponentHandler(targetComponentName) { + let finedComponent = null + + function find(componentSubs) { + for (let i = 0, len = componentSubs.length; i < len; i++) { + let component = componentSubs[i] + let name = component.$options.name + if (name === targetComponentName) { + finedComponent = component + break + } + if (targetComponentName !== name) { + find(component.$children) + } else { + return true + } + } + } + + find(this.$children) + return finedComponent + } + } +} diff --git a/src/utils/authorityAPI.js b/src/utils/authorityAPI.js new file mode 100644 index 0000000..f847195 --- /dev/null +++ b/src/utils/authorityAPI.js @@ -0,0 +1,11 @@ +// 杩愯鍒嗘瀽 +export const EOOA_OAUTH_API = [ + 'eowc/equipmentConfig/notConfigEquipment' +] + +// 鐩戞帶棰勮 +export const EMEW_OAUTH_API = [ + 'eowc/equipmentConfig/notConfigEquipment' +] + +export const OAUTH_API_GROUP = [...EOOA_OAUTH_API, ...EMEW_OAUTH_API] diff --git a/src/utils/axios.js b/src/utils/axios.js new file mode 100644 index 0000000..e759790 --- /dev/null +++ b/src/utils/axios.js @@ -0,0 +1,214 @@ +import Vue from 'vue' +import axios from 'axios' +import * as $CONST from '@/utils/constant' +import * as $T from '@/utils/tools' +import $store from '@/store' + +/** + * 瀹氫箟浼犲叆鍙傛暟鏁版嵁鏍煎紡 + * + * === 鍒犻櫎鏁版嵁 === + * { + * key:['dataId1','dataId2'] + * } + * + */ + +/** + * 瀹氫箟杩斿洖鐨刯son鏁版嵁鏍煎紡 + * + * === 鍒嗛〉鏁版嵁 === + * { + * code:200, --- 鐩墠妗嗘灦璁や负0鍜�200閮芥槸鎴愬姛鐘舵�� + * message:'鎸変笟鍔¤嚜瀹氫箟', + * data:{ + * records:[{...},{...}], --- 鍙寜鑷繁涓氬姟鏇挎崲灞炴�� + * total:xx, --- 鍙寜鑷繁涓氬姟鏇挎崲灞炴�� + * size:xx, --- 鍙寜鑷繁涓氬姟鏇挎崲灞炴�� + * current:xx, --- 鍙寜鑷繁涓氬姟鏇挎崲灞炴�� + * pages:xx --- 鍙寜鑷繁涓氬姟鏇挎崲灞炴�� + * }, + * } + * + * === 鍒楄〃鏁版嵁 === + * + * { + * code:200, + * message:'鎸変笟鍔¤嚜瀹氫箟', + * data:[{..},{..}...] + * } + * + * === 涓�鏉℃暟鎹� === + * + * { + * code:200, + * message:'鎸変笟鍔¤嚜瀹氫箟', + * data:{...} + * } + * + * === 鏃犺繑鍥炴暟鎹� === + * + * { + * code:200, + * message:'鎸変笟鍔¤嚜瀹氫箟', + * data: null + * } + * + * === 鏍戝舰缁撴瀯 === + * + * { + * code:200, + * message:'鎸変笟鍔¤嚜瀹氫箟' + * data:[{ + * prop:xx, + * ... + * children: [ + * prop:xx, + * ... + * children:[...] + * ] + * }, + * { + * prop:xx, + * ... + * children: [ + * prop:xx, + * ... + * children:[...] + * ] + * }] + * } + * + */ + +// 鍒涘缓axios瀹炰緥 +const Service = axios.create({ + timeout: 1000 +}) + +const CancelToken = axios.CancelToken + +/* + function showDebugInfo(config) { + console.group('%cMethod::' + config.method + '::Url::' + config.url, 'color:red;font-size:12px;') + console.log('%c淇濆瓨/鏇存柊/鏌ョ湅鍦哄悎锛屼紶鍏ョ殑鍙傛暟::', 'font-size:12px;') + console.log(config.hasOwnProperty('params') ? JSON.stringify(config.params) : JSON.stringify(config.data)) + console.groupEnd() + } + + function filterOauthData(config) { + let url = config.url + if (config.method === 'post' && $t.isExistOauthApi(url)) { + // post璇锋眰鐨勫満鍚堜笅锛岃拷鍔犺鑹插悕绉� + } + + if (config.method === 'get' && $t.isExistOauthApi(url)) { + // get璇锋眰鐨勫満鍚堜笅锛岃拷鍔犺鑹插悕绉� + if (config.hasOwnProperty('params')) { + config.params['userCode'] = '' + } else { + config['params'] = {} + config.params['userCode'] = '' + } + } + return config + }*/ + +// request鎷︽埅鍣� +Service.interceptors.request.use( + config => { + // 涓存椂杩藉姞 + if ($store.state.user.account) { + config.headers.account = $store.state.user.account + } + let copyConfig = Object.assign({}, config) + // copyConfig = filterOauthData(copyConfig) + // showDebugInfo(copyConfig) + copyConfig.cancelToken = new CancelToken((c) => { + // 椤甸潰澶辨晥鍦烘櫙锛屽彇娑坧adding涓姹� + Vue.prototype.$cancels.push(c) + // todo 蹇�熷弻鍑诲彇娑堥噸澶嶈姹� + // 閲嶅璇锋眰鍦烘櫙锛屽彇娑堟帀涓婁竴涓湭padding涓姹� + }) + return copyConfig + }, + error => { + Promise.reject(error) + }) + +// respone鎷︽埅鍣� +Service.interceptors.response.use( + response => { + const res = response.data + if (Number(res.code) !== 200 && Number(res.code) !== 0) { + $T.warning(res.message) + return res + } else { + return res + } + }, + error => { + if (error.message && error.message.includes('timeout')) { + $T.fail($CONST.MSG_SYS_TIME_OUT) + return Promise.reject(error) + } + + if (!error.response) { + $T.fail($CONST.MSG_SYS_ERR) + return Promise.reject(error) + } + + switch (error.response.status) { + // http status handler + case 404: + $T.fail($CONST.MSG_SYS_404) + break + case 500: + $T.fail($CONST.MSG_SYS_ERR) + break + case 503: + $T.fail($CONST.MSG_SYS_503) + break + } + + return Promise.reject(error) + } +) + +const $http = {} +$http.$service = Service +$http.$axios = axios +$http.get = function(url, params = {}) { + if ($T.isInlineParams(url)) { + // 涓ユ牸閬靛惊restful鏍囧噯鐨剈rl鐨勫満鏅� + url = $T.replaceUrlParams(url, params) + params = {} + } + return Service({ + url: url, + method: 'get', + params: $T.filterParams(params) + }) +} +$http.post = function(url, data = {}) { + return Service({ + url: url, + method: 'post', + data: data + }) +} +$http.put = function(url, data = {}) { + return Service({ + url: url, + method: 'put', + data: data + }) +} +$http.delete = function(url, data = {}) { + return Service({ + url: url, + method: 'delete', + data: data + }) +} +export default $http diff --git a/src/utils/constant.js b/src/utils/constant.js new file mode 100644 index 0000000..877ff0d --- /dev/null +++ b/src/utils/constant.js @@ -0,0 +1,65 @@ +/* 鏃ユ湡璁剧疆 + -------------------------- */ +export const PICKER_OPTIONS_SHORTCUTS = [ + { + text: '浠婂ぉ', + onClick(picker) { + const end = new Date() + const start = new Date(new Date().toDateString()) + end.setTime(start.getTime()) + picker.$emit('pick', [start, end]) + } + }, { + text: '鏈�杩戜竴鍛�', + onClick(picker) { + const end = new Date(new Date().toDateString()) + const start = new Date() + start.setTime(end.getTime() - 3600 * 1000 * 24 * 7) + picker.$emit('pick', [start, end]) + } + }, { + text: '鏈�杩戜竴涓湀', + onClick(picker) { + const end = new Date(new Date().toDateString()) + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) + picker.$emit('pick', [start, end]) + } + }, { + text: '鏈�杩戜笁涓湀', + onClick(picker) { + const end = new Date(new Date().toDateString()) + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) + picker.$emit('pick', [start, end]) + } + }] + +/* 绯荤粺閿欒娑堟伅 + -------------------------- */ +export const MSG_SYS_ERR = '鏈嶅姟鍣ㄥ唴閮ㄨ繍琛岄敊璇紝璇风◢鍚庨噸璇曪紒' +export const MSG_SYS_TIME_OUT = '褰撳墠缃戠粶鐜杈冨樊锛岃闂秴鏃讹紝璇峰埛鏂伴噸璇曪紒' +export const MSG_SYS_404 = '璇锋眰鐨勮祫婧愪笉瀛樺湪锛�' +export const MSG_SYS_503 = '鏈嶅姟鍣ㄦ鍦ㄧ淮鎶わ紝璇风◢绛夛紒' +export const MSG_SYS_SUCCESS = '鎿嶄綔鎴愬姛锛�' +export const MSG_SYS_FAIL = '鎿嶄綔澶辫触锛�' +export const MSG_SYS_CANCELED = '鎿嶄綔宸插彇娑堬紒' +export const MSG_SYS_WARNING = '璀﹀憡锛屾湭鎸夎鍒欐搷浣滐紒' + +export const MSG_RULES_NUMBER = '蹇呴』涓烘暟瀛楀�硷紒' +export const MSG_RULES_REQUIRED = '涓嶈兘涓虹┖锛�' + +export const MSG_BUSINESS_DELETE = '鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画锛�' +export const MSG_BUSINESS_SUBMIT = '鎻愪氦璇ユ暟鎹�, 鏄惁缁х画锛�' +export const MSG_BUSINESS_SELECTED = '璇烽�夋嫨瑕佹搷浣滅殑鏁版嵁锛�' +export const MSG_BUSINESS_START = '鍚敤璇ユ暟鎹�, 鏄惁缁х画锛�' +export const MSG_BUSINESS_STOP = '鍋滅敤璇ユ暟鎹�, 鏄惁缁х画锛�' +export const MSG_BUSINESS_IMPORT = '璇疯�愬績绛夊緟锛屾暟鎹鍏ヤ腑...' +export const MSG_BUSINESS_EXPORT = '璇疯�愬績绛夊緟锛屾暟鎹鍑轰腑...' +export const MSG_BUSINESS_EXPORT_ALL = '瀵煎嚭鏉′欢绛涢�夊嚭鐨勫叏閮ㄦ暟鎹�' +export const MSG_BUSINESS_UPLOAD = '璇疯�愬績绛夊緟锛屾枃浠朵笂浼犱腑...' +export const MSG_BUSINESS_UPLOAD_SUCCESS = '涓婁紶鎴愬姛锛�' +export const MSG_BUSINESS_UPLOAD_FAIL = '涓婁紶澶辫触锛�' +export const MSG_BUSINESS_UPLOAD_IMG = '涓婁紶鍥剧墖鍙兘鏄� JPG/PNG 鏍煎紡锛�' +export const MSG_BUSINESS_UPLOAD_SIZE_2M = '涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃 2MB锛�' +export const MSG_BUSINESS_UPLOAD_SIZE_10M = '涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃 10MB锛�' diff --git a/src/utils/dictionary.js b/src/utils/dictionary.js new file mode 100644 index 0000000..76b3c46 --- /dev/null +++ b/src/utils/dictionary.js @@ -0,0 +1,782 @@ +/* 涓氬姟瀛楀吀 + -------------------------- */ +// 杞﹁締璇佷欢绫诲瀷 +export const DICT_CAR_CERTIFICATE_TYPE = [ + { + typeName: '钀ヤ笟鎵х収', + type: '120001' + }, + { + typeName: '鍗遍櫓璐х墿閬撹矾杩愯緭缁忚惀璁稿彲璇�', + type: '120002' + }, + { + typeName: '鍗遍櫓璐х墿姘磋矾杩愯緭璁稿彲璇�', + type: '120003' + }, + { + typeName: '鍥哄簾澶勭疆缁忚惀璁稿彲璇�', + type: '120004' + }, + { + typeName: '閬撹矾杩愯緭璇�', + type: '120005' + }, + { + typeName: '杞﹁締琛岄┒璇�', + type: '120006' + }, + { + typeName: '缃愭鎶ュ憡', + type: '120007' + }, + { + typeName: '瀹夊叏绠$悊璇�', + type: '120008' + }, + { + typeName: '鍗遍櫓璐х墿閫傝璇�', + type: '120009' + }, + { + typeName: '鏈哄姩杞﹂┚椹惰瘉', + type: '120010' + }, + { + typeName: '鍗遍櫓鍝佷粠涓氳祫鏍艰瘉', + type: '120011' + }, + { + typeName: '鍗遍櫓搴熺墿缁煎悎缁忚惀璁稿彲璇�', + type: '120012' + }, + { + typeName: '鍗遍櫓搴熺墿鏀堕泦缁忚惀璁稿彲璇�', + type: '120013' + } +] + +// 璧勬簮搴撶被鍨� +export const DICT_RESOURCE_TYPE = [ + { + resourceTypeName: '鎵胯繍鍟�', + resourceType: '400001' + }, + { + resourceTypeName: '杞﹁締', + resourceType: '400002' + }, + { + resourceTypeName: '鑸硅埗', + resourceType: '400003' + }, + { + resourceTypeName: '閾佽矾鑷杞�', + resourceType: '400004' + }, + { + resourceTypeName: '椹炬娂浜哄憳', + resourceType: '400005' + }, + { + resourceTypeName: '鍗卞簾鍚嶅綍', + resourceType: '400006' + }, + { + resourceTypeName: '鍗卞簾澶勭疆鍟�', + resourceType: '400007' + }, + { + resourceTypeName: '鍗卞簾杞Щ搴�', + resourceType: '400008' + } +] + +// 榛戝悕鍗曠骇鍒� +export const DICT_BLACK_LIST_TYPE = [ + { + blacklistTypeName: '璀﹀憡', + blacklistType: '490001' + }, + { + blacklistTypeName: '绂佺敤', + blacklistType: '490002' + }, + { + blacklistTypeName: '鏃�', + blacklistType: '490000' + } +] + +// 榛戝悕鍗曡繘鍏ュ師鍥� +export const DICT_BLACK_LIST_REASON = [ + { + enterReasonName: '杩濊', + enterReason: '491001' + }, + { + enterReasonName: '璧勮川杩囨湡', + enterReason: '491002' + }, + { + enterReasonName: '鍏朵粬', + enterReason: '491009' + } +] + +// 娣诲姞榛戝悕鍗� +export const DICT_BLACKLIST_OPERATION = [ + { + optTypeName: '娣诲姞榛戝悕鍗�', + optType: '492001' + }, + { + optTypeName: '绉婚櫎榛戝悕鍗�', + optType: '492002' + } +] + +// 鍚敤 鍋滅敤 +export const DICT_IS_ENABLED_RADIO = [ + { + label: '鍚敤', + value: '110001' + }, + { + label: '鍋滅敤', + value: '110002' + } +] +export const DICT_IS_ENABLED_COMPANY = [ + { + isEnabledName: '浣跨敤涓�', + isEnabled: '110001' + }, + { + isEnabledName: '宸插仠鐢�', + isEnabled: '110002' + } +] +export const DICT_IS_YES_NO = [ + { + label: '鏄�', + value: '110001' + }, + { + label: '鍚�', + value: '110002' + } +] + +// 鐏伨绫诲埆 +export const DICT_FIRE_HAZARD_TYPE = [ + { + fireHazardTypeName: '鐢茬被', + fireHazardType: '770001' + }, + { + fireHazardTypeName: '涔欑被', + fireHazardType: '770002' + }, + { + fireHazardTypeName: '涓欑被', + fireHazardType: '770003' + } +] + +// 鏈嶅姟绫诲瀷 +export const DICT_SERVICE_TYPE_HCS = [ + { + serviceTypeName: '鍗卞寲鍝�', + serviceType: '1' + }, + { + serviceTypeName: '鍗卞簾', + serviceType: '2' + }, + { + serviceTypeName: '鍗卞寲鍝�&鍗卞簾', + serviceType: '0' + } +] + +// 閫旂粡鐐规暟閲� +export const DICT_HWS_WAYPOINT_AMOUNT = [ + { + hwsWayPointAmountName: '0', + hwsWayPointCount: 0 + }, + { + hwsWayPointAmountName: '1', + hwsWayPointCount: 1 + }, + { + hwsWayPointAmountName: '2', + hwsWayPointCount: 2 + }, + { + hwsWayPointAmountName: '3', + hwsWayPointCount: 3 + }, + { + hwsWayPointAmountName: '4', + hwsWayPointCount: 4 + }, + { + hwsWayPointAmountName: '5', + hwsWayPointCount: 5 + }, + { + hwsWayPointAmountName: '6', + hwsWayPointCount: 6 + }, + { + hwsWayPointAmountName: '7', + hwsWayPointCount: 7 + }, + { + hwsWayPointAmountName: '8', + hwsWayPointCount: 8 + }, + { + hwsWayPointAmountName: '9', + hwsWayPointCount: 9 + }, + { + hwsWayPointAmountName: '10', + hwsWayPointCount: 10 + } +] + +// 杞﹁締鐜繚绛夌骇 +export const DICT_LEVEL = [ + { + envProtLevelName: '鍥解厾', + envProtLevel: '420001' + }, + { + envProtLevelName: '鍥解叀', + envProtLevel: '420002' + }, + { + envProtLevelName: '鍥解參', + envProtLevel: '420003' + }, + { + envProtLevelName: '鍥解叄', + envProtLevel: '420004' + }, + { + envProtLevelName: '鍥解叅', + envProtLevel: '420005' + }, + { + envProtLevelName: '鍥解叆', + envProtLevel: '420006' + }, + { + envProtLevelName: '鍏朵粬', + envProtLevel: '420009' + } +] + +// 椹炬娂浜哄憳绫诲瀷 +export const DICT_DRIVERS_TYPE = [ + { + driverTypeName: '椹鹃┒鍛�', + driverType: '450001' + }, + { + driverTypeName: '鎶艰繍鍛�', + driverType: '450002' + }, + { + driverTypeName: '椹鹃┒鍛�/鎶艰繍鍛�', + driverType: '450003' + } +] + +// 缁勭粐鏈烘瀯绫诲埆 +export const DICT_ORG_LEVEL = [{ + orgLevelName: '闆嗗洟鍏徃绾�', + orgLevel: '510001' +}, { + orgLevelName: '浜嬩笟閮�/绠$悊閮�/涓撲笟鍏徃', + orgLevel: '510002' +}, { + orgLevelName: '浼佷笟绾�', + orgLevel: '510003' +}, { + orgLevelName: '浜岀骇鍗曚綅', + orgLevel: '510004' +}, { + orgLevelName: '鍩哄眰鍗曚綅', + orgLevel: '510005' +}, { + orgLevelName: '鍏跺畠', + orgLevel: '510006' +}] + +// 缁勭粐鏈烘瀯鎬ц川 +export const DICT_ORG_CHARACTER = [ + { + orgCharacterName: '鑲′唤', + orgCharacter: '520001' + }, + { + orgCharacterName: '瀛樼画', + orgCharacter: '520002' + } +] + +// 缁勭粐鏈烘瀯鏉垮潡 +export const DICT_ORG_SECTOR = [ + { + sectorName: '閿�鍞澘鍧�', + orgSector: '10010088' + }, + { + sectorName: '鐐兼补鏉垮潡', + orgSector: '30070000' + }, + { + sectorName: '鍖栧伐鏉垮潡', + orgSector: '30090000' + }, + { + sectorName: '娌圭敯鏉垮潡', + orgSector: '30050000' + } +] + +// 杩愯緭鐘舵�� +export const DICT_TRANS_STATE = [ + { + statusName: '寰呭彂杩�', + status: '590002' + }, + { + statusName: '杩愯緭涓�', + status: '590006' + }, + { + statusName: '宸插畬鎴�', + status: '590007' + }, + { + statusName: '宸蹭綔搴�', + status: '590009' + } +] + +// 涓氬姟鑼冨洿 +export const DICT_TRANS_METHOD = [ + { + businessScopeName: '鍏矾', + businessScope: 'RD' + }, + { + businessScopeName: '姘磋矾 ', + businessScope: 'RL' + }, + { + businessScopeName: '鍏矾&姘磋矾', + businessScope: 'AL' + } +] + +// 閫氱煡閰嶇疆 +export const NOTICE_CONFIG_TYPE = [ + { + noticeTypeName: '绂佽鍖哄煙閫氱煡', + noticeType: '620001' + }, + { + noticeTypeName: '鎻愰啋鍖哄煙閫氱煡', + noticeType: '620002' + }, + { + noticeTypeName: '琛岄┒璺緞鍋忕Щ閫氱煡 ', + noticeType: '620003' + }, + { + noticeTypeName: '杞﹁締鎶ヨ閫氱煡 ', + noticeType: '620004' + }, + { + noticeTypeName: '杞﹁締鎶ヨ閫氱煡', + noticeType: '620005' + } +] + +// 閫氱煡閰嶇疆 +export const DICT_NOTICE_CONFIG_REMIND_TYPE = [ + { + remindTypeName: '瀹炴椂鎻愰啋', + remindType: '630001' + }, + { + remindTypeName: '鏃ユ眹鎬绘彁閱�', + remindType: '630002' + }, + { + remindTypeName: '鍛ㄦ眹鎬绘彁閱� ', + remindType: '630003' + } +] + +// 绯荤粺鏁版嵁鏉ユ簮 +export const DICT_SOURCE_STATE = [ + { + sourceSysName: '鑷湁', + sourceSys: '640001' + } +] + +// 鍗卞寲鍝佺被鍨� +export const DICT_HCS_TYPE = [ + { + hcsTypeName: '鍖栧伐鍝�', + hcsType: '122001' + }, + { + hcsTypeName: '鎴愬搧娌�', + hcsType: '122002' + }, + { + hcsTypeName: '娑︽粦娌�', + hcsType: '122003' + }, + { + hcsTypeName: '澶╃劧姘�', + hcsType: '122004' + }, + { + hcsTypeName: '娑插寲鐭虫补姘�', + hcsType: '122005' + } +] + +// 鐩戞帶绫诲瀷 +export const DICT_MONITOR_TYPE = [ + { + monitorTypeName: '涓�鑸洃鎺�', + monitorType: '130001' + }, + { + monitorTypeName: '閲嶇偣鐩戞帶', + monitorType: '130002' + } +] + +// 琛屾斂绾у埆 +export const DICT_ADMINISTRATIVE_LEVEL = [ + { + adminLevelName: '姝i儴绾�', + adminLevel: '650001' + }, + { + adminLevelName: '鍓儴绾�', + adminLevel: '650002' + }, + { + adminLevelName: '姝e眬绾�', + adminLevel: '650003' + }, + { + adminLevelName: '鍓眬绾�', + adminLevel: '650004' + }, + { + adminLevelName: '姝e绾�', + adminLevel: '650005' + }, + { + adminLevelName: '鍓绾�', + adminLevel: '650006' + }, + { + adminLevelName: '姝g绾�', + adminLevel: '650007' + }, + { + adminLevelName: '鍓绾�', + adminLevel: '650008' + }, + { + adminLevelName: '涓�鑸鐞嗕汉鍛�', + adminLevel: '650009' + }, + { + adminLevelName: '鎿嶄綔浜哄憳', + adminLevel: '6500010' + } +] + +// 鑱岀О +export const DICT_POSITIONAL_TITLES = [ + { + PositionalTitlesName: '鍔╃悊宸ョ▼甯�', + jobTitle: '710001' + }, + { + PositionalTitlesName: '宸ョ▼甯�', + jobTitle: '710002' + }, + { + PositionalTitlesName: '楂樼骇宸ョ▼甯�', + jobTitle: '710003' + }, + { + PositionalTitlesName: '鏁欐巿绾ч珮绾у伐绋嬪笀', + jobTitle: '710004' + }, + { + PositionalTitlesName: '涓讳换鍖诲笀', + jobTitle: '710005' + }, + { + PositionalTitlesName: '鍓富浠诲尰甯�', + jobTitle: '710006' + }, + { + PositionalTitlesName: '楂樼骇缁忔祹甯�', + jobTitle: '710007' + }, + { + PositionalTitlesName: '缁忔祹甯�', + jobTitle: '710008' + }, + { + PositionalTitlesName: '楂樼骇鏀垮伐甯�', + jobTitle: '710009' + }, + { + PositionalTitlesName: '闄㈠+', + jobTitle: '710010' + }, + { + PositionalTitlesName: '鏀垮伐甯�', + jobTitle: '710011' + } +] + +// 瀛﹀巻 +export const DICT_EDUCATION = [ + { + educationName: '鍒濅腑', + education: '660001' + }, + { + educationName: '楂樹腑', + education: '660002' + }, + { + educationName: '澶т笓', + education: '660003' + }, + { + educationName: '澶ф湰', + education: '660004' + }, + { + educationName: '纭曞+鐮旂┒鐢�', + education: '660005' + }, + { + educationName: '鍗氬+鐮旂┒鐢�', + education: '660006' + }, + { + educationName: '鍏朵粬', + education: '660007' + } +] + +// 鎬у埆 +export const DICT_USER_SEX = [ + { + value: '110011', + label: '鐢�' + }, + { + value: '110012', + label: '濂�' + } +] + +// 杞︾墝棰滆壊 +export const DICT_VEHICLE_COLOR = [ + { + vehicleColorName: '钃濊壊', + vehicleColor: '750001' + }, + { + vehicleColorName: '榛勮壊', + vehicleColor: '750002' + }, + { + vehicleColorName: '缁胯壊', + vehicleColor: '750003' + } +] + +// 涓氬姟绫诲瀷 +export const DICT_SERVICE_TYPE = [ + { + value: '1', + label: '鍗卞寲鍝�' + }, + { + value: '2', + label: '鍗卞簾' + } +] + +// 杞﹁締绫诲瀷 +export const DICT_VEHILCE_TYPE = [ + { + value: '730001', + label: '绛剧害杞﹁締' + }, + { + value: '730002', + label: '鑷湁杞﹁締' + } +] + +// 鍩硅缁撴灉 +export const DICT_TRAIN_RESULT = [ + { + value: '110011', + label: '鍚堟牸' + }, + { + value: '110012', + label: '涓嶅悎鏍�' + } +] + +// 杩愯緭绫诲瀷 +export const DICT_TRANSFER_TYPE = [ + { + transferTypeName: '鍐呴儴杞Щ', + transferType: '780001' + }, + { + transferTypeName: '澶栭儴閰嶉��', + transferType: '780002' + } +] + +// 杩愯緭鏂瑰紡(杩愬崟绠$悊) +export const DICT_TRANS_MODE = [ + { + transModeName: '鍏矾', + transMode: 'RD' + }, + { + transModeName: '姘磋矾 ', + transMode: 'RL' + } +] + +// 鍖呰鏂瑰紡 +export const DICT_PACKAGE_TYPE = [ + { + value: '820001', + label: '妗惰' + }, + { + value: '820002', + label: '鍌ㄧ綈' + } +] + +// 琛ㄨ褰㈡�� +export const DICT_APPARENT_TYPE = [ + { + apparentTypeName: '鍥烘��', + apparentType: '810001' + }, + { + apparentTypeName: '娑叉��', + apparentType: '810002' + }, + { + apparentTypeName: '鍗婂浐鎬�', + apparentType: '810003' + }, + { + apparentTypeName: '姘旀��', + apparentType: '810004' + } +] + +// 杩愬崟绠$悊杩愬崟鐘舵�� +export const DICT_ORDER_STATE = [ + { + orderStateName: '寰呭彂杩�', + orderState: '2' + }, + { + orderStateName: '杩愯緭涓�', + orderState: '3' + }, + { + orderStateName: '宸插畬鎴�', + orderState: '7' + }, + { + orderStateName: '宸蹭綔搴�', + orderState: '4' + } +] + +// 杩愬崟鏁版嵁鏉ユ簮 +export const DICT_ORDER_SOURCE = [ + { + dictionaryName: '鑷缓', + dictionaryCode: 'ZJXT' + }, + { + dictionaryName: '鐐奸攢绯荤粺', + dictionaryCode: 'LXXT' + }, + { + dictionaryName: '鍖栭攢绯荤粺', + dictionaryCode: 'HXXT' + }, + { + dictionaryName: '鎴愬搧娌圭郴缁�', + dictionaryCode: 'CPYXT' + } +] + +// 鐭冲寲鍐呭 +export const DICT_PETRIFACTION = [ + { + dictionaryName: '鐭冲寲鍐�', + dictionaryCode: 'A' + }, + { + dictionaryName: '鐭冲寲澶�', + dictionaryCode: 'B' + } +] + +// 杩愯緭鏂瑰紡(杩愬崟鍒楄〃) +export const DICT_WAYBILL_LIST = [ + { + transModeName: '鍏矾', + transMode: 'RD' + }, + { + transModeName: '姘磋矾 ', + transMode: 'RL' + }, + { + transModeName: '閾佽矾 ', + transMode: 'WT' + } +] diff --git a/src/utils/navigation.js b/src/utils/navigation.js new file mode 100644 index 0000000..be520db --- /dev/null +++ b/src/utils/navigation.js @@ -0,0 +1,324 @@ +import Cookies from 'js-cookie' +import { hasOneOf, objEqual, _ } from '@/utils/tools' +const appConfig = require('@/app.config') +const { title, cookieExpires, useI18n } = appConfig + +export const TOKEN_KEY = 'token' +export const ACCOUNT_KEY = 'account' +export const setToken = (token) => { + Cookies.set(TOKEN_KEY, token, { expires: cookieExpires || 1 }) +} + +export const getToken = () => { + const token = Cookies.get(TOKEN_KEY) + if (token) return token + else return false +} + +export const setAccount = (account) => { + Cookies.set(ACCOUNT_KEY, account, { expires: cookieExpires || 1 }) +} + +export const getAccount = () => { + const account = Cookies.get(ACCOUNT_KEY) + if (account) return account + else return false +} + +export const hasChild = (item) => { + return item.children && item.children.length !== 0 +} + +/** + * @param {Array} routeMetched 褰撳墠璺敱metched + * @returns {Array} + */ +export const getBreadCrumbList = (route, homeRoute) => { + let homeItem = { ...homeRoute, icon: homeRoute.meta.icon } + let routeMetched = route.matched + if (routeMetched.some(item => item.name === homeRoute.name)) return [homeItem] + let res = routeMetched.filter(item => { + return item.meta === undefined || !item.meta.hideInBread + }).map(item => { + let meta = { ...item.meta } + if (meta.title && typeof meta.title === 'function') { + meta.__titleIsFunction__ = true + meta.title = meta.title(route) + } + let obj = { + icon: (item.meta && item.meta.icon) || '', + name: item.name, + meta: meta + } + return obj + }) + res = res.filter(item => { + return !item.meta.hideInMenu + }) + return [{ ...homeItem, to: homeRoute.path }, ...res] +} + +export const getRouteTitleHandled = (route) => { + let router = { ...route } + let meta = { ...route.meta } + let title = '' + if (meta.title) { + if (typeof meta.title === 'function') { + meta.__titleIsFunction__ = true + title = meta.title(router) + } else title = meta.title + } + meta.title = title + router.meta = meta + return router +} + +export const showTitle = (item, vm) => { + let { title, __titleIsFunction__ } = item.meta + if (!title) return + if (useI18n) { + if (title.includes('{{') && title.includes('}}') && useI18n) title = title.replace(/({{[\s\S]+?}})/, (m, str) => str.replace(/{{([\s\S]*)}}/, (m, _) => vm.$t(_.trim()))) + else if (__titleIsFunction__) title = item.meta.title + else title = vm.$t(item.name) + } else title = (item.meta && item.meta.title) || item.name + return title +} + +/** + * @description 鏈湴瀛樺偍鍜岃幏鍙栨爣绛惧鑸垪琛� + */ +export const setTagNavListToLocalstorage = list => { + localStorage.tagNaveList = JSON.stringify(list) +} + +/** + * @returns {Array} 鍏朵腑鐨勬瘡涓厓绱犲彧鍖呭惈璺敱鍘熶俊鎭腑鐨刵ame, path, meta涓夐」 + */ +export const getTagNavListFromLocalstorage = () => { + const list = localStorage.tagNaveList + return list ? JSON.parse(list) : [] +} + +/** + * @param {Array} routers 璺敱鍒楄〃鏁扮粍 + * @description 鐢ㄤ簬鎵惧埌璺敱鍒楄〃涓璶ame涓篽ome鐨勫璞� + */ +export const getHomeRouter = (routers, homeName = 'Home') => { + let i = -1 + let len = routers.length + let homeRoute = {} + while (++i < len) { + let item = routers[i] + if (item.children && item.children.length) { + let res = getHomeRouter(item.children, homeName) + if (res.name) return res + } else { + if (item.name === homeName) homeRoute = item + } + } + return homeRoute +} + +/** + * @param {*} list 鐜版湁鏍囩瀵艰埅鍒楄〃 + * @param {*} newRoute 鏂版坊鍔犵殑璺敱鍘熶俊鎭璞� + * @description 濡傛灉璇ewRoute宸茬粡瀛樺湪鍒欎笉鍐嶆坊鍔� + */ +export const getNewTagList = (list, newRoute) => { + const { name, path, meta } = newRoute + let newList = [...list] + if (newList.findIndex(item => item.name === name) >= 0) return newList + else newList.push({ name, path, meta }) + return newList +} + +/** + * @param {*} access 鐢ㄦ埛鏉冮檺鏁扮粍锛屽 ['super_admin', 'admin'] + * @param {*} route 璺敱鍒楄〃 + */ +const hasAccess = (access, route) => { + if (route.meta && route.meta.access) return hasOneOf(access, route.meta.access) + else return true +} + +/** + * 鑿滃崟鏉冮壌 + * @param {*} name 鍗冲皢璺宠浆鐨勮矾鐢眓ame + * @param {*} access 鐢ㄦ埛鏉冮檺鏁扮粍 + * @param {*} routes 璺敱鍒楄〃 + * @description 鐢ㄦ埛鏄惁鍙烦杞埌璇ラ〉 + */ +export const canTurnTo = (name, access, routes) => { + const routePermissionJudge = (list) => { + return list.some(item => { + if (item.children && item.children.length) { + return routePermissionJudge(item.children) + } else if (item.name === name) { + return hasAccess(access, item) + } + }) + } + + return routePermissionJudge(routes) +} + +/** + * @param {String} url + * @description 浠嶶RL涓В鏋愬弬鏁� + */ +export const getParams = url => { + const keyValueArr = url.split('?')[1].split('&') + let paramObj = {} + _.forEach(keyValueArr, item => { + const keyValue = item.split('=') + paramObj[keyValue[0]] = keyValue[1] + }) + return paramObj +} + +/** + * @param {Array} list 鏍囩鍒楄〃 + * @param {String} name 褰撳墠鍏抽棴鐨勬爣绛剧殑name + */ +export const getNextRouter = (list, route) => { + let res = {} + if (list.length === 2) { + res = getHomeRouter(list) + } else { + const index = list.findIndex(item => routeEqual(item, route)) + if (index === list.length - 1) res = list[list.length - 2] + else res = list[index + 1] + } + return res +} + +/** + * @param {Number} times 鍥炶皟鍑芥暟闇�瑕佹墽琛岀殑娆℃暟 + * @param {Function} callback 鍥炶皟鍑芥暟 + */ +export const doCustomTimes = (times, callback) => { + let i = -1 + while (++i < times) { + callback(i) + } +} + +export const findNodeUpper = (ele, tag) => { + if (ele.parentNode) { + if (ele.parentNode.tagName === tag.toUpperCase()) { + return ele.parentNode + } else { + return findNodeUpper(ele.parentNode, tag) + } + } +} + +export const findNodeUpperByClasses = (ele, classes) => { + let parentNode = ele.parentNode + if (parentNode) { + let classList = parentNode.classList + if (classList && classes.every(className => classList.contains(className))) { + return parentNode + } else { + return findNodeUpperByClasses(parentNode, classes) + } + } +} + +export const findNodeDownward = (ele, tag) => { + const tagName = tag.toUpperCase() + if (ele.childNodes.length) { + let i = -1 + let len = ele.childNodes.length + while (++i < len) { + let child = ele.childNodes[i] + if (child.tagName === tagName) return child + else return findNodeDownward(child, tag) + } + } +} + +export const showByAccess = (access, canViewAccess) => { + return hasOneOf(canViewAccess, access) +} + +/** + * @description 鏍规嵁name/params/query鍒ゆ柇涓や釜璺敱瀵硅薄鏄惁鐩哥瓑 + * @param {*} route1 璺敱瀵硅薄 + * @param {*} route2 璺敱瀵硅薄 + */ +export const routeEqual = (route1, route2) => { + const params1 = route1.params || {} + const params2 = route2.params || {} + const query1 = route1.query || {} + const query2 = route2.query || {} + return (route1.name === route2.name) && objEqual(params1, params2) && objEqual(query1, query2) +} + +/** + * 鍒ゆ柇鎵撳紑鐨勬爣绛惧垪琛ㄩ噷鏄惁宸插瓨鍦ㄨ繖涓柊娣诲姞鐨勮矾鐢卞璞� + */ +export const routeHasExist = (tagNavList, routeItem) => { + let len = tagNavList.length + let res = false + doCustomTimes(len, (index) => { + if (routeEqual(tagNavList[index], routeItem)) res = true + }) + return res +} + +export const localSave = (key, value) => { + localStorage.setItem(key, value) +} + +export const localRead = (key) => { + return localStorage.getItem(key) || '' +} + +// scrollTop animation +export const scrollTop = (el, from = 0, to, duration = 500, endCallback) => { + if (!window.requestAnimationFrame) { + window.requestAnimationFrame = ( + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback) { + return window.setTimeout(callback, 1000 / 60) + } + ) + } + const difference = Math.abs(from - to) + const step = Math.ceil(difference / duration * 50) + + const scroll = (start, end, step) => { + if (start === end) { + endCallback && endCallback() + return + } + + let d = (start + step > end) ? end : start + step + if (start > end) { + d = (start - step < end) ? end : start - step + } + + if (el === window) { + window.scrollTo(d, d) + } else { + el.scrollTop = d + } + window.requestAnimationFrame(() => scroll(d, end, step)) + } + scroll(from, to, step) +} + +/** + * @description 鏍规嵁褰撳墠璺宠浆鐨勮矾鐢辫缃樉绀哄湪娴忚鍣ㄦ爣绛剧殑title + * @param {Object} routeItem 璺敱瀵硅薄 + * @param {Object} vm Vue瀹炰緥 + */ +export const setTitle = (routeItem, vm) => { + const handledRoute = getRouteTitleHandled(routeItem) + const pageTitle = showTitle(handledRoute, vm) + const resTitle = pageTitle ? `${title} - ${pageTitle}` : title + window.document.title = resTitle +} diff --git a/src/utils/tools.js b/src/utils/tools.js new file mode 100644 index 0000000..45ce110 --- /dev/null +++ b/src/utils/tools.js @@ -0,0 +1,1154 @@ +/* eslint-disable no-prototype-builtins */ +import { OAUTH_API_GROUP } from '@/utils/authorityAPI' +import * as $CONST from './constant' +import { Message } from 'element-ui' + +export const _ = require('lodash') + +/** + * 闆嗗悎杞崲涓篔SON + * @param obj collection鏁版嵁 + * @author TJ 2019/03/11 + * @example 鐣� + */ +export function collectionToJson(collection) { + if (!_.isArray(collection)) return [] + let arr = [] + // 鏁版嵁浣� + _.forEach(collection, function(item) { + let tempObj = {} + if (item.hasOwnProperty('data') && _.isArray(item.data)) { + _.forEach(item.data, function(obj) { + tempObj[_.trim(obj.name)] = _.trim(obj.value) + }) + } + arr.push(tempObj) + }) + return arr +} + +/** + * collection鏁版嵁杞崲涓烘爣鍑咼SON + * @param obj collection鏁版嵁 + * @author TJ 2019/03/11 + * @example 鐣� + */ +export function transformStandardJson(obj) { + let body = {} + let data = null + let pages = null + let collection = obj.collection + if (_.isObject(collection)) { + // 閿欒鐨勫満鏅� + if (collection.hasOwnProperty('error')) { + return { + code: 300, + body: null, + msg: collection.error + } + } + // 鏁版嵁浣� + if (collection.hasOwnProperty('items') && _.isArray(collection.items)) { + data = collectionToJson(collection.items) + } + // 鍒嗛〉淇℃伅 + if (collection.hasOwnProperty('page') && _.isArray(collection.data)) { + pages = collectionToJson([collection.page]) + } + // 缁勮body鏁版嵁 + body = { + data: data + } + + if (pages) { + _.extend(body, { + total: pages[0].totalElements, + pageIndex: 0, + pageSize: pages[0].size, + pages: pages[0].totalPages + }) + } + + return { + code: 200, + body: body, + msg: '鎿嶄綔鎴愬姛' + } + } +} + +/** + * POST PUT绛夎姹傚弬鏁拌浆鎹㈡垚闆嗗悎 + * @param json object + * @returns collection + * @author TJ 2019/03/11 + * @example 鐣� + */ +export function transformParams(obj) { + let collection = { + version: '1.0', + href: '', + items: [], + templates: [] + } + if (_.isObject(obj)) { + let arr = [] + _.each(obj, function(val, key) { + let newVal = val + if (_.isArray(val)) { + newVal = val.join(',') + } + arr.push({ + name: key, + value: newVal + }) + }) + + let o = { + data: arr + } + collection.templates.push(o) + } + return { + collection: collection + } +} + +/** + * 灏嗗唴瀹瑰瓨鍌ㄥ埌sessionStorage + * @param key {string} key + * @param content {Object} 瀛樺偍json瀵硅薄 + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function setSessionStorage(key, content) { + if (!key) return false + let jsonContent = JSON.stringify(content) + jsonContent ? sessionStorage.setItem(key, jsonContent) : sessionStorage.setItem(key, content) +} + +/** + * 鑾峰彇瀛樺偍鍒皊essionStorage鐨勫唴瀹� + * @param key {string} key + * @return {object} 杩斿洖json瀵硅薄 + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function getSessionStorage(key) { + let item = sessionStorage.getItem(key) + if (!item) return false + let result = JSON.parse(sessionStorage.getItem(key)) + return result ? result : item +} + +/** + * 鍒犻櫎瀛樺偍鍒皊essionStorage鐨勫唴瀹� + * @param key {string} key + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function removeSessionStorage(key) { + sessionStorage.removeItem(key) +} + +/** + * 灏嗗唴瀹瑰瓨鍌ㄥ埌localStorage + * @param key {string} key + * @param content {Object} 瀛樺偍json瀵硅薄 + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function setLocalStorage(key, content) { + if (!key) return false + let jsonContent = JSON.stringify(content) + jsonContent ? localStorage.setItem(key, jsonContent) : localStorage.setItem(key, content) +} + +/** + * 鑾峰彇瀛樺偍鍒發ocalStorage鐨勫唴瀹� + * @param key {string} key + * @return {object} 杩斿洖json瀵硅薄 + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function getLocalStorage(key) { + let item = localStorage.getItem(key) + if (!item) return false + let result = JSON.parse(localStorage.getItem(key)) + return result ? result : item +} + +/** + * localStorage + * @param key {string} key + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function removeLocalStorage(key) { + localStorage.removeItem(key) +} + +/** + * 鍒ゆ柇json瀵硅薄鏄惁涓虹┖瀵硅薄 + * @param obj {object} json瀵硅薄 + * @return {boolean} 绌哄璞¤繑鍥� true 鍚﹀垯杩斿洖 false + * @author TJ 2018/05/28 + * @example 鐣� + */ +export function isEmptyObject(obj) { + if (obj === null) return true + return Object.keys(obj).length === 0 +} + +/** + * 杩囨护鍙傛暟 + * @param params {object} 闇�瑕佹牸寮忓寲鐨勬椂闂� + * @return {object} 鏍煎紡鍖栧悗鐨勬椂闂� + * @author TJ 2017/05/28 + * @example 鐣� + */ +export function filterParams(params) { + if (!_.isObject(params)) { + return params + } + let newParams = {} + _.each(params, function(v, k) { + // 杩囨护鎺夋潯浠舵槸绌虹殑椤� + if (typeof v === 'string' && (v.length === 0 || v === '*鍏�*閮�*')) { + console.log() + } else { + newParams[k] = v + } + }) + return newParams +} + +/** + * 灏唍ull杞崲涓虹┖瀵硅薄 + * @param params {obj} + * @author TJ 2018/05/31 + */ +export function emptyObjectWrapper(obj) { + return obj === null ? {} : obj +} + +/** + * 鏍煎紡鍖栨椂闂� + * @param time {string} 闇�瑕佹牸寮忓寲鐨勬椂闂� + * @param cFormat {string} 鏃堕棿鏍煎紡 + * @return {string} 鏍煎紡鍖栧悗鐨勬椂闂� + * @author TJ 2017/07/21 + * @example 鐣� + */ +export function parseTime(time, cFormat) { + if (!time) return false + if (arguments.length === 0) { + return false + } + const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if (('' + time).length === 10) time = parseInt(time) * 1000 + if (('' + time).length === 8 && ('' + time).indexOf('-') === -1 && ('' + time).indexOf('/') === -1) { + time = time.substring(0, 4) + '-' + time.substring(4, 6) + '-' + time.substring(6, 8) + } + + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const timeStr = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key] + if (key === 'a') return ['涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�', '鏃�'][value - 1] + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return timeStr +} + +/** + * 灏嗘椂闂存暟缁勫垎鍓叉垚寮�濮嬫椂闂村拰缁撴潫鏃堕棿 + * @param time {array} + * @return {object} + * @author TJ 2017/08/01 + * @example 鐣� + */ +export function formatTime(time) { + if (Array.isArray(time)) { + if (!time[0] || !time[1]) return false + var start = parseTime(time[0], '{y}-{m}-{d}') + var end = parseTime(time[1], '{y}-{m}-{d}') + return { + start: start, + end: end + } + } + + return false +} + +/** + * 鍒ゆ柇璇锋眰鐨刟pi鏄惁鏄杩藉姞鏉冮檺鐨� + * @param api {String} + * @return {boolean} + * @author TJ 2017/08/01 + * @example 鐣� + */ +export function isExistOauthApi(api) { + let isExist = false + for (let item of OAUTH_API_GROUP) { + if (api && api.includes(item)) { + isExist = true + break + } + } + return isExist +} + +/** + * 鏉冮檺API鎷兼帴鐢ㄦ埛鍚� + * @param api {String} + * @return {boolean} + * @author TJ 2017/08/01 + * @example 鐣� + */ +export function getJoinOauthApi(url) { + let name = window._loginName ? window._loginName : '' + if (url.includes('?')) { + url += '&createId=' + name + } else { + url += 'createId=' + name + } + return url +} + +/** + * 鎷兼帴鏌ヨURL + * @param url {String} + * @param obj {obj} + * @return {String} + * @author TJ 2017/08/01 + * @example 鐣� + */ +export function joinQueryUrl(url, obj) { + let str = '' + let fullUrl = '' + for (let key in obj) { + if (key) { + if (!obj.hasOwnProperty(key)) return + if (str) { + str += '&' + } + str += key + '=' + obj[key] + } + } + if (url.includes('?')) { + fullUrl = url + '&' + str + } else { + fullUrl = url + '?' + str + } + return fullUrl +} + +/** + * 鍒ゆ柇鍙傛暟鏄惁宓屽叆鍦╱rl涓� + * @param url {String} + * @return {Boolean} + * @author TJ 2018/08/27 + */ +export function isInlineParams(url) { + const splitChar = '{$' + if (url && url.indexOf(splitChar) > -1) { + return true + } else { + return false + } +} + +/** + * 鏇挎崲url閲岀殑鍙傛暟 + * @param url {String} + * @param params {obj} + * @author TJ 2018/05/31 + */ +export function replaceUrlParams(url, params) { + if (url) { + if (!isInlineParams(url)) { + return url + } + // 姝e垯鍖归厤{}锛岀敓鎴愭暟缁� + let patt = /\{.*?\}/g + let arr = url.match(patt) ? url.match(patt) : [] + arr.forEach(function(item) { + let key = item.replace('{', '').replace('}', '').replace('$', '') + url = url.replace(item, params[key]) + }) + } + return url +} + +/** + * 鑾峰彇浼犲叆灏忔椂涔嬪墠鐨勬棩鏈� + * @param pastHour {Number} + * @param format {String} + * @author ZC 2020/11/03 + */ +export function zcGetDate(pastHour, format) { + if (!format) { + format = 'yyyy-MM-dd' + } + // eslint-disable-next-line no-extend-native + Date.prototype.Format = function(fmt) { + let o = { + 'M+': this.getMonth() + 1, // 鏈堜唤 + 'd+': this.getDate(), // 鏃� + 'h+': this.getHours(), // 灏忔椂 + 'm+': this.getMinutes(), // 鍒� + 's+': this.getSeconds(), // 绉� + 'q+': Math.floor((this.getMonth() + 3) / 3), // 瀛e害 + 'S': this.getMilliseconds() // 姣 + } + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) + for (let k in o) { + // eslint-disable-next-line eqeqeq + if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) + } + return fmt + } + if (pastHour) { + // 鑾峰彇涔嬪墠鐨勬椂闂� + return new Date(new Date().getTime() - pastHour * 60 * 60 * 1000).Format(format) + } else { + return new Date(new Date().getTime()).Format(format) + } +} + +/** + * 鑾峰彇浼犲叆灏忔椂涔嬪墠鐨勬棩鏈� + * @param url {String} + * @author ZC 2020/12/09 + */ +export function zcDownload(url) { + let downloadElement = document.createElement('a') + downloadElement.href = url // 鍒涘缓 + downloadElement.download = '瀵煎嚭.zip' // 涓嬭浇鍚庢枃浠跺悕 + document.body.appendChild(downloadElement) + downloadElement.click() // 鐐瑰嚮涓嬭浇 + document.body.removeChild(downloadElement) // 涓嬭浇瀹屾垚绉婚櫎鍏冪礌 +} + +/** + * 閰嶇疆Echart涓婚棰滆壊 + * @param {obj} echart 瀹炰緥 + * @author TJ 2017/10/17 + * @return 鏃犺繑鍥炵粨鏋� + */ +export function resgisterTheme(echart) { + /* eslint-disable */ + let theme = { + 'color': [ + '#29d0b0', + '#2d99ed', + '#fd8667', + '#72ccff', + '#f7c5a0', + '#d4a4eb', + '#fdc547', + '#76f2f2', + '#da4d00', + '#b0419e' + ], + 'backgroundColor': 'transparents', + 'textStyle': { + 'itemStyle': { + 'normal': { + 'color': '#fff' + } + } + }, + 'title': { + 'textStyle': { + 'color': '#ffffff' + }, + 'subtextStyle': { + 'color': '#dddddd' + } + }, + 'line': { + 'itemStyle': { + 'normal': { + 'borderWidth': '1' + } + }, + 'lineStyle': { + 'normal': { + 'width': '1' + } + }, + 'symbolSize': '4', + 'symbol': 'circle', + 'smooth': false + }, + 'radar': { + 'itemStyle': { + 'normal': { + 'borderWidth': '4' + } + }, + 'lineStyle': { + 'normal': { + 'width': '3' + } + }, + 'symbolSize': '1', + 'symbol': 'circle', + 'smooth': true + }, + 'bar': { + 'itemStyle': { + 'normal': { + 'barBorderWidth': 0, + 'barBorderColor': '#ccc' + }, + 'emphasis': { + 'barBorderWidth': 0, + 'barBorderColor': '#ccc' + } + } + }, + 'pie': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'scatter': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'boxplot': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'parallel': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'sankey': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'funnel': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + }, + 'emphasis': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + } + }, + 'gauge': { + 'itemStyle': { + 'normal': { + 'borderWidth': 1, + 'borderColor': '#fff' + }, + 'emphasis': { + 'borderWidth': 1, + 'borderColor': '#fff' + } + } + }, + 'candlestick': { + 'itemStyle': { + 'normal': { + 'color': '#fc97af', + 'color0': 'transparent', + 'borderColor': '#fc97af', + 'borderColor0': '#87f7cf', + 'borderWidth': '2' + } + } + }, + 'graph': { + 'itemStyle': { + 'normal': { + 'borderWidth': 0, + 'borderColor': '#ccc' + } + }, + 'lineStyle': { + 'normal': { + 'width': '1', + 'color': '#ffffff' + } + }, + 'symbolSize': '5', + 'symbol': 'circle', + 'smooth': true, + 'color': [ + '#29d0b0', + '#2d99ed', + '#fd8667', + '#72ccff', + '#f7c5a0', + '#d4a4eb', + '#fdc547', + '#76f2f2', + '#da4d00', + '#b0419e' + ], + 'label': { + 'normal': { + 'textStyle': { + 'color': '#293441' + } + } + } + }, + 'map': { + 'itemStyle': { + 'normal': { + 'areaColor': '#f3f3f3', + 'borderColor': '#999999', + 'borderWidth': 0.5 + }, + 'emphasis': { + 'areaColor': 'rgba(255,178,72,1)', + 'borderColor': '#eb8146', + 'borderWidth': 1 + } + }, + 'label': { + 'normal': { + 'textStyle': { + 'color': '#893448' + } + }, + 'emphasis': { + 'textStyle': { + 'color': 'rgb(137,52,72)' + } + } + } + }, + 'geo': { + 'itemStyle': { + 'normal': { + 'areaColor': '#f3f3f3', + 'borderColor': '#999999', + 'borderWidth': 0.5 + }, + 'emphasis': { + 'areaColor': 'rgba(255,178,72,1)', + 'borderColor': '#eb8146', + 'borderWidth': 1 + } + }, + 'label': { + 'normal': { + 'textStyle': { + 'color': '#893448' + } + }, + 'emphasis': { + 'textStyle': { + 'color': 'rgb(137,52,72)' + } + } + } + }, + 'categoryAxis': { + 'axisLine': { + 'show': true, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisTick': { + 'show': false, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisLabel': { + 'show': true, + 'textStyle': { + 'color': '#fff' + } + }, + 'splitLine': { + 'show': false, + 'lineStyle': { + 'color': [ + '#e6e6e6' + ] + } + }, + 'splitArea': { + 'show': false, + 'areaStyle': { + 'color': [ + 'rgba(250,250,250,0.05)', + 'rgba(200,200,200,0.02)' + ] + } + } + }, + 'valueAxis': { + 'axisLine': { + 'show': true, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisTick': { + 'show': false, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisLabel': { + 'show': true, + 'textStyle': { + 'color': '#fff' + } + }, + 'splitLine': { + 'show': false, + 'lineStyle': { + 'color': [ + '#e6e6e6' + ] + } + }, + 'splitArea': { + 'show': false, + 'areaStyle': { + 'color': [ + 'rgba(250,250,250,0.05)', + 'rgba(200,200,200,0.02)' + ] + } + } + }, + 'logAxis': { + 'axisLine': { + 'show': true, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisTick': { + 'show': false, + 'lineStyle': { + 'color': '#333' + } + }, + 'axisLabel': { + 'show': true, + 'textStyle': { + 'color': '#fff' + } + }, + 'splitLine': { + 'show': false, + 'lineStyle': { + 'color': [ + '#e6e6e6' + ] + } + }, + 'splitArea': { + 'show': false, + 'areaStyle': { + 'color': [ + 'rgba(250,250,250,0.05)', + 'rgba(200,200,200,0.02)' + ] + } + } + }, + 'timeAxis': { + 'axisLine': { + 'show': true, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisTick': { + 'show': false, + 'lineStyle': { + 'color': '#fff' + } + }, + 'axisLabel': { + 'show': true, + 'textStyle': { + 'color': '#fff' + } + }, + 'splitLine': { + 'show': false, + 'lineStyle': { + 'color': [ + '#fff' + ] + } + }, + 'splitArea': { + 'show': false, + 'areaStyle': { + 'color': [ + 'rgba(250,250,250,0.05)', + 'rgba(200,200,200,0.02)' + ] + } + } + }, + 'toolbox': { + 'iconStyle': { + 'normal': { + 'borderColor': '#999999' + }, + 'emphasis': { + 'borderColor': '#666666' + } + } + }, + 'legend': { + 'textStyle': { + 'color': '#e0e0e0' + } + }, + 'tooltip': { + 'axisPointer': { + 'lineStyle': { + 'color': '#cccccc', + 'width': 1 + }, + 'crossStyle': { + 'color': '#cccccc', + 'width': 1 + } + } + }, + 'timeline': { + 'lineStyle': { + 'color': '#87f7cf', + 'width': 1 + }, + 'itemStyle': { + 'normal': { + 'color': '#87f7cf', + 'borderWidth': 1 + }, + 'emphasis': { + 'color': '#f7f494' + } + }, + 'controlStyle': { + 'normal': { + 'color': '#87f7cf', + 'borderColor': '#87f7cf', + 'borderWidth': 0.5 + }, + 'emphasis': { + 'color': '#87f7cf', + 'borderColor': '#87f7cf', + 'borderWidth': 0.5 + } + }, + 'checkpointStyle': { + 'color': '#fc97af', + 'borderColor': 'rgba(252,151,175,0.3)' + }, + 'label': { + 'normal': { + 'textStyle': { + 'color': '#87f7cf' + } + }, + 'emphasis': { + 'textStyle': { + 'color': '#87f7cf' + } + } + } + }, + 'visualMap': { + 'color': [ + '#fc97af', + '#87f7cf' + ] + }, + 'dataZoom': { + 'backgroundColor': 'rgba(255,255,255,0)', + 'dataBackgroundColor': 'rgba(114,204,255,1)', + 'fillerColor': 'rgba(114,204,255,0.2)', + 'handleColor': '#72ccff', + 'handleSize': '100%', + 'textStyle': { + 'color': '#fff' + } + }, + 'markPoint': { + 'label': { + 'normal': { + 'textStyle': { + 'color': '#293441' + } + }, + 'emphasis': { + 'textStyle': { + 'color': '#293441' + } + } + } + } + } + echart.registerTheme('dark', theme) + /* eslint-enable */ +} + +/** + * 鏍规嵁璺敱鍒囨崲鐨偆鏍囪瘑锛岄粯璁ょ毊鑲ゆ湭钃濊壊 + * @author TJ 2019/05/29 + */ +export function changeThemeClass(toRouterName) { + const darkSkinRouterName = [] + + if (darkSkinRouterName.includes(toRouterName)) { + document.body.className = 'dark' + } else { + document.body.className = 'blue' + } +} + +/** + * 鍒ゆ柇瑕佹煡璇㈢殑鏁扮粍鏄惁鑷冲皯鏈変竴涓厓绱犲寘鍚湪鐩爣鏁扮粍涓� + * @param {Array} target 鐩爣鏁扮粍 + * @param {Array} arr 闇�瑕佹煡璇㈢殑鏁扮粍 + */ +export const hasOneOf = (targetarr, arr) => { + return targetarr.some(_ => arr.indexOf(_) > -1) +} + +/** + * 鍒ゆ柇涓や釜瀵硅薄鏄惁鐩哥瓑锛岃繖涓や釜瀵硅薄鐨勫�煎彧鑳芥槸鏁板瓧鎴栧瓧绗︿覆 + * @param {Object} obj1 瀵硅薄 + * @param {Object} obj2 瀵硅薄 + */ +export const objEqual = (obj1, obj2) => { + const keysArr1 = Object.keys(obj1) + const keysArr2 = Object.keys(obj2) + if (keysArr1.length !== keysArr2.length) return false + else if (keysArr1.length === 0 && keysArr2.length === 0) return true + /* eslint-disable-next-line */ + else return !keysArr1.some(key => obj1[key] != obj2[key]) +} + +/** + * 鍒ゆ柇鍊兼槸鍚︿负鐪�,涓嶅寘鎷0鐨勫垽鏂� + * @param {String} val 瀛楃 + */ +export function isTrue(val) { + return !_.isNull(val) && !_.isUndefined(val) && val !== '' +} + +/** + * 瑙f瀽URL鍙傛暟 + * + * @param {String} url + * @return {object} + */ +export function getQueryObject(url = window.location.href) { + if (!url) return + let search = url.substring(url.lastIndexOf('?') + 1) + let obj = {} + let reg = /([^?&=]+)=([^?&=]*)/g + search.replace(reg, function(rs, $1, $2) { + let name = decodeURIComponent($1) + let val = decodeURIComponent($2) + val = String(val) + obj[name] = val + // return rs + }) + return obj +} + +/** + * 閫掑綊鏌ヨ鏍戣妭鐐� + * + * @param {object} treeData 鏍戠粨鏋勬暟鎹泦鍚� + * @param {string} prop 灞炴�у瓧娈� + * @param {string} propValue 灞炴�у搴旂殑鍊� + * @return {object} 鑺傜偣瀵硅薄 + */ +export function recursion(tree, prop, propValue) { + if (!tree || !Array.isArray(tree)) return false + let result = {} + + function handelTree(tree) { + for (let o of tree) { + if (o.children && Array.isArray(o.children) && o.children.length) { + if (o[prop] !== propValue) { + // 閫掑綊 + handelTree(o.children) + } else { + result = o + break + } + } else { + if (o[prop] === propValue) { + result = o + } + } + } + return result + } + + return handelTree(tree) +} + +export function success(msg = $CONST.MSG_SYS_SUCCESS) { + Message({ + message: msg, + type: 'success' + }) +} + +export function fail(msg = $CONST.MSG_SYS_FAIL) { + Message({ + message: msg, + type: 'error' + }) +} + +export function error(msg = $CONST.MSG_SYS_ERR) { + Message({ + message: msg, + type: 'error' + }) +} + +export function warning(msg = $CONST.MSG_SYS_WARNING) { + Message({ + message: msg, + type: 'warning' + }) +} + +export function info(msg = $CONST.MSG_SYS_CANCELED) { + Message({ + message: msg, + type: 'info' + }) +} + +export function alertError(msg = $CONST.MSG_SYS_ERR, options) { + options = Object.assign({ + dangerouslyUseHTMLString: true, + title: '鎻愮ず', + type: 'error', + 'show-icon': true + }, options) + window.vm.$alert(msg, options) +} + +export function alertWarning(msg = $CONST.MSG_SYS_WARNING, options) { + options = Object.assign({ + dangerouslyUseHTMLString: true, + title: '鎻愮ず', + type: 'warning', + 'show-icon': true + }, options) + window.vm.$alert(msg, options) +} + +export function todo() { + warning('寮�鍙戜腑銆傘�傘��') +} + +/** + * 寮傛鍔犺浇缁勪欢 + * @author TJ 2019/05/30 + */ + +/* eslint-disable */ +export function lazyLoadView(AsyncView) { + const AsyncComponent = () => ({ + // 闇�瑕佸姞杞界殑缁勪欢 (搴旇鏄竴涓� `Promise` 瀵硅薄) + component: AsyncView, + // 寮傛缁勪欢鍔犺浇鏃朵娇鐢ㄧ殑缁勪欢 + loading: '', + // 鍔犺浇澶辫触鏃朵娇鐢ㄧ殑缁勪欢 + error: '', + // 灞曠ず鍔犺浇鏃剁粍浠剁殑寤舵椂鏃堕棿銆傞粯璁ゅ�兼槸 200 (姣) + delay: 200, + // 濡傛灉鎻愪緵浜嗚秴鏃舵椂闂翠笖缁勪欢鍔犺浇涔熻秴鏃朵簡锛� + // 鍒欎娇鐢ㄥ姞杞藉け璐ユ椂浣跨敤鐨勭粍浠躲�傞粯璁ゅ�兼槸锛歚Infinity` + timeout: 3000 + }) + + return Promise.resolve({ + functional: true, + render(h, { data, children }) { + // Transparently pass any props or children + // to the view component. + return h(AsyncComponent, data, children) + } + }) +} diff --git a/src/utils/wfsQueryUtils.js b/src/utils/wfsQueryUtils.js new file mode 100644 index 0000000..7901056 --- /dev/null +++ b/src/utils/wfsQueryUtils.js @@ -0,0 +1,56 @@ +/** + * wfs 澶氭潯浠跺睘鎬ф煡璇nd Or 绫诲瀷 + * @params params + * params={ + * Url:'', + * TypeName:'', + * Or:[{'PropertyName':'','PropertyValue',''},{}], + * And:[{'PropertyName':'PropertyValue'},{}] + * } + * @returns {string} + */ +function getPropertyNameQueryAndOrWFSUrl(params) { + var url = '' + if ((params.Or === undefined || params.Or.length === 0) && (params.And === undefined || params.And.length === 0) && (params.Not === undefined || params.Not.length === 0)) { + url = params.Url + '?VERSION=1.0.0&SERVICE=WFS&REQUEST=getfeature&TYPENAME=' + params.TypeName + '&outputformat=json&maxfeature=20000' + } else { + url = params.Url + '?VERSION=1.0.0&SERVICE=WFS&REQUEST=getfeature&TYPENAME=' + params.TypeName + '&outputformat=json&maxfeature=20000&Filter=<Filter>' + } + if (params.Or != null && params.Or.length !== 0) { + if (params.Or.length === 1) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Or[0].PropertyName + '</PropertyName><Literal>' + params.Or[0].PropertyValue + '</Literal></PropertyIsEqualTo>' + } else { + url += '<OR>' + for (let i = 0; i < params.Or.length; i++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Or[i].PropertyName + '</PropertyName><Literal>' + params.Or[i].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</OR>' + } + } + if (params.And != null && params.And.length !== 0) { + if (params.And.length === 1) { + url += '<PropertyIsEqualTo><PropertyName>' + params.And[0].PropertyName + '</PropertyName><Literal>' + params.And[0].PropertyValue + '</Literal></PropertyIsEqualTo>' + } else { + url += '<AND>' + for (let j = 0; j < params.And.length; j++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.And[j].PropertyName + '</PropertyName><Literal>' + params.And[j].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</AND>' + } + } + if (params.Not != null && params.Not.length !== 0) { + url += '<NOT>' + for (let k = 0; k < params.Not.length; k++) { + url += '<PropertyIsEqualTo><PropertyName>' + params.Not[k].PropertyName + '</PropertyName><Literal>' + params.Not[k].PropertyValue + '</Literal></PropertyIsEqualTo>' + } + url += '</NOT>' + } + if ((params.Or !== undefined && params.Or.length !== 0) || (params.And !== undefined && params.And.length !== 0) || (params.Not !== undefined && params.Not.length !== 0)) { + url += '</Filter>' + } + return url +} + +export default { + getPropertyNameQueryAndOrWFSUrl +} diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue new file mode 100644 index 0000000..3706946 --- /dev/null +++ b/src/views/MapTemplate.vue @@ -0,0 +1,54 @@ +<template> + <div class="full-screen"> + <div id="map" ref="rootmap"></div> + <sgis-layer-controller :preset="'warningPreset'"></sgis-layer-controller> + </div> +</template> + +<script> +import 'leaflet/dist/leaflet.css' +import Sgis from '@src/Sgis' +import SgisLayerController from '@components/LayerController/LayerController' +import { mapMutations, mapState } from 'vuex' + +export default { + name: 'MapTemplate', + components: {SgisLayerController, }, + datas:{ + ...mapState("/",{}) + }, + mounted(){ + this.$nextTick(() => { + this.init() + }) + }, + methods:{ + ...mapMutations({ + setMapObj: 'setMapObj', + setLayerHelper: 'setLayerHelper' + }), + init() { + const mapcontainer = this.$refs.rootmap + this.mapObj = Sgis.initMap(mapcontainer) + this.basemapHelper = Sgis.initBasemaps(this.mapObj.map, this.mapObj.L) // 鍒濆鍖栧簳鍥� + this.vectorLayerHelper = Sgis.initLayers(this.mapObj.map, this.mapObj.L, {}, this.$nodeEnv) // 鍒濆鍖栦笟鍔″浘灞� + this.setLayerHelper(this.vectorLayerHelper) + return this.map + }, + setLayerHelper(){ + + } + } +} +</script> + +<style lang="less" scoped> +.full-screen{ + width: calc(100vw); + height: calc(100vh); + overflow: hidden; + margin: 0; + padding: 0; + position: absolute; +} +</style>> diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..869164e --- /dev/null +++ b/vue.config.js @@ -0,0 +1,39 @@ +const appConfig = require('./src/app.config') + +module.exports = { + publicPath: process.env.NODE_ENV === 'production' ? `/${appConfig.projectName}/` : '/', + configureWebpack: config => { + config.name = appConfig.title + config.resolve.alias = Object.assign(config.resolve.alias, require('./aliases.config').webpack) + // 鐢熶骇鐜鍘绘帀娉ㄩ噴鍙婄浉鍏虫帶鍒跺彴淇℃伅鏂规硶 + if (process.env.NODE_ENV === 'production') { + config.optimization.minimizer[0].options.extractComments = true + config.optimization.minimizer[0].options.terserOptions.output.comments = false + config.optimization.minimizer[0].options.terserOptions.compress.warnings = true + config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true + config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true + } + }, + parallel: require('os').cpus().length > 1, // 鏋勫缓鏃跺紑鍚杩涚▼澶勭悊babel缂栬瘧 + productionSourceMap: false, + devServer: { + host: 'localhost', + open: true, + port: 8888, + // overlay: false, + overlay: { + warnings: true, + errors: true + } + // proxy: { + // '/hcstms': { + // target: 'http://10.238.221.113', + // changeOrigin: true, + // ws: true, + // pathRewrite: { + // '^/hcstms': '' + // } + // } + // } + } +} -- Gitblit v1.8.0