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
0answers
11 views

Apply a dynamic style to a raster(GeoServer, OpenLayers)

I want to apply a dynamic style to a raster using either GeoServer or OpenLayers. I have found similar examples at OpenLayers plugins but these examples work on RGB images instead of the real values ...
0
votes
0answers
16 views

How to use ol-geocoder for custom input box? [closed]

I'm creating an application where I have a form for user registration, I want to use ol-geocoder for user to type their address and then get the lat,lon from that. I checked their github repo, I can ...
1
vote
1answer
13 views

Problems with features on ImageStatic source

I am trying to draw a grid on top of an ImageStatic source in OpenLayers but I am getting extra grid squares on the right side of my image. Why do rows 2 & 3 have 5 columns instead of 4? https://...
0
votes
0answers
24 views

Get Layer using GeoServer and OpenLayers [duplicate]

I try to access a layer from GeoServer and display on openlayers by the example here: https://openlayers.org/en/v3.20.1/examples/getfeatureinfo-tile.html Here is the code I'm trying to access: <!...
0
votes
0answers
18 views

Click fetures in OpenLayers get more information (OpenLayers3 and GeoServer)

I try to bring the information related to a certain polygon that I previously displayed with GeoServer on an OpenLayers3 when I click on that polygon on the map it should show the information and zoom ...
1
vote
0answers
32 views

Where I should add cql_filter param in WMTS layers by OpenLayers v6?

I am going to use cql_filter in wmts layers,this is my code, I read OpenLayers v6 Document , but I couldn't find params, I googled but I could'nt find any soltion, about cql_filter in WMTS Layers, If ...
0
votes
0answers
32 views

Openlayers use geometry to zoom to extent

I retrieve the geometry of an object from the database. Having that, how can i zoom to the center of a line string using fit in openlayers? Is there a database solution? e.g. convert that using a ...
0
votes
0answers
20 views

Drawing polygon from xy coordinates using OpenLayers.Control.drawFeature [closed]

How can I draw a polygon from given xy coordinates using OpenLayers.Control.drawFeature?
1
vote
1answer
21 views

OpenLayers pass character parameters problem

