Questions tagged [openlayers]

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

718 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
9k views

Using Google Maps Tile Service with OpenLayers 5

How to pass Google Maps API key to access tile service using OpenLayers 5. Some google searches suggested me to set the url of tile layer as http://mt.google.com/vt/lyrs=m&x={x}&y={y}&z=...
5
votes
0answers
1k views

Vector tiles from GeoServer seem to work, but invisible

I run GeoServer 2.10.0 powered by a vector tiles plugin (geoserver-2.10-SNAPSHOT-vectortiles-plugin.zip) on Ubuntu Server 16.04. Following this official tutorial I tried to visualize a simple map in ...
4
votes
1answer
760 views

Splitting feature in OpenLayers 5?

How do you split an OpenLayers Vector Feature (Polygon or a LineString)? i.e ux: select feature, select a 'split' UI button, draw a split on-top of the polygon or through the line. The feature ...
4
votes
0answers
761 views

Mapbox GL JS style vector tile interaction in OpenLayers?

I am currently researching different approaches for integrating vector tiles (especially MVT and/or GeoJSON tiles, served from GeoServer) with OpenLayers (^4.0.0) in a manner that would retain access ...
4
votes
0answers
307 views

Mapcache zooming problem

I am using mapcache for caching map raster data. Everything works fine except the map zooming, because at the some zoom level i am getting pink tiling images. This is my mapcache xml file: <?xml ...
4
votes
0answers
831 views

mapbox styling of vector tiles with many features in openlayers 4

I am trying to process a vector tile source in OpenLayers using the VectorTile layer and source in OpenLayers 4.1. The backend is serving pbf (mvt-based) tiles from an mbtiles source. The tiles have ...
4
votes
0answers
707 views

Access Elements in SVG with Openlayers 3 using forEachFeatureAtPixel()

I am trying to access elements (id, style) of a SVG image in Openlayers 3. I tried to link different examples, but the problem is that displaying a SVG is only possible with ImageStatic() and the SVG ...
4
votes
0answers
295 views

Thematic map exported using QGIS2Web is extremely laggy

I have made a world thematic map and added layers of data for creating graduated color scheme on the country level. I need a interactive map as an output which shows values when user hover over any ...
4
votes
0answers
622 views

SLD format in modern OpenLayers library

It seems like old versions of OpenLayers supported SLD format. There was a construct like: var format = new OpenLayers.Format.SLD(); But I cannot find it in modern OpenLayers library. I checked ol....
4
votes
0answers
254 views

OpenLayers 3 support for WMS 1.3.0 CRS:1

I am trying to get a TileWMS layer working with the Coordinate System as CRS:1 defined in WMS 1.3.0. By defining the right projection stated in CRS:1, axisorientation as 'es', I could get it working ...
3
votes
0answers
118 views

Multiple color styles in one GeoServer layer

I have a GeoServer layer coming from a shapefile and I am using it with OpenLayers. I want to put multiple colors in the same layer depending on their attributes. How can I put multiple colors on a ...
3
votes
0answers
169 views

Canvas element with 'width: 0' in OpenLayers 6 instance on Vue.js

I am using Vue components to generate multiple instances of OpenLayers in the same parent component. Ultimately I am attempting to export an image of each instance of OpenLayers using the html-to-...
3
votes
0answers
130 views

Displaying QGIS's “Map Tips” in OpenLayers?

Still a little new to QGIS and Openlayers. How would you display QGIS's "Map Tips" into OpenLayers? I am currently using QGIS 2.18 and have the latest update in Openlayers. In QGIS, I have created a ...
3
votes
0answers
99 views

Drawing an Ellipse in Openlayers 4 with interaction

