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

OpenLayers 5 clusters and cql filters [duplicate]

I try to add clusters on my map with a layer controled by a CQL filter. When I put bbox parameter on my link, it says "bbox and cql_filter both specified but are mutually exclusive". But when I drop ...
1
vote
1answer
23 views

Detecting CTRL key in OpenLayers select interaction?

I have an OpenLayers select interaction with an add condition event handler. const addCondition = (event: MapBrowserEvent):boolean => { return true; } In this handler I need to determine if ...
0
votes
0answers
30 views

Performance dropping when I have a large amount of features on my map [closed]

I am working with OpenLayers 6 in Angular. The performance was working well, but when I have a map with around 200 GeometryCollections and 30 Point features the web page becomes almost unresponsive. ...
0
votes
1answer
44 views

Custom bootstrap popover in OpenLayers 5

I try to set different custom for my bootstraps popovers : "popup" and "popup_ancien". I can change CSS of my popovers together, by .popover-content or .popover-title, but how can I have two distinct ...
0
votes
1answer
22 views

GeoServer WMS GetFeatureInfo only returning one Feature?

This is how I get feature info from a group layer when clicking on the map (using WMS GetFeatureInfo): let view = this.map.getView() let viewResolution = view.getResolution(); var source = this....
0
votes
1answer
19 views

Could not locate LayerGroup in catalog GeoServer + OpenLayers?

I have a Layer Group in GeoServer which contains 4 regular layers (layers and group belonging to "TRAC" workspace). I'm trying to do the following on map clicking: featureRequestGS = new WFS()....
0
votes
2answers
17 views

Update WMS layer OpenLayers + Angular?

