Skip to content

Commit 76ca8b0

Browse files
author
Jianyf
committed
【Feature】GeoJSON数据处理对接iServer数据类型"RECTANGLE"
edit by wangmy review by songym
1 parent 24a21ca commit 76ca8b0

12 files changed

+118313
-46810
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
- `L.supermap.imageMapLayer` 新增`options.format`参数,支持 "png" 、"bmp" 、"jpg" 和 "git" 四种表述类型,默认为 "png",表述类型
8080

8181
- `L.supermap.tiledMapLayer` 新增`options.format`参数,支持 "png" 、"bmp" 、"jpg" 和 "git" 四种表述类型,默认为 "png",表述类型
82+
83+
- GeoJSON数据处理对接iServer数据类型"RECTANGLE"
8284

8385

8486
### for OpenLayers
@@ -140,6 +142,8 @@
140142

141143
- `ol.source.TileSuperMapRest` 新增`options.format`参数,支持 "png" 、"bmp" 、"jpg" 和 "git" 四种表述类型,默认为 "png",表述类型
142144

145+
- GeoJSON数据处理对接iServer数据类型"RECTANGLE"
146+
143147
### for MapboxGL
144148

145149
- 废弃 `SuperMap.ElasticSearch``options.change` 参数,直接使用 `SuperMap.ElasticSearch.msearch` `SuperMap.ElasticSearch.msearch``callback` 参数
@@ -178,6 +182,8 @@
178182

179183
- `SuperMap.ThemeStyle` 参数 `strokeDashstyle` 类型 `dashot` 更改为 `dashdot`
180184

185+
- GeoJSON数据处理对接iServer数据类型"RECTANGLE"
186+
181187
### Classic
182188

183189
- 废弃 `SuperMap.ElasticSearch``options.change` 参数,直接使用 `SuperMap.ElasticSearch.msearch` `SuperMap.ElasticSearch.msearch``callback` 参数

dist/iclient-classic.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,7 @@ var ServerType = exports.ServerType = _SuperMap.SuperMap.ServerType = {
12061206
* @property {string} ELLIPSE ELLIPSE
12071207
* @property {string} CIRCLE CIRCLE
12081208
* @property {string} TEXT TEXT
1209+
* @property {string} RECTANGLE RECTANGLE
12091210
* @property {string} UNKNOWN UNKNOWN
12101211
*/
12111212
var GeometryType = exports.GeometryType = _SuperMap.SuperMap.GeometryType = {
@@ -1216,6 +1217,7 @@ var GeometryType = exports.GeometryType = _SuperMap.SuperMap.GeometryType = {
12161217
ELLIPSE: "ELLIPSE",
12171218
CIRCLE: "CIRCLE",
12181219
TEXT: "TEXT",
1220+
RECTANGLE: "RECTANGLE",
12191221
UNKNOWN: "UNKNOWN"
12201222
};
12211223

dist/iclient-classic.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-leaflet.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ var ServerType = exports.ServerType = _SuperMap.SuperMap.ServerType = {
12121212
* @property {string} ELLIPSE ELLIPSE
12131213
* @property {string} CIRCLE CIRCLE
12141214
* @property {string} TEXT TEXT
1215+
* @property {string} RECTANGLE RECTANGLE
12151216
* @property {string} UNKNOWN UNKNOWN
12161217
*/
12171218
var GeometryType = exports.GeometryType = _SuperMap.SuperMap.GeometryType = {
@@ -1222,6 +1223,7 @@ var GeometryType = exports.GeometryType = _SuperMap.SuperMap.GeometryType = {
12221223
ELLIPSE: "ELLIPSE",
12231224
CIRCLE: "CIRCLE",
12241225
TEXT: "TEXT",
1226+
RECTANGLE: "RECTANGLE",
12251227
UNKNOWN: "UNKNOWN"
12261228
};
12271229

@@ -6639,6 +6641,32 @@ var GeoJSON = exports.GeoJSON = function (_JSONFormat) {
66396641
}
66406642
return { type: "MultiPolygon", components: polygonArray };
66416643
}
6644+
6645+
/**
6646+
*
6647+
* @function SuperMap.Format.GeoJSON.toGeoRectangle
6648+
* @description 将服务端的面几何对象转换为几何对象。
6649+
*/
6650+
6651+
}, {
6652+
key: 'toGeoRectangle',
6653+
value: function toGeoRectangle(geometry) {
6654+
var me = this;
6655+
var center = geometry.center;
6656+
var halfWidth = geometry.width / 2;
6657+
var halfHeight = geometry.height / 2;
6658+
6659+
var serverRegion = {
6660+
id: geometr.id,
6661+
points: [{ x: center - halfWidth, y: center + halfHeight }, { x: center + halfWidth, y: center + halfHeight }, { x: center + halfWidth, y: center - halfHeight }, { x: center - halfWidth, y: center - halfHeight }],
6662+
partTopo: geometry.partTopo,
6663+
rotation: geometry.rotation,
6664+
style: geometry.style,
6665+
type: _REST.GeometryType.REGION
6666+
};
6667+
6668+
return me.toGeoRegion(serverRegion);
6669+
}
66426670
}, {
66436671
key: 'isClockWise',
66446672
value: function isClockWise(points) {
@@ -71775,7 +71803,7 @@ module.exports = function (proj4) {
7177571803
/* 381 */
7177671804
/***/ (function(module) {
7177771805

71778-
module.exports = {"_from":"proj4@2.3.15","_id":"proj4@2.3.15","_inBundle":false,"_integrity":"sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.3.15","name":"proj4","escapedName":"proj4","rawSpec":"2.3.15","saveSpec":null,"fetchSpec":"2.3.15"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"F:\\dev\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"deprecated":false,"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"};
71806+
module.exports = {"_args":[[{"raw":"proj4@2.3.15","scope":null,"escapedName":"proj4","name":"proj4","rawSpec":"2.3.15","spec":"2.3.15","type":"version"},"D:\\IClient9D\\iClient-JavaScript"]],"_cnpm_publish_time":1471808264503,"_from":"proj4@2.3.15","_hasShrinkwrap":false,"_id":"proj4@2.3.15","_inCache":true,"_location":"/proj4","_nodeVersion":"6.1.0","_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/proj4-2.3.15.tgz_1471808262546_0.6752060337457806"},"_npmUser":{"name":"ahocevar","email":"andreas.hocevar@gmail.com"},"_npmVersion":"3.8.6","_phantomChildren":{},"_requested":{"raw":"proj4@2.3.15","scope":null,"escapedName":"proj4","name":"proj4","rawSpec":"2.3.15","spec":"2.3.15","type":"version"},"_requiredBy":["/"],"_resolved":"https://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_shrinkwrap":null,"_spec":"proj4@2.3.15","_where":"D:\\IClient9D\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"dist":{"shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","size":114708,"noattachment":false,"tarball":"http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz"},"gitHead":"9fa5249c1f4183d5ddee3c4793dfd7b9f29f1886","homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","maintainers":[{"name":"ahocevar","email":"andreas.hocevar@gmail.com"},{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"name":"proj4","optionalDependencies":{},"publish_time":1471808264503,"readme":"ERROR: No README data found!","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"};
7177971807

7178071808
/***/ }),
7178171809
/* 382 */

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-mapboxgl.css

Lines changed: 446 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy