Questions tagged [openlayers]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
6 views

Serving Tiles of format {z}/{x}/{-y}.png in Openlayers version 6.3.1

I am facing a problem in serving the map tiles in Openlayers the format for the tiles is {z}/{x}/{-y}.png but when i try to add this url into the tile source it is giving me the following error ...
0
votes
1answer
21 views

Why PostGIS st_transform length is different?

I have two query select sum(st_length(shape)) from sde.ways; result is: 24268 And select sum(st_length(st_transform(shape, 3857))) from sde.ways; result is: 32047 Same Linestring geometries are ...
0
votes
0answers
19 views

How do you pull EPSG:4326 tiles from GeopackageJS using OpenLayers 6?

I'm trying to leverage GeopackageJS for use in a mapping application using OpenLayers 6, but the documentation seems to be really iffy-- the link to the API documentation actually 404s and the ...
0
votes
0answers
26 views

Display Features based on Zoom Level using OpenLayers

I want to display roads(linestring) on the map using OpenLayers.currently, I manage to assign styling based on road type but when I run the server I can see all the data displayed. I want to change ...
-1
votes
0answers
61 views

WFS layer is not displaying using OpenLayers and GeoServer [closed]

I have tried as many examples I can like WFS layer not showing? How to add GeoServer wfs layer on OpenLayers? etc but unfortunately still i am stuck my WFS layer is not showing <script src=&...
0
votes
0answers
14 views

Openlayers: add padding to zoom in on a cluster

I need to add a padding to a zoom in on cluster function. I've used a part of this code to do this. var zoomCluster = function(pixel) { var feature = map.forEachFeatureAtPixel(pixel, function(...
0
votes
0answers
32 views

Custom indoor tiles and coordinate system [closed]

