Git Product home page Git Product logo

supermap / iclient-javascript Goto Github PK

View Code? Open in Web Editor NEW
809.0 809.0 274.0 568.49 MB

Modern GIS Web Client for JavaScript, based on Leaflet\OpenLayers\MapboxGL-JS\Classic(iClient8C), enhanced with ECharts\D3\MapV etc. Contributed by SuperMap & community.

Home Page: https://iclient.supermap.io

License: Apache License 2.0

HTML 0.18% JavaScript 98.57% CSS 0.50% Batchfile 0.03% Shell 0.04% Java 0.01% PowerShell 0.68%
cesium cesiumjs-plugins gis javascript leaflet leaflet-plugins map mapbox-gl-js mapbox-gl-js-plugins mapping openlayers openlayers-plugins

iclient-javascript's Introduction

SuperMap iClient JavaScript

npm version FOSSA Status

简介 | ENGLISH

SuperMap iClient JavaScript 是一套开源开放的 WebGIS 客户端应用开发包,基于现代 Web 技术栈全新构建,是 SuperMap 云 GIS 和在线 GIS 平台系列产品的统一 JavaScript 客户端。它集成了领先的开源地图库、可视化库,支持多源数据与地图服务,支持多终端,跨浏览器。提供了全新的 GIS 大数据可视化、实时流数据可视化等功能,通过本产品可快速实现浏览器上美观、流畅的地图呈现。

Overview

中文官网 | ENGLISH HOMEPAGE

WebComponents Web组件库

基于Vue 2.x的iClient UI组件库,快速上手文档

Contributors

许可

Apache License 2.0

FOSSA Status

iclient-javascript's People

Contributors

acidgis avatar ahnan avatar chenmeiyisupermap avatar chenpeng181007 avatar chenxianhuii avatar dependabot-preview[bot] avatar dependabot[bot] avatar hechangqun avatar hhyu1 avatar huangqh avatar jiangyan1018 avatar jinnanyang avatar liqian7 avatar luoxiao-supermap avatar myshallowtime avatar qiulinfv avatar songyumeng avatar tangqingiser avatar wenxinyu1998 avatar wuzhuorui5 avatar xilanhuaweidapao avatar xiongjiaojiao avatar yang-mengyue avatar yaoxiaoni1 avatar youyoung avatar yuki-zhao avatar yuzhiyao avatar zhangjiangqiu avatar zhurc avatar zhushusun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iclient-javascript's Issues

echarts-gl for leaflet and multiple stripcharts

Request a feature or report a bug? [这是一个需求还是一个缺陷]

Two features request

One-line summary [问题简述]

  1. echarts-gl support for leaflet (like the global wind example for mapbox-gl)
  2. Multiple echarts widgets show up simultaneously on the map (instead of click-n-pop or hover-n-pop)

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

  1. To use leaflet with echarts-gl
  2. To show different dynamic line for different locations at the same time

chrome 73 以上版本。地图zoom滚动缩放js报错

chrome 73 以上版本。地图zoom滚动缩放控制台报如下错误
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See
超图官网classic 就有此问题。希望官方尽快修复

使用rollup打包时报错

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

  • yarn add @supermap/iclient-leaflet
  • 编写业务代码export { tiledMapLayer } from '@supermap/iclient-leaflet';
  • 使用rollup打包
    控制台报错,打包不成功,错误信息如下