I have an Angular map app with a WMS layer initialized as following: this.layer = new ImageLayer({ source: new ImageWMS({ url: url, params: {LAYERS: this.getActiveLayers()}, projection: ...
0
votes
1answer
34 views

Filter layers on layer group with OpenLayers and GeoServer?

I have a layer group with multiple layers as following In Angular I created an OpenLayers map adding the group layer like this: this.capaPropia = new ImageLayer({ source: new ImageWMS({ url: ...
0
votes
0answers
19 views

OpenLayers point ID (set, get)? [closed]

function addInteractions() { draw = new ol.interaction.Draw({ source: source, type: typeSelect.value }); /* 포인트에 아이디 부여 START*/ draw.on('drawend', function (evt) { ...
1
vote
1answer
71 views

Show Cypriot names for Cyprus on OpenStreetMap map

How can I show only cypriot names (instead of Turkish) in OpenLayers map for the northern Cyprus side? By default OpenStreetMap shows both Turkish and Cypriot. https://www.openstreetmap.org/#map=13/...
1
vote
1answer
27 views

I don't understand the expected specs for GeoJSON data in OpenLayers whether readFeatures() / readFeature() / readGeometry() are used?

I work on a GIS web app using GeoDjango and I struggle reading and displaying a multipoint geometry on my map. If I serialize my GEOSGeometry object to GeoJSON, I can get the following JSON file : { ...
1
vote
0answers
37 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("...
3
votes
0answers
48 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 ...
2
votes
0answers
26 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
33 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 ...
1
vote
0answers
20 views

OpenLayers 6 TileWMS over server-side proxy script

Let's say I've simple PHP proxy script: $ch = curl_init($_GET['url']); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); ...
1
vote
1answer
34 views

Map Graticule in UTM projections (openlayers)

I'd like to know if there is a way to display the Graticule labels on a different projection like UTM. Visit this link and search for EPSG: "31982" (UTM 22s SIRGAS2000) projection to understand the ...
2
votes
1answer
31 views

OpenLayers declutter styling

declutter does not working as it should be for point geometry, it should avoid overlapping labels and not styling format or geometry. when I set it true for points, points are starting disappear when ...
0
votes
1answer
34 views

Map panning using mouse wheel in OpenLayers 3+ [closed]

How to achieve functionality that user could scroll through map by pressing mouse wheel and dragging map like he can do it by pressing left mouse button?
2
votes
1answer
50 views
+50

Adding border on icons in openlayers

I am trying to add borders to the icons in open layers and I am able to do so but when i try to increase the thickness of the border, the border is not uniform and at one side becomes larger than ...
0
votes
1answer
19 views

How to Update Control When Layers are Changed

I have a control that allows the user to switch between satellite/street tiles. I want the text to update to show the next tile text when appropriate. Currently I am using the Control.render hook but ...
1
vote
2answers
48 views

Openlayers shows and paints polygons in the wrong place on the map

In the following code I call a geoserver service. Initialize map var map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ source: new ol.source....
1
vote
0answers
38 views

Adding border style to country which has geometry type polygon? [closed]

I have a drop down list and when I select a country name and the map goes to this country, I want to add a specific border style to this country (polygon geometry).
1
vote
1answer
60 views

Zoom level issue with openlayers 5 and custom tile generation using gdal2tiles

Now i have changed my code but the output is still not what is expected, because the resolution provided is of 0 - 8 zoom but my minZoom starts from 12 itself, will i get my tiles rendered ?? how ...
1
vote
1answer
23 views

Error: getGeometry is not a function

I have a GeoJSON file, I can select one of its objects and convert it to a feature object, I need to zoom to this polygon on the map so here is my code: part of JSON object that I convert: { "type":...
1
vote
1answer
44 views

How remove geometry vertexes on hover OpenLayers 3+

I am using modify interaction and would like to be able to delete vertexes by either clicking delete + mouse on the vertex or delete + hover vertex. delete + mouse works, delete + hover does not as ...
2
votes
0answers
41 views

Set HTML ID or class for an icon in OpenLayers [closed]

I wanted to know if there is any way to set an HTML ID for an icon in OpenLayers. For example, If I set an icon with HTML ID "icon1", I want to be able to access it using document.getElementById("...
1
vote
1answer
91 views

Smooth line animation on map

I tried to produce a smooth line animation with below code. How can I do this? I used OpenLayers with Angular. It works as a drawing line but I want more smooth movement something like this (http://...
1
vote
0answers
30 views

Predict the movement of an object on the map considering geodetic calculations in OpenLayers 3?

I need to represent the movement of an object (which has its own speed) but considering the geodedic calculations. I'm working with EPSG:3857 projection. How can I do this?
1
vote
0answers
48 views

Drawing circle of specified radius in meters using OpenLayers 3

I need to present a mask where the user put the radius (in meters) to draw a circle. How can I do this? Do I have to do geodesic calculations to get a circle that follows the projection of the map (...
0
votes
0answers
39 views

Dwithin not working on EPSG:4326

I have a layer in GeoServer called "pois". The layer is in EPSG:4326. Also, I have another layer but it is in: EPSG:31256 The problem that I'm having is that I'm trying to reach an all points around ...
3
votes
0answers
39 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-...
1
vote
1answer
22 views

How to build XYZ layer source for custom scales?

I have tile images in scales: 4, 6, 8, 12, 14 (in subdirectories). In smaller scale tiles are in higher zoom (in 14 scale zoom is minimal, in 4 scale zoom is maximal). I have prameters as below for ...
2
votes
0answers
34 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 ...
0
votes
0answers
19 views

WMTS service is returning incomplete results

Observation: In GWC Demos page reached through the GeoServer admin UI, I am attempting to view a layer group. Some requests are working: https://serverUrl:8443/geoserver/gwc/service/wmts?layer=...
2
votes
0answers
58 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....
1
vote
0answers
40 views

Show overlay on top when zoom out in OpenLayers 4.6.5?

I have a tile layer, three vector layers. The tile layer has lots of overlays in it. I want to put vector layers on top when zooming out the map using OpenLayers 4.6.5. I tried to apply setLayerIndex ...
3
votes
1answer
40 views

OpenLayers Circle Style Update During zoom

I am using a stylefunction to dynamically draw an 'image' based on the feature geometry. The style function is dependent on the resolution (zoom level) so that the drawn items are a certain consistent ...
2
votes
0answers
42 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/...
1
vote
1answer
47 views

OpenLayers tiles size vs screen size

I'm using OpenLayers v6.1.1 and I would like to ask you to confirm that my understanding is correct. Take a look at below image: Am I right that there might be a situation that if I would take all ...
1
vote
1answer
23 views

How to dynamically rotate image in custom style in OpenLayers

I'm trying to make a custom Style in OpenLayers that replaces a path (Coordinate list) with an image at the end of the path pointing in the direction for the path (like the head of a snake). I am ...
0
votes
2answers
30 views

OpenLayers data format [closed]

I am just running an application using OpenLayers. All data is transfered from my database in GEOJSON format. My current task is to review the implementation of the data format. Important ...
2
votes
1answer
33 views

Getting tile URL in OpenLayers

I'm using Openlayers v6.1.1 and I'm trying to get URLs of all tiles in the current map extent. I was trying to do it in the following way: var tileUrlFunction = tileSource.getTileUrlFunction(), ...
2
votes
1answer
27 views

OpenLayers: Overlay doesn't work

I'm following an OpenLayers tutorial and in my current lesson we wanted to add an overlay to the webmap and when I click on the map it gives me the coordinates of that map. However, for me it doesn't ...
0
votes
0answers
45 views

Get projection or calculate latitude and longitude from a central point [duplicate]

I have a central point (with longitude) and I measure a radius (30º) degrees, I have a distance of 200 KM. Problem: know with precision what is the latitude and longitude of the point that is 200 km ...
1
vote
0answers
22 views

OpenLayers.Format.WMTSCapabilities vs ol.source.WMTS

Struggling with getting a WMTS layer working using OL2. I have it working with OL3 but unfortunately I'm working with legacy code and it needs to work on OL2. Using OL3 (working) var xml = '...'; //...
2
votes
1answer
14 views

Can't get the coordinates from OpenLayers polygon drawing

I'm building an app using Ionic 4 included OpenLayers. After drawing the polygon, I can see the coordinates on the console.log but I don't have a solution to get these coordinates. Here is what I ...
1
vote
0answers
29 views

Use a WFS-T layer in d3.js without adding a background map?

I am currently working on a d3.js project and would like to include a WFS-T layer to my SVG map to display and update location data stored in a PostGIS database. I know that I need to transform my ...
1
vote
0answers
81 views

WMS layer is displayed with ruined geometry in OpenLayers [duplicate]

I want to display a shapefile in OpenLayers using MapServer 7.6. It is shown properly in the browser using the mapfile's link. But when I try to display it in OpenLayers, the geometry is completely ...
1
vote
1answer
61 views

Draw a line of desired length and bearing in OpenLayers? [duplicate]

How can I create a straight line when I know the coordinates of the first point, and I know the distance and angle to the end point but I don't know the coordinates of the end point? Example: ...

1 2 3 4 5 55