From 80c7641bcddea86bd7d0e9c421498ab4697f67d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E5=86=AC=E5=86=AC?= Date: Wed, 11 Oct 2017 17:25:08 +0800 Subject: [PATCH] # publish --- CHANGELOG.md | 9 +++++++++ README.md | 10 +++++----- package.json | 2 +- src/index.js | 2 +- src/{feature => overlay}/overlay.js | 9 ++++----- 5 files changed, 20 insertions(+), 12 deletions(-) rename src/{feature => overlay}/overlay.js (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6f18f..442cf58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 1.5.1 (2017.10.11) + +* 移除控件和交互底层代码,修改为应用ol-extent包处理。 +* 修改图层创建,支持到ArcGIS,谷歌等多类图层,兼容多标注层处理,图层获取方法优化,兼容到深层图层处理。 +* 修改要素操作类,优化代码和结构,支持json样式使用。 +* 修改overlay操作类,兼容html解析。 +* 添加事件处理。 +* 添加文档说明和示例DEMO。 + ## 1.5.0 (2017.08.26) * 重构相关方法,修复上一版本bug,处理底层兼容问题。 diff --git a/README.md b/README.md index 873394a..f4c7ac6 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,13 @@ npm install hmap-js --save #### cdn -目前可通过 [unpkg.com/hmap-js](https://unpkg.com/hmap-js@1.5.0/dist/hmap.js) 获取最新版本的资源。 +目前可通过 [unpkg.com/hmap-js](https://unpkg.com/hmap-js@1.5.1/dist/hmap.js) 获取最新版本的资源。 ```bash -https://unpkg.com/hmap-js@1.5.0/dist/hmap.js -https://unpkg.com/hmap-js@1.5.0/dist/hmap.min.js -https://unpkg.com/hmap-js@1.5.0/dist/hmap.css -https://unpkg.com/hmap-js@1.5.0/dist/hmap.min.css +https://unpkg.com/hmap-js@1.5.1/dist/hmap.js +https://unpkg.com/hmap-js@1.5.1/dist/hmap.min.js +https://unpkg.com/hmap-js@1.5.1/dist/hmap.css +https://unpkg.com/hmap-js@1.5.1/dist/hmap.min.css ``` #### 示例 diff --git a/package.json b/package.json index 53463ea..ef32603 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hmap-js", - "version": "1.5.0", + "version": "1.5.1", "private": false, "description": "a openlayers extent map library", "main": "dist/hmap-js.js", diff --git a/src/index.js b/src/index.js index 8b4bdf1..10034b3 100644 --- a/src/index.js +++ b/src/index.js @@ -24,7 +24,7 @@ import _BaseLayers from './map/BaseLayers' import _Controls from './map/Controls' import _Interactions from './map/Interactions' import _Feature from './feature/feature' -import _Overlay from './feature/overlay' +import _Overlay from './overlay/overlay' import _Geometry from './geom/Geometry' import _ViewUtil from './utils/ViewUtil' import { isObject } from './utils/utils' diff --git a/src/feature/overlay.js b/src/overlay/overlay.js similarity index 98% rename from src/feature/overlay.js rename to src/overlay/overlay.js index c3565ca..5d5b492 100644 --- a/src/feature/overlay.js +++ b/src/overlay/overlay.js @@ -3,11 +3,10 @@ * @desc 用于dom标绘(包含自定义dom或者iconfont) */ import ol from 'openlayers' -import mixin from '../utils/mixins' import * as htmlUtils from 'nature-dom-util/src/utils/domUtils' import { trim } from '../utils/utils' -import Feature from '../feature/feature' -class Overlay extends mixin(Feature) { +import Geometry from '../geom/Geometry' +class Overlay extends Geometry { /** * 添加字体图标要素 @@ -221,7 +220,7 @@ class Overlay extends mixin(Feature) { if (overLay.get('markFeature') && overLay.get('markFeature') instanceof ol.Feature) { this.removeFeature(overLay.get('markFeature')) } - this.map.removeOverlay(overLay) + this.removeOverlay(overLay) } return overLay } @@ -246,7 +245,7 @@ class Overlay extends mixin(Feature) { if (overlays[i].get('markFeature') && overlays[i].get('markFeature') instanceof ol.Feature) { this.removeFeature(overlays[i].get('markFeature')) } - this.map.removeOverlay(overlays[i]) + this.removeOverlay(overlays[i]) i-- } }