I want send character parameter ('GREEN') to GeoServer as following: var untiled = new ol.layer.Image({ source: new ol.source.ImageWMS({ ratio: 1, url: 'http://localhost:8080/geoserver/...
0
votes
1answer
27 views

OpenLayers 6 layer source parameter refresh problem

I'm trying to refresh a source with some parameter. There is a text input control on the html page, I look forward to updating the map based on user input after clicking the button, but it doesn't ...
0
votes
0answers
18 views

Open Layers get WMS Layer attributes without single click event

I am using javascript open layers v6.4.3 to load data from postgreSQL database. Here is my code to create feature layer and the click event to get identify feature: roads3Layer = new ol.layer.Tile({ ...
0
votes
1answer
38 views

Change Layer in OpenLayers, GeoServer

Wish I could change the layers according to a certain selection criterion. For this I made a select that acts an onchange event that normally should change what is seen on the map .... But ...
0
votes
0answers
27 views

Shortest road route calculation on OpenLayers GeoDjango

I have created a web based GIS application using Django, Mapnik, Mapproxy, OpenLayers 6. Now I need to develop a shortest path(road distance) between two points selected by the user. What is the best ...
2
votes
2answers
81 views

Tools for drawing weather-rose-overlays on maps/locations [closed]

I need to create a map with points-of-interest. My initial idea is to "build" wind-roses using KML file and Openlayers: https://openlayers.org/en/latest/examples/kml.html. This seem a bit ...
0
votes
0answers
21 views

can't save a polygon with grid1.store.proxy.protocol.commit

I create a polygon but I can't save.. I use a button to draw the polygon text: "Draw", handler: function() { var p1 = new OpenLayers.Geometry.Point(-4.5, 32); var p2 = new ...
1
vote
1answer
29 views

How to pass the Basic Auth while calling GETMAP request on GeoServer using OpenLayers

How can I pass the GeoServer credentials while adding an layer using WMS. When I am doing GETMAP request I am getting the error in Chrome [Deprecation] Subresource requests whose URLs contain ...
0
votes
0answers
19 views

Trying to extend ol.Tile in OpenLayers 6

I am upgrading my app from OpenLayers 4.6.4 to 6.4.3 and I can't access ol.Tile anymore. My code is as follows which works in 4.6.4 (using ol-debug.js). What would I do to achieve the same access to ...
1
vote
1answer
51 views

Fix/Repair invalid Geometry

I'm loading a shapefile in an app through a frontend with OpenLayers and trying to save the geometry to an Oracle Database with Hibernate Spatial. The shapefiles that have valid geometry (validated ...
2
votes
1answer
25 views

Drawing LineString to right (horizontal) direction only

We use Vue.js 2 and OpenLayers 4.6.5. The picture looks as folowing: The user draws the first line, for example, from the bottom upward and makes a click to finish the first line. Then he draws next ...
1
vote
0answers
26 views

How to fix text position when horizontal line is on the left side?

We use Vue.js with OpenLayers 4.6.5. The issue looks like the following: How does it work? The user draws the first line, for example, from the bottom upward and makes a click to finish the first ...
1
vote
0answers
27 views

OpenLayers transform

My script: <script src="https://unpkg.com/openlayers@4.4.2"></script> <script> var ETRS89Extent = [5.93, 34.76, 18.99, 47.1]; proj4.defs('EPSG:6706', '+...
0
votes
1answer
57 views

Error when I try insert a simple point into a geoserver point layer with wfs-t

I try insert a simple point into a geoserver point layer the commands are: var config = { headers: { 'Content-Type': 'text/xml', 'type': 'POST', 'dataType': 'xml', '...
0
votes
2answers
43 views

How to refresh vector tile layer after setting declutter in OpenLayers 6?

I am using OpenLayers version 6. I want to change the declutter of a vector tile layer by using vecTileLayer.set('decluter',false). After changing declutter of layer with the set method of ...
-1
votes
0answers
15 views

Make items in cluster clickable

I have some clustered POIs similar to the earthquake cluster demo (only difference is styling, and that my clusters are set up on click, not on mouse over - i.e. removed the first condition on line ...
1
vote
0answers
27 views

Fixing OpenLayers Popup position in RTL pages

I'm using OpenLayers V6 popup but It has wired behavior in Right-To-Left page, When I click on my feature my popup shift map to let and it will be appear in right page! But in LTR page It work fine ...
2
votes
1answer
33 views

Drag and drop interaction error handling in OpenLayers

I'm trying to handle errors when doing drag and drop interaction for GPX files in OpenLayers 6.4.3, like for example when file being dropped has wrong format. I found out that in the case of parse ...
0
votes
1answer
33 views

How I can fix TileOutOfRange“ locator=”TILECOLUMN in GeoServer 2.17.2 WMTS in openlayers v6?

I am going to use GeoServer WMTS in openlayers and then I found an example in Openlayers website, It seems everything is correct but I get this error: <ExceptionReport xmlns="http://www....
0
votes
1answer
31 views

Open Layers 3 Click in a layer

I'm trying to work with lots of layers and each one of them need a different click action but, with all my layers this code is starting to get confuse and messed up. I found out that in Open Layers 2 ...
1
vote
1answer
23 views

How I can update getfeautreinfourl query based on checked layers on ol-layerswitcher(ol-ext)?

I'm using ol-layerswitcher from ol-ext, But I don't know why I can get information from unchecked or removed layers from layer switcher , I am going to popup information that will be able for only ...
2
votes
1answer
35 views

Union MVT features based on attribute / id in OpenLayers render

Following Paul Ramsey's article about ST_Subdivide I was able to split the Natural Earth boundaries dataset. Generating tiles which intersect the boundaries of Canada and Russia on the fly is now ...
1
vote
0answers
40 views

Changing the color of every entity of GeoJSON layer in OpenLayers 6.4.3

I would like to change the color of every entity of my GeoJSON, like in the picture. For now I can just change all the features with the same color. Here is my code: const provinceGeoJSON = new ol....
1
vote
1answer
48 views

Error in proj4js-Projection while upgrading from OpenLayers 5 to OpenLayers 6 (ETRS:25832 projection)?

I have a map with some layers in Projection EPSG:25832. This works well with OpenLayers 5.3.3. But when I change to OpenLayers 6.4.3 (or all others down to 6.0.1) then there is an error in the ...
1
vote
1answer
36 views

Export map in OpenLayers with toJPEG

Recently, we set up a web app with OpenLayers that allows exporting a map as a jpeg image. The map contains XYZ, WMS and/or WFS layers. We used the toJpeg function of the html-to-image library, as it ...
0
votes
1answer
27 views

Export a map and a legend as a PNG with OpenLayers 6

I would like to export a map with a legend in the same PNG using OpenLayers 6. I searched in the OpenLayers documentation but I got just how to export a map (without a legend). How can I do this?
0
votes
0answers
35 views

Grouping several types of shapefiles into one layer being able to turn on/off [duplicate]

I am wondering if QGIS (or qgis2web) can realize this: I have various shapefiles (label as points and lines) and I want to categorize them into one single layer which can be turned on and off. (It ...
0
votes
1answer
36 views

Export map with legend using OpenLayers 6 [closed]

I would like to export a map with a legend in the same PDF using OpenLayers 6. I searched in the OpenLayers documentation but got a map without a legend. How can I do this?
2
votes
0answers
31 views

How to correctly set the zIndex of features within an OpenLayers vector layer? [closed]

I initially add a vector layer from a GeoJSON file and label each feature: var layer1 = new ol.layer.Vector({ source: new ol.source.Vector({ url: './json_3573/country_names.geojson', ...
1
vote
0answers
56 views

How to make labels be center justified in an OpenLayers Web Map? [closed]

I am trying to set the justification for some labels to be centered on the point. I am using Qgis2web to create a web map. Below is the relevant output code: var size = 0; var placement = '...
0
votes
0answers
22 views

How to add a raster layer in openlayer 6 and its wmts in Mapproxy

I want to add a raster layer to my map. I added a TMS layer map using ol6, now I want to add a raster layer to it. How could I implement it. My TMS layer is generated using Mapproxy & mapnik. My ...
0
votes
0answers
35 views

Is it possible to draw a .pbf from an ArcGIS Feature Server

I'm unable to draw an ArcGIS FeatureServer .pbf result in OpenLayers 6.4.3. The request completes successfully but nothing appears. The layer in question is the NFIS Fire Perimeter Layer. https://...
-1
votes
1answer
34 views

Handle large point layer on client side using Leaflet/OpenLayers [closed]

I'm planning to write an web app which will display large amount of point features (approx. 120 000 features, 50mb after data cleanup). Each point will consist of only two values - coordinates and ...
3
votes
2answers
92 views

How to add source in GeoJSON layer using OpenLayers

I am trying to add GeoJSON layer using OpenLayers which is in the PostgreSQL db. When I am running query as select ST_AsGeoJson(ST_Transform(geom,900913)) as farmcode from farmdatadd where areatbl = ...
1
vote
1answer
43 views

Why OpenLayers v6 can not show layers when they secured by GeoServer 2.17.2 GeoFence extension?

I have two workspaces in GeoServer and two different users in GeoServer. For each user I created a rule in GeoServer by GeoFence Extension, each user must be see and access to only own layers are ...
0
votes
1answer
30 views

Using .pbf Vector Tiles generated with t-rex with OpenLayers errors with “Uncaught Error: Unimplemented type: 7”

I generated .pbf vector tiles with t-rex's generate command. I then uploaded them to a directory served with the Apache HTTP server. Trying to use the tiles with OpenLayers (6.4.3) resulted in no ...
0
votes
1answer
57 views

In OpenLayers 6, remove or rub drawing features like any photo editing application

I am working on application where user can do drawing and change color, stroke, fill and perform undo, redo. One feature is user should have option to rub/remove features like Photoshop or paint. ...
0
votes
1answer
32 views

OpenLayers clear path on marker movement

I'm using OpenLayers 6. I would like to produce behaviour like on Google Maps: When the marker has passed the point, all previous points should be hidden and the only route that is left to pass should ...
0
votes
1answer
36 views

Speeding up GeoServer response - splitting the main PostgreSQL table into multiple sub tables instead of using views would help?

I am sorry if the title might sound silly, but I will try to explain the problem and why that title seemed the right to me. I have an OpenLayers application which display different WMS Image Layers ...
1
vote
1answer
42 views

GeoServer WFS getFeature POST responds exceptionCode=“NoApplicableCode”, Error occurred getting features [closed]

I am trying to make a getFeature POST request to a WFS published with GeoServer with OpenLayers like so: getWFSFeatureFromCoord(map: Map, coord: Coordinate): void { const baseUrl = environment....
0
votes
1answer
93 views

Exporting label rendering options based on zoom level correctly in QGIS

I am making a webmap using QGIS3. However, I set the text-label to be invisible from a certain zoom-level onward, and visible from another zoom-level. It displays correctly locally in QGIS edit screen ...
1
vote
0answers
28 views

How to add image in OSM with the authorisation key using OpenLayers

I am trying to get a layer from the WMS request but the problem is the URL expects the authorization header. I have tried implementing that I am getting the error. Failed to execute 'createObjectURL' ...

1
2 3 4 5
59