!] (plugin buble) SyntaxError: Unexpected token (2:8)
node_modules/proj4/package.json (2:8)
1 : {
2 :   "name": "proj4",
            ^
SyntaxError: Unexpected token (2:8)
    at Object.pp$4.raise (/Users/node_modules/acorn/dist/acorn.js:2825:15)
    at Object.pp.unexpected (/Users//node_modules/acorn/dist/acorn.js:689:10)
    at Object.pp.semicolon (/Users//node_modules/acorn/dist/acorn.js:666:66)
    at Object.pp$1.parseExpressionStatement (/Users/node_modules/acorn/dist/acorn.js:1145:10)
    at Object.pp$1.parseStatement (/Users//node_modules/acorn/dist/acorn.js:880:26)
    at Object.parseStatement (/Users/node_modules/acorn-dynamic-import/lib/index.js:63:118)
    at Object.pp$1.parseBlock (/Users/node_modules/acorn/dist/acorn.js:1161:23)
    at Object.pp$1.parseStatement (/Users//acorn/dist/acorn.js:845:36)
    at Object.parseStatement (/Users//node_modules/acorn-dynamic-import/lib/index.js:63:118)
    at Object.pp$1.parseTopLevel (/Users//node_modules/acorn/dist/acorn.js:746:23)
    at Object.parse (/Users//node_modules/acorn/dist/acorn.js:553:17)
    at Function.parse (/Users//node_modules/acorn/dist/acorn.js:576:37)
    at Object.transform (/Users//node_modules/buble/dist/buble.cjs.js:4343:16)
    at Object.transform (/Users//node_modules/rollup-plugin-buble/dist/rollup-plugin-buble.cjs.js:20:18)
    at Promise.resolve.then (/Users//node_modules/rollup/dist/rollup.js:16026:25)

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
    for leaflet
  • iClient version [iClient 版本]:
    ^10.0.0-beta
  • Browser version [浏览器类型和版本]:
    na
  • OS Version [操作系统类型和版本]:
    macos
  • rollup版本
    1.21.2
  • rollup-plugin-buble版本
    0.19.8

Actual Behavior [当前现象]

rollup打包报错

Expected Behavior [期望现象]

rollup正常打包

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

在vue中使用supermap-leaflet时echarts初始化报错

Request a feature or report a bug? [这是一个需求还是一个缺陷]

BUG

One-line summary [问题简述]

在vue中使用supermap-leaflet时echarts初始化报错

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iClient-leaflet
  • iClient version [iClient 版本]: ^9.1.0
  • Browser version [浏览器类型和版本]: Chrome 70.0.3538.77
  • OS Version [操作系统类型和版本]: Windows 10 Pro

Actual Behavior [当前现象]

leaflet map can show up, however the echarts layer cannot properly initialize in Vue

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]

使用http://iclient.supermapol.com/examples/leaflet/editor.html#echartsEffectScatter 作为例子测试时,echarts layer不能正常初始化,chrome报错如下:

vue.runtime.esm.js?2b0e:1737 TypeError: _echarts2.default.init is not a function
at e.onAdd (iclient9-leaflet.js:72476)
at e._layerAdd (leaflet.js:5)
at e.whenReady (leaflet.js:5)
at e.addLayer (leaflet.js:5)
at e.addTo (leaflet.js:5)
at VueComponent.initdraw (puremap.vue?646a:630)
at VueComponent.mounted (puremap.vue?646a:1203)
at callHook (vue.runtime.esm.js?2b0e:2917)
at Object.insert (vue.runtime.esm.js?2b0e:4154)
at invokeInsertHook (vue.runtime.esm.js?2b0e:5956)

刚开始使用supermap,也不能保证100%是bug。但之前用echarts和echarts-leaflet都没有问题,开始使用supermap是基于performance考虑。谢谢帮助!


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

bug反馈,examples/js/utils.js.getLanguage

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

在某些环境下,examples/js/utils.js.getLanguage函数返回的语言字符串不符合预期

Version [产品及版本]

iClient 最新版本,以nginx暴露,在部分浏览器下


Actual Behavior [当前现象]

在某些环境下,examples/js/utils.js.getLanguage函数返回的语言字符串不符合预期,例如guage=zh-CN,从而产生异常:

Uncaught Error: Syntax error, unrecognized expression: [data-lang=guage=zh-CN]

Expected Behavior [期望现象]

返回正确的语言字符串,使得程序正常运行

从cookie里获取到的语言字符串不一定准确,需做校验,以下是个人加的一个简陋的校验

    function getLanguage() {
        var lang = getCookie(cKey);
        if (lang) {
            var defLangs = {
                'zh-CN': 1,
                'en-US': 2,
            };

            function matchLang() {
                if (!lang) {
                    return "zh-CN";
                } else {
                    for (var defLang in defLangs) {
                        if (lang.indexOf(defLang) >= 0) {
                            lang = defLang;
                            return defLang;
                        }
                    }
                }
                return "zh-CN";
            }

            lang = matchLang();
            return lang;
        }

自定义vector图层,不能正确触发styleFunction

缺陷

描述

不能触发style Function方法

Version 911

  • iClient product :for openlayers
  • iClient version [iClient 版本]:911
  • Browser version [浏览器类型和版本]:chrome 70
  • OS Version [操作系统类型和版本]: win10

Actual Behavior [当前现象]

ol.layer.Test = function (opt_options) {
var options = opt_options ? opt_options : {};
options.source = new ol.source.Vector({features: opt_options.features});

ol.layer.Vector.call(this, options);
this.setStyle(function (fea, resolution) {
    var style;
    return style;
}.bind(this));

// this.getSource().addFeatures(options.features);
delete  opt_options.features;

}

ol.inherits(ol.layer.Test, ol.layer.Vector);
/// 其他方法……

Expected Behavior [期望现象]

调用后触发this.setStyle中的匿名函数。但是在这个版本中没有触发,原生ol-v4.6.5版本可以触发。

Example of reproducing the issue [重现现象的例子]

var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.Tianditu({})
}),
new ol.layer.Test({
features: [new ol.Feature({
geometry: new ol.geom.Point([102.79071213226318, 25.00734961509705])
id: '234'
})]
})
],
view: new ol.View({
projection: 'EPSG:4326',
center: [102.79071213226318, 25.00734961509705],//[102.7043, 24.9796],
zoom: 17,
}),
projection: 'EPSG:4326',
});

restMap查询返回geojson格式丢失字段别名

Request a feature or report a bug? [这是一个需求还是一个缺陷]

  • 需求

One-line summary [问题简述]

  • restMap查询返回geojson格式丢失字段别名

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: dev
  • iClient version [iClient 版本]: dev
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

restMap查询geojson返回格式无字段别名

Expected Behavior [期望现象]

restMap查询geojson返回格式含字段别名

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

restMap查询展示查询结果字段以别名为准

监听echartsLayer上的点击事件

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iClient-leaflet
  • iClient version [iClient 版本]: ^9.10
  • Browser version [浏览器类型和版本]: Chrome 70.0.3538.102 (64bit)
  • OS Version [操作系统类型和版本]: Windows 10 Pro

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

使用L.supermap.echartsLayer添加的scatter和lines无法响应鼠标点击事件,请问你们会考虑添加此feature吗?或者有什么work around的方法? 谢谢!
从pure echarts 转到supermap echartslayer,需要保留原来的鼠标点击事件,但并没有在map的点击事件中找到能指向被点击的echarts元素的任何线索。

ol5.3.1集成mapv报错

bug

ol5.3.1集成mapv报错

Version ["ol": "^5.3.1","@supermap/iclient-openlayers": "^9.1.1","mapv": "^2.0.33",]

  • iClient product (for openlayers]:
  • Browser version [Google Chrome 72.0.3626.121]:

报错#imageSource.getImage is not a function [当前现象]

地图之前可以正常加载天地图切片,坐标系为3857
image

开发环境截图

image
image
image


Graphic中的矢量渲染问题

Request a feature or report a bug? [这是一个需求还是一个缺陷] 缺陷

One-line summary [问题简述] iclient for openlayer 中的Graphic中的矢量渲染问题

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:for openlayers
  • iClient version [iClient 版本]:9D
  • Browser version [浏览器类型和版本]:chorme 浏览器 65.0.3325.181(正式版本) (64 位)
  • OS Version [操作系统类型和版本]:window7 旗舰版

Actual Behavior [当前现象]启动定时器进行更新graphic图层,内存一直上涨,发现地图无法清除graphic矢量。

Expected Behavior [期望现象]:在数据量差不多的时候,进行graphic重新渲染的时候,内存维持在稳定水平,页面不会崩溃

Example of reproducing the issue [重现现象的例子]

以下是示例的代码:

<title data-i18n="resources.title_graphiclayerCanvas"></title> <script type="text/javascript" include="randomcolor" src="../js/include-web.js"></script> <script type="text/javascript" src="../../dist/include-openlayers.js"></script> <style> .ol-popup { position: absolute; background-color: white; -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); padding: 15px; border-radius: 10px; border: 1px solid #cccccc; bottom: 12px; left: -50px; min-width: 50px; }
    .ol-popup:after, .ol-popup:before {
        top: 100%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
    }

    .ol-popup:after {
        border-top-color: white;
        border-width: 10px;
        left: 48px;
        margin-left: -10px;
    }

    .ol-popup:before {
        border-top-color: #cccccc;
        border-width: 11px;
        left: 48px;
        margin-left: -11px;
    }
</style>
<script type="text/javascript"> var url = (window.isLocal ? document.location.host : "http://support.supermap.com.cn:8090") + "/iserver/services/map-china400/rest/maps/ChinaDark";
var map;
var colorCount = 10;
var colors = getRandomColors(colorCount);


new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
    var mapJSONObj = serviceResult.result;
    var container = document.getElementById('popup');
    var content = document.getElementById('popup-content');
    var overlay = new ol.Overlay(({
        element: container,
        autoPan: true,
        autoPanAnimation: {
            duration: 250
        }
    }));
    map = new ol.Map({
        target: 'map',
        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
            .extend([new ol.supermap.control.Logo()]),
        view: new ol.View({
            center: ol.proj.transform([-73.9286, 40.75], 'EPSG:4326', 'EPSG:3857'),
            zoom: 12,
            projection: 'EPSG:3857'
        }),
        overlays: [overlay],
        renderer: ['canvas']
    });
    var options = ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapJSONObj);
    var layer = new ol.layer.Tile({
        source: new ol.source.TileSuperMapRest(options)
    });
    map.addLayer(layer);
});
var randomCircleStyles = [];
for (var i = 0; i < colorCount; i++) {
    randomCircleStyles.push(new ol.style.RegularShape({
        radius: Math.floor(Math.random() * 10 + 1),
        fill: new ol.style.Fill({
            color: colors[i]
        }),
        stroke: new ol.style.Stroke({
            color: colors[i]
        }),
        points: 3,
    }));
}
function show(){
    $.get('../data/nyc_taxi.json', function (nycData) {
        var count = nycData.features.length;    //矢量点的个数
        var graphics = new Array(count);
        for (var i = 0; i < count; ++i) {
            var coordinates = nycData.features[i].geometry.coordinates;
            if (coordinates[0] === coordinates[1]) {
                continue;
            }
            coordinates = ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857');
            graphics[i] = new ol.Graphic(new ol.geom.Point(coordinates));
            graphics[i].setStyle(randomCircleStyles[Math.floor(Math.random() * colorCount)]);
        }
        map.once('postrender', function () {
            var graphicLayer = new ol.layer.Image({
                source: new ol.source.Graphic({
                    graphics: graphics,
                    map: map,
                    onClick: function (graphic) {
                        if (graphic) {
                            var coords = graphic.getGeometry().getCoordinates();
                            content.innerHTML = resources.text_coordinate + ":[" + coords[0] + "," + coords[1] + "]";
                            overlay.setPosition(graphic.getGeometry().getCoordinates());
                            return;
                        }
                        overlay.setPosition(undefined);
                    }
                })
            });
			graphicLayer.setProperties({id: "graphicLayer"});
            map.addLayer(graphicLayer);
        })
    });
}
function getRandomColors(count) {
    return randomColor({
        luminosity: 'bright',
        hue: 'random',
        alpha: 0.5,
        format: 'rgba',
        count: count
    });
}
show();
setInterval(function () {
	graphicLayer.getSource().graphics_ = null;
	map.removeLayer("graphicLayer");
	graphicLayer = null;
    show();
}, 60 * 1000);
</script>

更新时间测试的时候用的是30s,但是清除到渲染出来时,发现中间会有几s的间隔时间,倒是页面出现屏闪的效果。


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

mapv格网图在不同的api文件下拖拽地图格网重绘现象不一致

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iClient for leaflet
  • iClient version [iClient 版本]: v9.0.1
  • Browser version [浏览器类型和版本]: Google Chrome 版本 67.0.3396.99
  • OS Version [操作系统类型和版本]: windows 10

Actual Behavior [当前现象]

官网示例中加载mapv格网图(这个示例需要将时间空间暂定)后,再进行地图的拖拽,格网不会出现重绘;而如果将这个示例使用的iclient9-leaflet.min.js文件替换为从github上下载的最新文件,进行相同个的操作,格网图就会出现重绘。两个不同的iclient9-leaflet.min.js文件,一个是官网示例中的,一个是github上的,一个会出现格网重绘,一个不会出现格网重绘。

Expected Behavior [期望现象]

 不同的api文件,加载格网图后,拖拽地图,格网不再进行重绘。

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

graphic矢量单独对象操作建议

Request a feature or report a bug? [这是一个需求还是一个缺陷]需求

One-line summary [问题简述]graphic矢量不能够通过ID进行获取

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:for openlayers
  • iClient version [iClient 版本]:9D
  • Browser version [浏览器类型和版本]:chorme 浏览器 65.0.3325.181(正式版本) (64 位)
  • OS Version [操作系统类型和版本]:window7 旗舰版


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

graphic可以进行大数据量的渲染,支持每一个graphic矢量可以进行setId和getId。但是不能进行通过ID获取到这个graphic矢量的过程。

同时获取graphic时,应提供对单个对象的获取,编辑,删除操作。

使用classic添加覆盖物画圆时报错

因为项目中需要同时使用classic和for mapboxgl,引入iclient9-mapboxgl.min.js之后,原有的SuperMap对象被覆盖,就会导致某些类的方法不存在

381b1d30

另外 new SuperMap.Geometry.Point().transform方法也不存在

npm Uncaught SyntaxError: Unexpected token export

Request a feature or report a bug? [这是一个需求还是一个缺陷]

bug

One-line summary [问题简述]

npm 引用 @supermap/iclient-classic ,按照官网的例子,提示报错Uncaught SyntaxError: Unexpected token export

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:iclient-classic
  • iClient version [iClient 版本]:9.1.0
  • Browser version [浏览器类型和版本]:node 8.12.0
  • OS Version [操作系统类型和版本]:windows 8

Actual Behavior [当前现象]

Uncaught SyntaxError: Unexpected token export

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]

es6+node开发,参照官网的例子
npm 引用 @supermap/iclient-classic 后,报错Uncaught SyntaxError: Unexpected token export
at createScript (vm.js:80)
at Object.runInThisContext (vm.js:139)
at Module._compile (module.js:606)
at Object.Module._extensions..js (module.js:653)
at Module.load (module.js:561)
at tryModuleLoad (module.js:504)
at Function.Module._load (module.js:496)
at Module.require (module.js:586)
at require (internal/module.js:11)
at eval (iclient-classic"?bb18:1)
在npm.runkit上也会报错
image


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

for mapboxgl mapvLayer在浏览器缩放后拖动地图部分元素清除不掉

Request a feature or report a bug? [这是一个需求还是一个缺陷]

这是一个缺陷

One-line summary [问题简述]

缩放浏览器时mapvLayer会根据devicePixelRatio进行缩放,拖动地图时会对mapv元素进行重绘,因为context的缩放导致部分元素在clear时清除不掉

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]

image

目前的解决办法是:
clear时将width和height同时除以缩放比例就能解决此问题


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

ol5.3.1集成mapv报错

bug

ol5.3.1集成mapv报错

Version ["ol": "^5.3.1","@supermap/iclient-openlayers": "^9.1.1","mapv": "^2.0.33",]

  • iClient product (for openlayers]:
  • Browser version [Google Chrome 72.0.3626.121]:

报错#imageSource.getImage is not a function [当前现象]

地图之前可以正常加载天地图切片,坐标系为3857
image

开发环境截图

image
image
image


是否支持平面无投影数据

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

当在一个页面同时显示两个含有EchartsLayer的地图时,拖动第二个地图会影响第一个

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷 BUG

One-line summary [问题简述]

当在一个页面同时显示两个含有EchartsLayer的地图时,拖动第二个地图会影响第一个

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iClient-Leaflet
  • iClient version [iClient 版本]: ^9.1.1
  • Browser version [浏览器类型和版本]: Chrome 73.0.3683.103
  • OS Version [操作系统类型和版本]: Windows 10

Actual Behavior [当前现象]

当在一个页面同时显示两个含有EchartsLayer的地图时,拖动第二个地图会影响第一个

Expected Behavior [期望现象]

各地图应独立,不存在联动

Example of reproducing the issue [重现现象的例子]

image
第一个地图可以缩放,但所有的scatter不会随地图缩放/移动而改变。而第二个地图可以正常使用,但缩放它会造成第一个地图里的scatter联动。经测试,只在第二个echartsLayer绑定上地图后会出现此BUG。
image


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

关于iclient-openlayers下面的MapExtend.js

Request a feature or report a bug? [这是一个需求还是一个缺陷]

bug

One-line summary [问题简述]

当我的layer是放在openlayers提供的LayerGroup里面的时候,this.getLayers().getArray()返回的不是一个ol.layer.Base,而是一个LayerGroup,这个时候后面的一系列都会报错,望及时处理修复

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:openlayers
  • iClient version [iClient 版本]:9.1.0-beta
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

不能混用 import 以及 module.exports

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

包引用错误

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: for leaflet
  • iClient version [iClient 版本]: 当前master
  • Browser version [浏览器类型和版本]: node 8.9.4
  • OS Version [操作系统类型和版本]: nuxt.js

Actual Behavior [当前现象]

warning in ./node_modules/@supermap/iclient-leaflet/overlay/TurfLayer.js
"export 'default' (imported as 'turf') was not found in '@turf/turf'

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

隐藏的mapvLayer在拖动地图或缩放地图之后会自动显示出来

Request a feature or report a bug? [这是一个需求还是一个缺陷]

这是一个缺陷

One-line summary [问题简述]

由于业务需要我先将mapvLayer隐藏,然后拖动地图或缩放地图,隐藏的图层会被显示出来

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:for mapboxgl
  • iClient version [iClient 版本]:9.1.0-alpha.1
  • Browser version [浏览器类型和版本]:chrome
  • OS Version [操作系统类型和版本]:windows

Actual Behavior [当前现象]

拖动地图之后会把隐藏的图层显示出来

Expected Behavior [期望现象]

拖动地图之后不显示隐藏的图层

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

image
需要将源码中直接调用show方法的地方根据条件判断

echartslayer for leaflet 多次 setOption 出现地理坐标不对应

在leaflet上添加了echartslayer,第一次setIoption后,能正常显示,
如果拖动缩放 ,下次更新opition的时候,直接echartsLayer.setOpition而不是移除echarts图层再添加
就会导致绘制的图形仍然显示在 就像没有移动缩放过得位置处。
通过map .fire("moveend") 会调整到正确的位置,但是容易触发其他的副作用。
请问如何在setOption中直接修正这个行为呢

移除echartsLayer后地图监听事件失效

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

iclient9-leaflet.js 移除echartsLayer后地图监听事件失效

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iclient9-leaflet
  • iClient version [iClient 版本]: v9.1.0-beta
  • Browser version [浏览器类型和版本]: chrome 68.0.3440.106
  • OS Version [操作系统类型和版本]: windows 10

Actual Behavior [当前现象]

对添加的echartsLayer图层进行移除之后,在地图初始化后通过map.on('zoomend',function(e){
})对地图添加的监听事件失效。

Expected Behavior [期望现象]

移除echartsLayer图层,地图监听事件正常

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

关于npm包和ol依赖的问题

你好,我是一名WebGIS初学者。请问,超图为什么不发一个npm包。当然可以使用 require('....') 导入,但我感觉还是发布一个npm包专业一点。还有就是,我在使用 for OpenLayers。请问,超图的API是openlayers 的扩展包吗?如果用require导入模块的话,怎么导入呢?

GetFeaturesServiceBase.js中不能执行跨域请求

image

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

supermap中的GetFeaturesServiceBase.js的165行, http请求的method被写死为POST方法,这导致后续的代码不能执行跨域请求,望修正。

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [Chorme]:
  • OS Version [Win10]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

for leaflet 百度地图的一个问题

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

leaflet 里面的L.supermap.baiduTileLayer在加载百度地图时,若开启连续模式,就是 noWrap设置为false的话,并不是连续的,两个世界地图之间隔了一点距离

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:for leaflet

Actual Behavior [当前现象]

两个世界瓦片之间有距离
image

Expected Behavior [期望现象]

没有距离

Example of reproducing the issue [重现现象的例子]

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="resources.title_baiduLayer"></title>
<script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
        var map = L.map('map', {
            crs: L.CRS.Baidu,
            center: [0, 0],
            zoom: 3
        });
        L.supermap.baiduTileLayer("", {
            noWrap: false,
        }).addTo(map);
    </script>
</body>
</html>

What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

需要展示全球地图,不美观

iclient-classic.js集成mapv,移除动画图层的时候报错

浏览器报错内容:
Uncaught TypeError: Cannot read property 'save' of null
at t.value (VM504 iclient-classic.min.js:9)
at Object. (VM503 mapv.min.js:8)
at Rt.Tween.update (VM503 mapv.min.js:8)
at Object.update (VM503 mapv.min.js:8)
at tt (VM503 mapv.min.js:7)

问题的根源应该是超图图层调用destroy方法的时候,没有清理动画定时器

for mapboxgl 如何实现GetFeaturesBySQLService返回的多区域 style 自定义

for mapboxgl 如何实现GetFeaturesBySQLService返回的多区域 style 自定义。
目前单值专题图和分段专题图实现不了需求。
需求描述:
假如GetFeaturesBySQLService返回了十个区域信息。自定义了五种颜色。
第一个区域使用第一个颜色,第二个区域第二种颜色。以此类推。如何实现这种效果

RestMap查询多个数据集及RestData查询多个数据集结果无法区分是哪一个数据集的结果且字段别名丢失

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

RestMap查询多个数据集及RestData查询多个数据集结果无法区分是哪一个数据集的结果且字段别名丢失

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

  • restMap只能查询一个数据集
  • restData查询多个数据集结构混乱且数据集别名丢失

Expected Behavior [期望现象]

  • restMap查询多个数据集
  • restData查询多个数据集返回结果类似restmap且字段别名不丢失

Example of reproducing the issue [重现现象的例子]

http://iclient.supermap.io/dev/examples/leaflet/editor.html#01_mapQueryBySQLrestMap无法查询多个数据集
http://iclient.supermap.io/dev/examples/leaflet/editor.html#02_getFeatureBySQLrestData查询多个数据集结构错乱

What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

  • 点选/框选restmap可查询出对应的地块

加载矢量瓦片报错

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

加载矢量瓦片报错

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iclient-openlayers
  • iClient version [iClient 版本]:v10.0.0
  • Browser version [浏览器类型和版本]:谷歌78
  • OS Version [操作系统类型和版本]:win10

Actual Behavior [当前现象]

iclient-openlayers-es6.js:89071 Uncaught TypeError: Cannot read property 'applyBackground' of undefined
    at MapboxStyles_MapboxStyles._createStyleFunction (iclient-openlayers-es6.js:89071)
    at MapboxStyles_MapboxStyles._initStyleFunction (iclient-openlayers-es6.js:89062)
    at Image.img.onload (iclient-openlayers-es6.js:89044)

Expected Behavior [期望现象]

矢量瓦片可以加载

Example of reproducing the issue [重现现象的例子]

在本地

	var style_url = "http://47.104.186.12:8090/iserver/services/map-mvt-ZiShuiTu/restjsr/v1/vectortile/maps/渍水图/style.json"
	var format = new ol.format.MVT({
		featureClass: ol.Feature

	});
	var style = new ol.supermap.MapboxStyles({
		style: style_url,
		map: map
	})
	style.on('styleloaded', function () {
		console.log(style)
		var layer_risk = new ol.layer.VectorTile({
			declutter: true,
			source: new ol.source.VectorTileSuperMapRest({
				// url,
				style: style_url,
				projection: 'EPSG:3857',
				format: format
			}),
			style: style.getStyleFunction()
		});
		console.log(layer_risk)
		map.addLayer(layer_risk);
		layer_risk.setVisible(false);
	})
在官方demo加上请求的矢量瓦片

微信截图_20191114182747


在iserver可以浏览
微信截图_20191114182724

What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

echartsLayer使用remove方法移除图层后,再操作地图出现报错

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

iclient9-leaflet.js 中echartsLayer使用remove方法移除图层后,再操作地图报错

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:iClient for leaflet
  • iClient version [iClient 版本]: v9.0.1
  • Browser version [浏览器类型和版本]: Google Chrome 版本 67.0.3396.99
  • OS Version [操作系统类型和版本]: windows 10

Actual Behavior [当前现象]

在地图上添加了一个echartsLayer迁徙图层后,再使用remove方法移除该图层后,再进行地图的拖拽操作;浏览器控制台出现错误信息:Uncaught TypeError: Cannot read property 'containerPointToLayerPoint' of null,同时再次添加一个echartsLayer在地图上会出现地图无法拖拽假死现象,影响地图的其他交互操作。

Expected Behavior [期望现象]

图层清除后,操作正常

Example of reproducing the issue [重现现象的例子]

官网例子:http://iclient.supermapol.com/examples/leaflet/editor.html#echartsGeoLines


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

iclient9-leaflet-es6.js和iclient9-leaflet.js有什么区别吗?

Request a feature or report a bug? [这是一个需求还是一个缺陷]

一个问题

One-line summary [问题简述]

iclient9-leaflet-es6.js和iclient9-leaflet.js有什么区别吗?

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:最新
  • iClient version [iClient 版本]:最新
  • Browser version [浏览器类型和版本]:chrome69
  • OS Version [操作系统类型和版本]:window10 64

Actual Behavior [当前现象]

某个功能用不带es6的有问题,带es6的没问题

Expected Behavior [期望现象]

解决问题

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

9D Classic的mapv图层只支持4326坐标系和3857坐标系吗?我是北京54的坐标系,出不来图,有人知道这个是什么原因吗

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

9D Classic的mapv图层只支持4326坐标系和3857坐标系吗?我是北京54的坐标系,出不来图,有人知道这个是什么原因吗

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

引用冲突

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

在一个页面中同时引入iclient7C和 9D的mapboxgl,会出现冲突,有什么解决方案吗?

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
  • iClient version [iClient 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Actual Behavior [当前现象]

Expected Behavior [期望现象]

Example of reproducing the issue [重现现象的例子]


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

使用@supermap/iclient-leaflet初始化地图的时候少了一个css,导致样式乱

我按照官方文档:

import L from 'leaflet';
import {tiledMapLayer} from '@supermap/iclient-leaflet';

var url = "http://support.supermap.com.cn:8090/iserver/services/map-world/rest/maps/World";
var map = L.map('map', {
crs: L.CRS.EPSG4326,
center: [0, 0],
maxZoom: 18,
zoom: 1
});
tiledMapLayer(url).addTo(map);

代码不会报错,地图出来了,但是样式不对,因为少了某个js,我通过官方源码对比找出来了那个css

希望你们能加到npm包里面去,这样我就不需要在外面应用一次,官网请说明下一下,不然别人第一次使用会以为你们产品有问题

iClient3D没有开源

好像没有找到源代码,只有一个打包后的Cesium.js文件,这也叫开源?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.