I am new to OpenLayers and Leaflet, I want to display an indoor layout (tiles converted from CAD) on the browser, and being able to zoom in/out. I also have a indoor map image (which is the same place ...
0
votes
0answers
29 views

How can I detect overlapping geometries in OpenLayers 6.3.1

I'm using OL 6.3.1 and have a need to detect when the geometries of polygons overlap or intersect. Specifically I am trying to do something like this when a user draws a polygon: self.olMap....
2
votes
1answer
39 views

GeoServer CQL Filter doesnt work with Unicode

I'm using CQL filter to extract certain data from my GeoServer layer. var source = new ol.source.Vector({ loader: function (extent, resolution, projection) { var url = "http://...
0
votes
2answers
23 views

Get attribute table from WMS GeoServer in OpenLayers

I have WMS so I can easily display it in the map, but I want to get the attribute table of the layer from WMS. All solutions I found are about getFeatureInfo which is giving properties when clicking ...
1
vote
1answer
44 views

Preventing scaling during raster rendering in MapServer

I have encoded some metrics in a 4-band geotiff that will be served by MapServer (v7.4), and I want to "decode" them client-side for display using raster operations in OpenLayers (v6.1). (...
0
votes
0answers
36 views

Getting vertices of geometry that type is not known?

I am using a WFS service that serves Polygon and Multipolygon geometries. But I do not know ehich ones. So I am converting the wfs response to feature. this.http.get(url, { responseType: "text&...
0
votes
0answers
29 views

Vector tile selection layer (canvas) drawn outside the map div. Bug?

I loaded a PBF vector tile layers into my map, and when I select a feature, OpenLayers 6.3.1 creates the selected layer canvas outside the map. Is it a general problem, or just mine? I don't attach ...
0
votes
1answer
20 views

OpenLayers 5 multiple markers all end up at last position

I have a LineString in OL5 and I want to iterate over each segment and display a label at the segment end. I have this mostly working, but all the Overlay labels magically end up at the last position ...
0
votes
1answer
29 views

Popup filling with AJAX?

Is there a solution to fill a popup with content getting from a AJAX call, without JQuery in OpenLayers 5? The content is in *.txt files, or I can handle it to send the content as a JSON or HTML via ...
0
votes
1answer
66 views

Publishing web map on website using PostGIS, GeoServer and OpenLayers

I have been trying to create a web map using PostgreSQL/PostGIS - GeoServer - OpenLayers. However, the resulting map is on my localhost and the data published in GeoServer can be accessed solely ...
1
vote
1answer
37 views

Import ol-ext to a React - Open Layers 6 project

I'm trying to set up a React project where I want to use some of the tools provided by the ol-ext. I looked around and found some Codesandbox projects from the creator of the library but I was unable ...
1
vote
1answer
30 views

OpenLayers Style Text incorrectly aligned and moving on map resize

I have an OpenLayers map which I want to display SVG markers on with some text. I have got it to display the marker and it looks fine but when the map is resized the alignment of the text moves by a ...
2
votes
0answers
63 views

North polar projection OpenLayers + GeoServer

I'm trying to visualize some geometries in OpenLayers using a north polar projection. The data comes from the GeoServer and I have defined my projection in 949918=PROJCS["...
1
vote
0answers
29 views

OpenLayers 3+: Start/end icons

How to create markers/icons at the startpoint and endpoint automatically in OL/JS? I'm doing this right now - I know startpoint and endpoint from PHP analysis: var startpoint = new ol.Feature({ ...
1
vote
1answer
45 views

OpenLayers 4.6.5 GeoJSON WGS84 not mapped with a different projection

I have a map projected on EPSG:3857. I must add ocean areas around the globe. Areas come from different GeoJSON files that are added via a select. Most of geojson files have a projection WGS84 (EPSG:...
2
votes
1answer
71 views

Orthographic projection with OpenLayers

Is it possible to have an orthographic projection with OpenLayers? I didn't find anything specific on the matter. Thanks Mike, the solution is what I needed. Two questions: as I am using OL 4.6.5, I ...
0
votes
0answers
29 views

OpenLayers projection map issue CRS EPSG:32639

I would like to use CRS EPSG:32639 in map. const initMap = (layerTypesList: LayerPackage[], id: number) => { map = new ol.Map({ target: 'map', layers: [...loadLayers(layerTypesList, id)], ...
1
vote
0answers
28 views

OpenLayers 6 add rulers

I'm trying to add vertical and horizontal rulers on top of my map. In OpenLayers 2 I have seen code that had VerticalRuler and HorizontalRuler as attributes but I can't find something similar in ...
0
votes
0answers
27 views

OpenLayers/GeoServer Image mosaic

I would like to understand why I can't change the files of my mosaic directory in GeoServer. When I create my layers, I specify the URL of my directory with GeoTIFF files and shapefiles. If you change ...
1
vote
1answer
42 views

Detecting self-intersecting polygons in OpenLayers [closed]

I am using OpenLayers Version: 6.3.1. I am allowing users to draw a Polygon in my website. I want to validate the polygon by checking for self intersection. Like This: I referred to Detecting polygon ...
1
vote
1answer
30 views

Openlayers 4 WMS layer not showing after authentication

I'm new to OpenLayers and I have a problem I just cannot wrap my head around. I'm trying to show a WMS layer from my GeoServer, but it passes through an authenticator I made with Flask. This ...
1
vote
0answers
14 views

openlayers 6: measure tool dosen't show up drawn shapes

I am working on a laravel project, where I need to insert a map in the interface of my application. I am using openlayers V6.3.1 to create the map with its basic tools. I still have a problem, measure ...
1
vote
1answer
39 views

Adding Street layer to a Satellite map

I am new to openlayers and I am using OpenLayers Version: 6.3.1. I need to display a satellite map. I have used mapbox API to display the satellite map. It doesn't have streets and displays only the ...
0
votes
2answers
41 views

Why ol-layerswitcher latest version can't run in OpenLayers?

I did try load "ol-layerswitcher" in OpenLayers but It didn't work. Furthermore I tried run that through its examples in GitHub but it didn't show anything. Where is my mistake? <!DOCTYPE html> ...
0
votes
0answers
19 views

Snap to shapes Google Maps

I wish to add snap to shape feature of openlayers shown here Snap Interaction to Google Maps drawing Library. Is there a way that this can be achieved. Here is the bare bone code of the Google Maps ...
2
votes
1answer
39 views

Static image layer combined with vector layer in OpenLayers 6

I'm trying to have an image layer combined with a vector layer but when I add projection to View the vectors disappear. Am I doing something wrong? Here is an example of what I'm trying to achieve: ...
0
votes
0answers
25 views

How to check Lon Lat POINT in MultiPolygon in Openlayers?

Currently I'm handling an event when I click on the Layer on Openlayers to get the Lat Lat. I got Lon Lat. But I want to check if Lon Lat is in MultiPolygon . map.on('click', function (evt) { var ...
2
votes
1answer
102 views

Updating PostgreSQL database with PHP language

I want to update the text information contained in my database for a specific layer. This layer is called via a WFS stream. At first I displayed my layer with an Overlay with OpenLayers, and with a ...
0
votes
0answers
44 views

Offine storage titles with Openlayers

I'm developing an app with turn-by-turn navigation and I use OpenLayers consuming a tile server. However, I need to cache all the tiles of the route to be able to navigate offline. Is there a way to ...
0
votes
1answer
72 views

GetLegendGraphic and getLegendUrl function filter by extent

I tried to get a legend image from my GeoServer Instance filtered by extent (render only symbologies that are currently displayed on screen). For this purpose I used the getLegendUrl function from ...
0
votes
1answer
61 views

OpenLayers 6: add padding on fit function

I'm trying to apply the padding on fit function but is seems that there aren't effect. This is my code: var sourceGeoBlog = new ol.source.Vector({ url: '{% url 'api_geopost' %}', format: new ol....
1
vote
0answers
93 views

OpenLayers React export map and vector layers

For my project I am trying to export the map I have created with all it's Vector layers. I can't seem to get the example I found on the site of OpenLayers to work in React. The export doesn't need to ...
0
votes
0answers
20 views

LineString Heatmap with Open Layers 3

I need to make a heatmap with a bunch of linestrings using AngularJS and Open Layers 3. I didn't find any examples, just a question answered here but that don't worked for me. In the question he do a ...
0
votes
0answers
31 views

OpenLayers 6 : Display radius while drawing

I tried to draw a Circle in OpenLayers 6+. It works perfectly but I would like to display the radius line as it was displayed in OpenLayers 3 (see the bellow example): http://tsauerwein.github.io/...
1
vote
1answer
33 views

OpenLayers 6: blur effect with ImageStatic

I'm using a static image on my map in a project with Django. The code is inspired to the official example: var imageSourceExtent = [ 12.1986543459999996, 44.9052984770000023, 12....
1
vote
1answer
54 views

OpenLayers getGetFeatureInfoUrl with dragBox in CQL

I tried to request Geoserver (2.16) WMS with the function getGetFeatureInfoUrl (From openlayers 6+) I tried this by passing the dragBox extent as a CQL filter. dragBox.on("boxend", () => { ...
2
votes
1answer
45 views

OpenLayers displaying Polygon with Icon style

I was working on a React project with an OpenLayers map and I was having problems with showing Polygons on the map. When the map is too zoomed out, the Polygons would be to small to see them. So then ...
0
votes
0answers
31 views

How to set interval option for timeslider with same min and maxdate using Ol-ext:Timeline control?

I am trying to create a timeslider with Ol-extension timeline similiar to https://viglino.github.io/ol-ext/examples/storymap/map.control.timequake.html. All the sample codes have different min and ...
0
votes
0answers
29 views

Uncaught TypeError: ol.control.Timeline is not a constructor

I have been trying to create a timeline in my openlayers map. However it shows that it is not a constructor. How to fix this? this is my code var tline = new ol.control.Timeline({ className: 'ol-...
1
vote
2answers
64 views

Vector layer from MapServer WFS not displaying in OpenLayers 6

I want to display a WFS layer in GeoJSON format on my map via OpenLayers. All my layers in WMS appear, only the one in WFS does not appear. I did create a "WEB" block in the mapfile. And my layers are ...
1
vote
1answer
28 views

OpenLayers: Incorrect rendering of WKT

I'm using the draw function of OpenLayers for draw a polygon. I need the wkt from the drawn geometry because I need to send it to PostGIS. <textarea name="name" rows="20" cols="80" ...
0
votes
0answers
20 views

Reading features from GML OL3

I am trying to read features with ol.format.GML (using OL3). As a result I get feature but not it's geometry. GML file looks like this: var gmlString = '<?xml version="1.0" encoding="utf-8" ?> &...
0
votes
0answers
30 views

OpenLayer Impossible to load GML file with ESPG:3947

I try to load my gml file with this code but it doesn't work. Did I forgot something ? import Map from 'ol/Map' import Layer_Tile from 'ol/layer/Tile' import source_OSM from 'ol/source/OSM' import ...
0
votes
1answer
57 views

Executing task npm run test in Visual Code Studio stopped working

I was working normaly in Visual Code Studio and everything was ok, then stopped uploading my changes from js in localhost server page.With npm start and build:server is running and built. But npm run ...

1
2 3 4 5
57