OpenLayers

Openlayers : Prevent features icons overlay

て烟熏妆下的殇ゞ 提交于 2021-02-19 08:27:32
问题 I'm using openlayers (v6.4.3) to display a map with features in different layers. I want to prevent overlay of feature's icons from different layers : if two of them overlap, I have to move one of the icons. I looked on the official openlayer's documentation but I can't find an option or a method to achieve that. Thanks for any help ! 来源: https://stackoverflow.com/questions/64043593/openlayers-prevent-features-icons-overlay

Is there any possibilities to realize multi-filter on WebGlPointsLayer

China☆狼群 提交于 2021-02-10 12:16:46
问题 I'm using React, OpenLayers & https://tileserver.readthedocs.io/en/latest/index.html to take src for my WebGlPointLayer. I've got a lot of data to display on the highest zoom. Now I'm going to create some filters, so following OpenLayers example (https://openlayers.org/en/latest/examples/filter-points-webgl.html) I've done the same for my porject. The problem is the multiple filters realization. Filter is done by style.variables and style.filter. { variables: defaultVariables, filter: [

Module not found: Error: Can't resolve 'openlayers' using TypeScript definition file

喜欢而已 提交于 2021-02-08 15:11:00
问题 In a Visual Studio 2017 React application using TypeScrpt there is a component (Map.tsx) that utilizes OpenLayers v4.6.5. The package.json file loads both the @types/openlayers and the "ol" module. { "name": "mhc-maps", "private": true, "version": "2.0.0", "devDependencies": { "@types/history": "^4.6.2", "@types/jquery": "^3.3.1", "@types/openlayers": "^4.6.9", "@types/react": "^16.3.5", "@types/react-dom": "^16.0.4", "@types/react-hot-loader": "^3.0.6", "@types/react-router": "^4.0.23", "

Module not found: Error: Can't resolve 'openlayers' using TypeScript definition file

爷,独闯天下 提交于 2021-02-08 15:10:33
问题 In a Visual Studio 2017 React application using TypeScrpt there is a component (Map.tsx) that utilizes OpenLayers v4.6.5. The package.json file loads both the @types/openlayers and the "ol" module. { "name": "mhc-maps", "private": true, "version": "2.0.0", "devDependencies": { "@types/history": "^4.6.2", "@types/jquery": "^3.3.1", "@types/openlayers": "^4.6.9", "@types/react": "^16.3.5", "@types/react-dom": "^16.0.4", "@types/react-hot-loader": "^3.0.6", "@types/react-router": "^4.0.23", "

Module not found: Error: Can't resolve 'openlayers' using TypeScript definition file

柔情痞子 提交于 2021-02-08 15:10:12
问题 In a Visual Studio 2017 React application using TypeScrpt there is a component (Map.tsx) that utilizes OpenLayers v4.6.5. The package.json file loads both the @types/openlayers and the "ol" module. { "name": "mhc-maps", "private": true, "version": "2.0.0", "devDependencies": { "@types/history": "^4.6.2", "@types/jquery": "^3.3.1", "@types/openlayers": "^4.6.9", "@types/react": "^16.3.5", "@types/react-dom": "^16.0.4", "@types/react-hot-loader": "^3.0.6", "@types/react-router": "^4.0.23", "

Javascript OpenLayers before zoom event listener

╄→尐↘猪︶ㄣ 提交于 2021-02-06 11:23:52
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,

Javascript OpenLayers before zoom event listener

隐身守侯 提交于 2021-02-06 11:22:45
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,

Javascript OpenLayers before zoom event listener

对着背影说爱祢 提交于 2021-02-06 11:22:33
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,

Wrapping Geojson data across date line in Openlayers

白昼怎懂夜的黑 提交于 2021-01-29 19:36:41
问题 I am using OpenLayers to map earthquakes using the USGS dataset available at: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson I am adding layers and configuring the view like so: var map = new Map({ target: 'map', layers: [ new TileLayer({ source: new OSM() }), new ImageLayer({ opacity: 0.3, source: raster }), new WebGLPointsLayer({ source: new VectorSource({ url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson", format: new GeoJSON(),

Scaling the icon-image size to an absolute value

佐手、 提交于 2021-01-29 17:18:17
问题 I'm developing an application where one functionality is displaying a device on a map using open-layers. These devices can be added by the user and they all can have a custom icon-image using an uploaded image. This image can also be changed on runtime depending on some of the devices attributes (for example the temperature). From what i understood reading through their documentation, there are some properties on the ol.style.Icon object like imgSize which is are all cutting, but not scaling