OpenLayers

OpenLayers Map addLayer and getLayers methods dealing with custom layer types

a 夏天 提交于 2020-08-10 22:49:42
问题 I am extending LayerGroup and TileLayer classes to include an id property that I need to identify a specific layer/group of layers (this also reflects an id of a layer DIV in the DOM). Example for TileLayer : export class OperationalLayer extends TileLayer { id: String; constructor(url: string, name: string, id: string) { const source = new TileWMS({ params: {'LAYERS': name}, url: url, }); super({source: source}); this.id = id; } } I also have another class which extends the ol Map class.

OpenLayers Map addLayer and getLayers methods dealing with custom layer types

回眸只為那壹抹淺笑 提交于 2020-08-10 22:48:57
问题 I am extending LayerGroup and TileLayer classes to include an id property that I need to identify a specific layer/group of layers (this also reflects an id of a layer DIV in the DOM). Example for TileLayer : export class OperationalLayer extends TileLayer { id: String; constructor(url: string, name: string, id: string) { const source = new TileWMS({ params: {'LAYERS': name}, url: url, }); super({source: source}); this.id = id; } } I also have another class which extends the ol Map class.

基于 QGIS 在内网中离线加载卫星地图的方法

戏子无情 提交于 2020-08-05 18:10:54
1. 概述 我们之前为大家分享过在三维地球开源平台离线加载卫星影像的方法,主要包括基于桌面端的OsgEarth开源三维地球和基于Web端的Cesium开源三维地球等平台的局域网离线影像加载。 另外,也为大家分享过在二维开源平台离线加载卫星影像的方法,主要包括基于OpenLayers的内网WebGIS离线部署、基于MapBox的内网WebGIS离线部署和基于 GoogleMap 离线 API 在内网中加载离线卫星地图等具体操作方法。 但由于有客户咨询过如何在QGIS中离线加载谷歌卫星影像的问题,因此觉得有必要再针对这个问题为大家作一下分享。 那么什么是QGIS呢? QGIS原称为Quantum GIS,是一个用户界面友好的开源桌面端软件,支持数据的可视化、管理、编辑、分析以及印刷地图的制作,并支持多种矢量、栅格与数据库格式及功能。 你也可以简单粗暴地把它理解为是一个开源且免费的ArcGIS,因为它和ArcGIS一样都有着很多非常强大的GIS功能。 2. 准备工作 在开始之前,需要先准备离线数据发布软件、离线卫星影像示例数据、QGIS安装包和本机IP地址等。 地图发布软件: 需要在内网发布离线卫星影像,请确保地图发布服务中间件版本为4.0.6以上,如果低于该版本,请通过私信并回复"中间件"免费获取最新版本安装包,也可以直接在水经注官方网站下载。 离线示例数据:

Openlayers export to KML and keep my map styles

旧城冷巷雨未停 提交于 2020-08-02 22:36:51
问题 I successfully write a KML from Openlayers, however no styles (colors, stroke, etc.) are present in the kml file. Is it possible to generate the KML with the styles? I found a similar question here: https://gis.stackexchange.com/questions/17031/openlayers-format-kml-write-style Thanks in advance. 回答1: As of yet the WRITE method does not make use of the 'extractStyles':true, property as you can see here. Only the READ method does. The only way I saw was simply to recreate them. In the example

openlayers6结合echarts4实现迁徙图

佐手、 提交于 2020-07-27 22:57:46
效果图如下: 参考GitHub来实现的,更详细的源码以及参数说明见: GitHub 本篇文章的html源码: <!DOCTYPE html> <html> <head> <title>openlayers6结合echarts4实现迁徙图</title> <link rel="stylesheet" href="lib/ol.css"> <script src="lib/ol.js"></script> <script src="lib/echarts.js"></script> <script src="lib/ol-echarts.js"></script> <!--<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.js"></script> <script src="https://unpkg.com/ol-echarts/dist/ol-echarts.js"></script>--> <style> html, body, #map { height: 100% ; margin: 0 ; padding: 0 ; } </style> </head> <body> <div id="map"></div> <script> /* * * 地图创建初始化 */ var map = new ol

Manipulate GeoJSON Data - reload vector Layer in OpenLayers

こ雲淡風輕ζ 提交于 2020-06-17 08:09:19
问题 I’m stuck on creating a function that manipulates loaded GeoJSON data and updates the OpenLayers Map. What I have so far is a map that works with data filtered from a loaded GeoJSON file. How do I change the vector layer to use updated data? That’s my code so far: load GeoJSON fullGeoJSON : var fullGeoJSON = require("./data/data.json"); create var filteredGeoJSON var filteredGeoJSON = { "type": "FeatureCollection", "features": [] }; fill empty features by filtering the fullGeoJSON function

Flutter and Openlayers - including js libraries in flutter

感情迁移 提交于 2020-06-12 05:39:52
问题 Coming from the js/cordova based cross-platform universe, I am digging into flutter lately. So I wonder about the options to make use of the various js libraries in flutter directly. More concrete I am interested in using the openlayers library in flutter to create a versatile map view with various functions for drawing and editing. So I wonder what options are there to include it. So far I see two major ways: Using a webview: Even though there is no native webview widget yet in flutter there

Creating Heatmap in OpenLayers with Vector Source Containing LineStrings

前提是你 提交于 2020-05-28 10:43:59
问题 I am interested in creating heatmaps in OpenLayers to visualize the density of certain observations in space. My data comes in the form of GeoJSON files, some of which contain point features, while others contain LineStrings. I was able to create a vector source from the GeoJSON files containing points, successfully visualizing a heatmap layer from that source. However, I am unable to create a heatmap following the same procedure with the GeoJSON files contaning LineStrings. Is this

Creating Heatmap in OpenLayers with Vector Source Containing LineStrings

◇◆丶佛笑我妖孽 提交于 2020-05-28 10:40:48
问题 I am interested in creating heatmaps in OpenLayers to visualize the density of certain observations in space. My data comes in the form of GeoJSON files, some of which contain point features, while others contain LineStrings. I was able to create a vector source from the GeoJSON files containing points, successfully visualizing a heatmap layer from that source. However, I am unable to create a heatmap following the same procedure with the GeoJSON files contaning LineStrings. Is this

Updating to OpenLayers 3 [closed]

独自空忆成欢 提交于 2020-05-11 04:43:42
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm looking to update my application from OpenLayers 2 to OpenLayers 3. Is anyone aware of a Migration Guide (or something similar) that would help with this? 回答1: FWIW - We'd like to contribute as we migrate our simple-minded page at http://www.nufosmatic.com from ol2 to ol3. The