Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [openlayers]

Use when the version you are using of the OpenLayers JavaScript client toolkit is 3 or later

0
votes
0answers
20 views

Update Legend on Openlayers Based on Active Layers from Geoserver [on hold]

I have an OpenLayers web-app pulling in WMS and WFS data from GeoServer, a layer-switcher is also present to toggle specific layers and re-arrange their order(Z-index) using ol-ext. I would like to ...
0
votes
0answers
16 views

OpenLayers ol-debug.js provisions ol.js property

I'm used OpenLayers 4.1.1 I have a function written with ol-debug.js My goal is to enter the first coordinate manually and simply draw the linestring. ...
0
votes
1answer
19 views

OpenLayers/Geoserver rendering transformation is failing at the Prime Meridian

I have a layer that represents surface pressure in GeoServer. I am using a rendering transformation SLD to generate the contours. When I try to map it in OpenLayers, the contours show up fine when ...
1
vote
0answers
25 views

OpenLayers. Slow map after render heatmap even when I clear the layer source

I'm working in a map with about 10 layers and it works fine, when I create a heatmap it becomes slower, that's something I was expecting, because the source has about 2000 points. When I want to make ...
0
votes
1answer
15 views

How to set individual feature angle in Openlayers

I have an application where each element has an angle. I can use "Angle" function in "style" but not individual. Is there any way to apply angle individually? function DesenhaPonto(Id, Estilo, ...
0
votes
1answer
18 views

Clip OL TileLayer by Vector AND stop it from fetching the tiles

I'm trying to clip a layer by vector in OpenLayers 5. I've found this answer that kind of works, but it does not solve my specific problem, namely bandwidth. I'm combining WMTS services from two ...
0
votes
0answers
34 views

Dowloaded OSM file not showing in my project view area when I load the vector layer [on hold]

I have the OpenLayers plugin and have downloaded and saved an OSM file for my area of interest. I was able to add the file as a vector layer and see the different vector layers of the map before but ...
3
votes
1answer
50 views

Geoserver's scale values corresponds to OL's zoom levels

I have a PostGIS table that contains geometry, min_scale, and max_scale fields. The PostGIS table is published as a Geoserver layer with EPSG = 4326. I have created a CSS Style Doc that will show each ...
0
votes
0answers
37 views

OpenLayers interaction.draw Simulate a Mouse Click

My problem is not to draw lines to manually entered coordinates. I can start this with a mouse click and then do as I want. var draw = new ol.interaction.Draw({ source: _this.properties.layer....
0
votes
0answers
25 views

Reorder WMS Layers Using an Interface on Leaflet/Openlayers

As simple as it sounds, WMS layers from Geoserver rendered on client side via Leaflet/Openlayers have their Z-index predefined in the code itself; I was hoping to use an interface of sorts to reorder ...
0
votes
1answer
70 views

Bounding box coordinates and strange WMS behavior

I'm having trouble with using OpenLayers to render a GeoServer WMS layer. I have searched about it on the internet but have found no workaround yet. I intend to provide as much as I know on this ...
1
vote
1answer
22 views

Mapserver not displaying a raster properly

I have a 32bit floating point raster containing only five values (-2, -1, 0, 1, 2 + -999000000 for noData don't ask me why, it was delivered to me), no compression, projected (EPSG:3857). I am using ...
0
votes
0answers
30 views

Webmap plugin in QGIS 2.18

I am having big trouble using the 'Webmap' plugin. It worked very beautifully until something happened with the encoding of characters. As of now QGIS just hangs up. This is the error message I get ...
0
votes
1answer
39 views

GeoServer get native SRS of layer

I want to get the native SRS/EPSG-Code of a layer deployed in GeoServer. Maybe similar to this solution: https://stackoverflow.com/questions/32766126/get-the-epsg-code-from-openlayers-3-layer but with ...
0
votes
0answers
12 views

Generate Markers from WFS via turf.centroid() with Popups

I have successfully made a map that computes points from a WFS consisting of polygons and generates them as markers. The calculation is carried out by turf.js. However, I do not get all the properties ...
0
votes
0answers
22 views

Does OpenLayers 4.6.5 (or latest 5.3.0) support reprojection of VectorTiles in MVT format?

I have been setting up my own MVT-service, which takes some GeoJSON input and convert it to MVT tiles. Then I've used Open Layers 4.6.5 to render the tiles. The testdata I have been playing with is ...
1
vote
0answers
13 views

Openlayers 2: [In Touch] Pinch zoom action triggers click event at the end. How to prevent click on pinch zoom

Openlayers 2: [In Touch] Pinch zoom action triggers click event at the end. How to prevent click event registered on map getting triggered when pinch is done
1
vote
1answer
51 views

Openlayers get list of all layers in Geoserver

How can I get a list of all layers deployed in Geoserver separated by Vector/Raster? Similar to how Geoserver itself does this when one uses the WPS Request Builder (it then shows a complete list of ...
0
votes
1answer
36 views

Openlayers - parse WFS features to create Attribute Table

I am trying to parse this WFS to create an Attribute Table with HTML having the fields as headers and their values as attributes. I saved the GetFeature response in a variable (features) which I'd ...
0
votes
0answers
18 views

Uncaught TypeError: #<Object> is not iterable

I am following the openlayers workshop tutorial but I always getting this error in developer tools when I try to look at results on the webpage. Also the map does not render at all. Uncaught ...
0
votes
1answer
18 views

Triggering Events on Drawing Geometries

Which events are triggered when I draw, for example, a polygon? Like when I define the vertices of the polygon by clicking? And how can I capture these events? Or, better: Is there any documentation ...
0
votes
0answers
38 views

OpenLayers can access GeoServer map via localhost, but not when HTML/JS/CSS opened as file

I am developing a practical class in which students will use OpenLayers to build an application which accesses a variety of WMS and WFS resources including ones I am setting up on my own PostGIS/...
0
votes
1answer
16 views

Customize behaviour of Ol.interaction.draw.createbox() geometryFunction?

I'd like to enable a draw function in an Openlayers 3 application for drawing a rectangle - up to a certain size (in the defined projected coordinate system, in square meters). For this ol....
0
votes
1answer
56 views

How to temporary disable map click event in OpenLayers

How can I disable map click event? My idea is to disable it when I am positioned with mouse over my popup container. After I move mouse out of it, I want that event is enabled again. Something like ...
1
vote
0answers
30 views

OpenLayers : how to dynamically change projection of a Tile Layer?

I've added a tile base map and and a couple of vector layers using OpenLayers. I'm implementing a change map projection functionality. For that, I need to change map projection and all added layers . ...
0
votes
1answer
32 views

MapServer WFS request

I want to request a WFS feature but my mapfile returns WMS, I have tried to change the mapfile but it still returns the WMS. I am using MapServer 7.3 and OpenLayers 4. Below is my mapfile ... ...
0
votes
0answers
18 views

OpenLayers 3.10 - can't create Vector Layer and add Features to it in runtime

The goal is to fetch features via WFS and then plot them as LineStrings in a Vector layer, updating them every time the map moves or zooms. It's necessary to fetch with WFS and then plot the Features ...
0
votes
0answers
34 views

OL onclick events in an angular app

I am trying to develope an Angular app which uses open layers, this is nothing important, I just want to learn how to combine them. The app already shows a map, this is the ts code: import { ...
1
vote
0answers
32 views

Which is the View.getResolution() units? [duplicate]

In OpenLayers v5, if I have a view defined like this: var view = new View({ center: [952014.59, 5571269.68], zoom: 8 }); , trying to get its resolution doing view.getResolution() outputs 611....
1
vote
1answer
23 views

WKT from current map view in OpenLayers

Trying to find the best way to take the current map view extent const extent = mapView.calculateExtent(); and get a WKT from that value. i thought i might be able to take that extent, convert it ...
1
vote
0answers
51 views

GeoServer SLD contours fail to draw some times when panning (using Layer Preview)

I am using GeoServer 2.13.2 with netcdf data from ECMWF and all is working fairly well with a fixed extent. As soon as I turn on Map Wrapping (wrapx) in OpenLayers (5.x) then contours, wind barbs, and ...
0
votes
0answers
29 views

OL-Cesium - Example doesn't work

I would like to test the Ol-Cesium on my computer with this example: https://openlayers.org/ol-cesium/examples/oldfashioned.html I saved the olcs.css, olcesium.js and Cesium.js file into my webserver'...
0
votes
1answer
44 views

How to specify custom CSS to an OpenLayers Zoom Control in Angular 6?

I am attempting to modify the Zoom buttons on OpenLayers 5.3 in an Angular 6 component. And I'm using this OL3 question as a starting point: Creating new buttons and removing default ones - Openlayers-...
0
votes
0answers
58 views

Getting data from JSON data API?

As asked in previous question: Displaying icon name next to icon using OpenLayers? , now I need to change data source to the JSON API data, and used jquery plugin bypass CORS (http://www.ajax-cross-...
0
votes
1answer
36 views

OpenLayers: cannot register custom projections

I'm trying to load an OpenLayers map with UTM projection. If I try to register custom projection, the map becomes blank. proj4.defs('EPSG:32640', '+proj=utm +zone=40 +datum=WGS84 +units=m +no_defs'); ...
0
votes
1answer
49 views

Openlayers displaying local pbf at wrong location

Need help for displaying of local pbf file, it does show tiles but at wrong location and when zoom-in the whole feature set split into 4 locations. First Openlayers v 4.6.5 is not displaying local ...
0
votes
1answer
55 views

Why is my openlayers map not showing?

I'm trying to create a plunker to find out a solution when adding projection list in Openlayers. But when I add a sample map, it's not showing the map and there is no error in the console either. ...
0
votes
0answers
26 views

Get coordinates from the OpenLayers drawn feature and redraw it again in OpenLayers?

I am drawing a polygon a extracting it feature coordiantes on "drawend" using the code var feature = evt.feature; var featureArray = feature.getGeometry().getCoordinates(); and it is giving me an ...
0
votes
1answer
44 views

How to update tile source URL at zoom change

I'm using MapServer tile mode with OpenLayers 5.3 new ol.layer.Tile({ source: new ol.source.XYZ({ url: 'http://localhost/cgi-bin/mapserv.exe?' + 'map=mapfile&' + ...
0
votes
0answers
41 views

OpenLayers 5: Re-projecting GeoJSON from EPSG:25832 to EPSG.4326

I'm trying to reproject drawn features in a ol.view in EPSG: 25832 to EPSG:4326 (WGS: 84), but I cannot seem to crack the code. Code sample: proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=...
1
vote
0answers
22 views

Dynamic colouring of SVG-icons in OpenLayers 2

I've got an OpenLayers 2 map with a lot of point features that need to be represented using a number of different SVG-symbols. Unfortunately, the marker icons need to be displayed in different ...
0
votes
0answers
32 views

Overlaying Tiles from drone onto OpenLayers map?

I have a collection of geoTiffs processed by Open Drone Maps. In particular, there is a folder with tiles generated thru webODM that I want to add into an openlayers map. I see explanations of how ...
1
vote
0answers
24 views

Openlayers: with a list of features, how can I organize them by distance from a coordinate

Let's say I'm using openlayers (5) and I have an array of features, they can all be from different layer sources, and I have a set of coordinates. What is the best way to sort that array so that the ...
0
votes
0answers
28 views

How to unregister listener in OpenLayers 5plus

I have the service for vector drawing in Angular 6 and register from them the draw-end event. this.drawService.draw.once("drawend", e => { const dialogConfig = new MatDialogConfig(); ...
0
votes
1answer
35 views

Openlayers select feature in KML

I'm having trouble selecting a feature inside a KML, and wondering if this is even supported. as a pretty basic example i have: var vectorSource = new ol.source.Vector({ //url: 'https://...
1
vote
1answer
39 views

OpenLayers getting OSM from local server

I have successfully installed OSM tile server on a local server. I verified operation using direct calls http://server_ip/hot/z/x/y.png I setup a page with OpenLayers 5.2.0. The layer init : osm = ...
0
votes
0answers
36 views

FeatureServer vs WMS - OpenLayers 3

I'm new to Web GIS and I've been asked to add a feature layer on a map. I am using OpenLayers 3 and tried this example and it works on my map ArcGIS REST Feature Service The feature layer that I ...
1
vote
1answer
52 views

Image service with GeoServer, PostGIS

I haven't setup or deployed any web services and most help seems to be around vector data... I need input on how to set up and optimize an image service with GeoServer, PostGIS to use in OpenLayers ...
0
votes
1answer
24 views

OpenLayers JavaScript sources 404

When loading JS script to display OpenLayers in a webpage, I am getting 404 on both stylesheet and script. Any alternative sources for code? Can't find it on OpenLayers Github, which is now version ...
0
votes
0answers
31 views

Openlayers styleFunction()

I am working with Openlayers 5. Does anyone know what is the difference between setting style with: styleFunction() and layer.forEachFeature(function(feature){ style=new ol.style.Style({...}) ...