In OpenLayers 2, I could easily create a Control to draw an ellipse like this: new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.RegularPolygon, { handlerOptions:...
3
votes
0answers
558 views

Converting GeoJSON file to vector tiles

I need to display huge GeoJSON file using OpenLayers. So I decided to use VectorTiles. Library geojson-vt.js works perfectly for me, but unfortunately it requires my GeoJSON file to be preloaded on ...
3
votes
2answers
1k views

Using OpenLayers 5.3 in TypeScript without Node.js

I would like to use the latest version of OpenLayers (5.3) in small project. The requirements are: no Node.js - I will be running thing on the site hosted on IIS, simple HTML files scripts need to be ...
3
votes
1answer
487 views

Displaying GeoServer vector tile using OpenLayers?

I'm using OpenLayers 5.3 and GeoServer to create a web map. Previously, I was using Leaflet and was able to display my layer as a vector tile. Now, I'm having issues getting the vector tile to display ...
3
votes
0answers
223 views

WMS - understanding <Min> and <MaxScaleDenominator>

I am working on a personal web gis client and the first thing I am implementing is support for OGC WMS 1.3.0. Right now, I am in the middle of greying out layers in my layer tree which are not ...
3
votes
0answers
611 views

Why is the attached WMS service not working with QGIS and QGIS2WEB?

I am using QGIS2WEB (open layers) to develop a small platform with geodata. I am having trouble integrating the following WMS service into my webmap: http://geoportal.frankfurt.de/opendata/...
3
votes
0answers
326 views

How to synchronize map context (bounding box and zoom level) only with ol-cesium?

I posted this question on StackOverflow, but since there is no answer yet and as recommended in a comment, I'll ask it here too: I'm programming a page where a 2D and a 3D map are side-by-side as in ...
3
votes
0answers
422 views

Create Drag Drop Pegman Using OpenLayers 4

Here is a fiddle of my progress: http://jsfiddle.net/pegues/a5mn1ogu/ I've been trying to figure out how to create a drag and drop marker using OpenLayers like what is found with Pegman in Google ...
3
votes
0answers
94 views

Allow user to pan after once 'box' is draw in Openlayer2

I am using this example http://dev.openlayers.org/examples/draw-feature.html to draw a box on a map using 'draw box' checkbox option. Now I want , After drawing box I can be able to pan on map ...
3
votes
0answers
165 views

Geoserver: how to filter a layer related to another layer?

I have the following problem: I have 2 vector layers from PostGIS datastores: "firepoints" and "threats". The corresponding tables "firepoints" and "threats" have IDs and other attributes. They are ...
3
votes
0answers
811 views

Modify features not updating on vector layer

I have point vector layer in my application.Now I am trying to modify its coordinates. I am able to do it but its not reflecting on layer. Here is code I am using : var selectInt = new ol.interaction....
3
votes
0answers
783 views

heatmaps with local maxima, weight, api functionalities

I am looking for a heatmap vizualization on a map, which shows: local maxima: that means that you always see some "red spots" regardless the zoom. See the picture below. enables to set a weight to ...
3
votes
0answers
128 views

Image & limit user access by poly

Wondering how do I clip images to polygon outlines in a web map application based on OpenLayers or Leaflet? How can I limit web map users to see (visualize; qualitative) or query (quantitative) within ...
3
votes
0answers
416 views

Maintaining Curves in Mapbox-GL

I am trying out Mapbox-gl-js as an alternative to our current openLayers 3 solution. This is primarily due to a desire to shift away from raster backgrounds and to utilize the webGL and vector tile ...
3
votes
0answers
566 views

Load 3D models on globe or 2D map

I'm using ol3, ol3-cesium for creating 2D map & 3D globe. These things are getting used at backend 1) tinyows 2) map server 3) postgis Now I want load 3D models on my map and globe. Lots of ...
3
votes
0answers
2k views

Openlayers 3 different projection Geojson view

My map projection is EPSG:3857. And I want to show a GeoJSON data which has EPSG:4326 projection. var source = new ol.source.Vector({ url: 'http://localhost:15485/api/...
3
votes
0answers
754 views

Draw d3 svg circles on openlayers 3 maps

I am new to openlayers and d3. I tried following example http://openlayers.org/en/master/examples/d3.html I see we need to add d3 features on a canvas and project it on an openlayers Vector layer. ...
3
votes
0answers
835 views

Custom Dash style in OpenLayers 3?

I know that it is possible to make a line or polygon with dashed stroke. It can be done with the following way, for example: var myStyle = new ol.style.Style ({ stroke: new ol.style.Stroke({...
2
votes
0answers
421 views

Use Angular 8 and OpenLayers 3 in order to draw and delete temporary vector layers from a map

I have a project built with Angular 8 and OpenLayers 3. I want to be able to draw and also delete Polygons from a map. I tried to port this working example into my project. These are the interacting ...
2
votes
0answers
145 views

OpenLayers 6 - reprojected GeoJSON data not displaying on map

I'm using latest OpenLayers (6.1.1) and proj4js 2.6.0 to display a multipoint geometry. I first define my input data project with proj4 then create an open layer vector source as follow: proj4.defs("...
2
votes
0answers
27 views

Default or wrong behavior with multiple clicks in intersection zone in OpenLayers?

We use Vue.js and OpenLayers 4.6.5 in our project. I've noticed the following behavior - when I have two intersected polygons with some styles and click first time inside the intersection area (look ...
2
votes
0answers
111 views

Using WFS-Transaction to update attribute's value of certain feature?

I want to edit the attribute's value of certain feature. I have managed to display the feature data from GeoServer layer to browser using OpenLayers. I also have managed to display some feature's ...
2
votes
0answers
36 views

Tiles map server - How to provide the same tiles on lower zoom?

I have my own map server defined like below. This is one layer, but have 4 layers for other zooms. Unfortunately for zoom lower then 8 I don't have tile images. Is possible to make zoom out lower than ...
2
votes
0answers
167 views

OpenLayer's graticule doesn't properly work

I am making a map of Krasnoyarskiy krai subject of Russia. I have defined a custom projection that should be used for this area using proj4 string. I need to show lat/long grid only for this territory....
2
votes
0answers
167 views

Get Feature id in OpenLayers from GeoServer/PostGIS

With OpenLayers, I'm creating layers like ol.layer.VectorTile var projection_epsg_name = 'EPSG:900913'; var geoserverLayerName = 'teste:map_shape2'; const tileLoadURL= 'http://127.0.0.1:8081/...
2
votes
0answers
50 views

Page becomes slow after adding some points at an interval

I have an interval that sends request to the server every 2 seconds and updates the map data. The server sends json and in Javascript i iterate over and set some styles and features. However i ...
2
votes
0answers
66 views

Select GeoServer vector tiles feature using OpenLayers and show features attribute in popup?

I have installed vector tiles extension in GeoServer and published a PostGIS tables using this format. The requested vector tiles from GeoServer using Openlayers works fine. Now, I want to select and ...
2
votes
1answer
389 views

Openlayers-6 .fit(extent, {options}) not working with options

I have upgrade openlayers in IONIC V3 app from 4.6.5 to 6.1.0. Now map.getView().fit(extent, {duration:1000}) stop working, when i remove the options object it works fine. Am i doing something wrong ...
2
votes
1answer
108 views

Triggering built-in events programatically OpenLayers

Is there a way to trigger openlayers event from console. In this case: ol.interaction.Select event which listens 'select' (ol.SelectEvent.select). It triggers when feature is selected or deselected ...
2
votes
0answers
312 views

Select interaction for each layer is not working in OpenLayers

I have multiple layers in my OpenLayers application. I need layer based specific info Windows. Each layer will have its own select interaction. This is my problem. I do not want to add layers in one ...
2
votes
0answers
180 views

Can declutter work with MultiPoint features?

I have a vector layer with Point data. There could easily be between 10K and 30K features to render, each feature with their respective label, so decluttering is needed. My goal is to have the ...
2
votes
0answers
134 views

MapServer Query Raster for Pixel Value at Point

I am working with a MapServer and a map file that is displaying a color-relief image. LAYER NAME "sum" DATA "sum.vrt" TYPE RASTER STATUS ...
2
votes
2answers
616 views

OpenLayers overlay bubbling problem

Regarding on the previous question asked https://gis.stackexchange.com/a/303372/119333, solution from best answer is implemented and its working. I am rendering tab panel inside popup overlay and you ...
2
votes
0answers
106 views

Rendering huge vector data whose geometry is fixed but attributes are changing every 2 minutes?

I want to create an application displaying road network with traffic details. I am using OpenLayers 3 and GeoServer 2.14 for this purpose. My data (stored in PostgreSQL+ PostGIS) has around half a ...
2
votes
0answers
98 views

Using OpenLayers with alternative map source to integrate Google Street View?

I am researching any possibilities of Using an alternative map source other than Google that I can integrate Google Street View. Due to the drastic rate changes for Google Maps API I would like to ...
2
votes
0answers
170 views

How to disable imageSmoothingEnabled for geoImageLayer?

Considering the code below (which uses openlayers and Viglino's ol-ext), how do I disable imageSmoothingEnabled for the geoImageLayer? I am trying to achieve the same thing as in this question, but ...
2
votes
0answers
2k views

OpenLayers: change cursor upon hovering over feature

I want to change the mouse cursor to a pointer when the mouse is hovering over a feature. I currently have the following: this.map.on('pointermove', evt => { if (!evt.dragging) { this.map....

1
2 3 4 5
15