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
41 views

OpenLayers 5: remove map animation

Using Putting content of popup into modal using OpenLayers? I am now able to put the content of a popup into a modal of Bootstrap 4. <div id="map" class="map"></div> <div class="modal ...
0
votes
1answer
31 views

Get Attributes from Multiple overlapping WMS layers

I am working with Openlayers to consume WMS from GeoServer. I have loaded multiple layers and get attributes for one layer using getGetFeatureInfoUrl. But this approach gets attributes for the ...
0
votes
1answer
18 views

Labeling a GeoJSON with OpenLayers 5

I'm trying to put a label over a polygons. My polygons cames from a GeoJSON serialized by GeoDjango. I'm be able to categorize this polygons using the attribute "type" but I wanto to see the height as ...
0
votes
1answer
129 views

GeoServer & GeoWebCache - Issues with tile origins when setting alignTopLeft=true for a gridSet

I'm finding an unexpected behavior when setting alignTopLeft=true at geowebcache.xml for a gridSet. When I am navigating on the map within the same cache level everything works fine (even zooming in/...
0
votes
0answers
22 views

Map render complete event is not triggered - Openlayers 5

I have written a function in Map render complete event to hide the progress icon if all map tiles are rendered. But the map render complete event is not fired after I added a empty vector layer on map....
0
votes
0answers
39 views

Implementing “conformal mapping” in OpenLayers?

I want to preserve shape of objects, so how do I implement "conformal mapping" in openlayers 4.6.5? My current objects: I have several geoJSON objects (WGS84) around the globe in long/lat with a ...
2
votes
1answer
111 views

Getting different resolution between horizontal/vertical directions, from lon/lat to openlayers map?

I draw several points of Lon/Lat(EPSG:4326) on the OpenStreetMap v 4.6.5 (EPSG:3857). It seems like the distance between the points are closer in the Latitudinal direction then in the Longitudinal ...
0
votes
1answer
236 views

OpenLayers Interaction - events are returning wrong features

Trying to extract the drawn features on openlayers. I have written the below code and it is working fine when we draw polygon on four objects. But, when we try to draw polygon on three objects it is ...
0
votes
0answers
21 views

Suitable syntax of OpenLayers code for asp.net MVC?

I think all the examples are suitable for using in nodejs (npm). For example, although I attached openlayers.css and .js file to the asp.net MVC project, I can't use ol keyword or mouseposition method....
1
vote
0answers
19 views

WMS line layer is not visible in Openlayers

I have few shape files (Polygon/Lines/Points) imported into Postgres. I have published the Layers in Geoserver. The Polygon layer is displayed properly in Openlayers However when I consume Line Layer ...
2
votes
2answers
155 views

Generate WFS-T insert and delete requests using wfs-t openlayers3

I am trying to insert feature like point, line, etc on "india_ds" wfs layer map using wfs-t but not able to make successful POST request using openlayers3. I have post my script and error. I have ...
1
vote
1answer
1k views

Recommended starting point for an OpenLayers v5 (node.js and npm) project

I have a large monolithic OL4 js/php system that I have hacked together in the last year, that has lots of raster and vector functionality driven by json parameter files. I want to refactor/rewrite ...
1
vote
0answers
25 views

Why TreeView Kendo is not executed properly?

I made a tree view kendo to enable the user to turn off or turn on the two layers "osmlayer" and "bing_road". but the treeview is just shown and does not work. first of all chrome debugger showed that ...
0
votes
0answers
46 views

Requested JSON parse failed while getGetFeatureInfoUrl

I am trying to get the feature attributes from WMS service published in GeoServer and showing the attributes as a popup in the .NET application. When I make an Ajax call it gives "requested JSON ...
3
votes
0answers
38 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 ...
0
votes
1answer
34 views

Why is getGetFeatureInfoUrl failing?

Running getGetFeatureInfoUrl() against a TileWms source returns: Either no layer was queryable, or no layers were specified using QUERY_LAYERS My URL is https://geoserver.xxx.com/geoserver/yyy/wms?...
0
votes
1answer
21 views

Using Mapbox vector tiles from Geoserver in OpenLayers?

Currently this error code is the only result: mvt.e31bb0bc.js:116 Uncaught AssertionError code: 43 message: "Assertion failed. See https://openlayers.org/en/v5.3.3/doc/errors/#43 for details." name: ...
0
votes
2answers
2k views

openlayers 4: force refresh tiles in ol.source.VectorTile on interval

I'm using openlayers 4, and have a ol.source.VectorTile which uses MVT tiles. I want to refresh the tiles every 5 seconds without refreshing the browser. I've used source.changed(), source.refresh(), ...
2
votes
1answer
19 views

Appending linear ring to multipolygons in OpenLayers

I am trying to append linear ring to multipolygon. When I try to do same for polygon it works. case 'Polygon': linearRing=new ol.geom.LinearRing(...); select.getFeatures().getArray()[0].getGeometry(...
1
vote
2answers
54 views

Coordinates of image corners for ImageExtent in Openlayers 5?

It is possible to get the coordinates of the four corners of the image, given the center of the image coordinate? or the bottom left and upper right corners? Currently, I am center the map in the lat/...
4
votes
1answer
153 views

Styling rendered mbtiles in offline web-map service

I am building a digital cartography tool that needs to run completely offline. As a basis, I downloaded a .mbtiles-file corresponding to the area I want to survey and I am running the excellent ...
0
votes
1answer
652 views

Using OpenLayers for projection of static image on worldmap?

Using the latest OpenLayers, I'm trying to overlay a simple static image over the regular OSM streetmap. Although there are examples how to overlay an simple static image which is in the same ...
3
votes
4answers
5k views

Drawing box arround text in OpenLayers 3?

I need text labels with surrounding a box and a specific fill color. Actually I have the following function which only shows the text but I don't know how to draw a box around the text. Text length is ...
3
votes
1answer
71 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 ...
0
votes
1answer
33 views

How to change tileSize in XYZ from default([256,256]) to something else for openlayers?

I am trying to change the tile size and I have not been able. Below is the code. var projection = get('EPSG:4326'); local_url = 'assets/tile/{z}/{x}/{y}.png'; map = new Map({ target: 'map', ...
0
votes
1answer
176 views

Openlayers 3 polygon-feature “collision”?

I am currently building a webapp using openlayers 3. I build in "GPS-tracking" as a features and I got some questions with that. So, is it possible to run a function if a GPS-Position as a point-...
1
vote
0answers
16 views

Setting FontFamily in OpenLayers Text Label

Changing the font-Family of a style objects' text label does not have an impact - it always looks the same, no matter what font-family I set. Do I have to provide the respective fonts to openlayers ...
2
votes
0answers
30 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 ...
1
vote
1answer
38 views

Getting non overlapping bbox in OpenLayers?

I have tree bbox as follow: bbox 1, bbox 2, and bbox 3. Now I want to get Final bbox from bbox 1 in OpenLayers 5. How?
1
vote
0answers
28 views

How to display my XYZ Tiles at a certain extent

I am using OpenLayers to create a map. I am providing my own source using XYZ. I want to be able to display my tiles at a certain extent and not go out of this extent. How can i do this ? proj4.defs('...
1
vote
1answer
24 views

WMTS from GeoServer to OpenLayers is Unknown TILEMATRIX X

I tryed use default WMTS layer with GeoServer source. Code looks like that: var projection = ol.proj.get('EPSG:3857'); var projectionExtent = projection.getExtent(); var size = ol....
3
votes
2answers
12k views

Writing style function in OpenLayers?

I am attempting to write a style function within an OpenLayers 3 application that will change the fill color of a circle based on an attribute from a GeoJSON piece of data. I have looked over stack ...
0
votes
1answer
240 views

Reading geojson properties in openlayers 4?

My code is very simple. This is my vector-source and this is how I render my geojson : var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), url: 'some_geojson_is_here' }); ...
0
votes
0answers
26 views

OpenLayers 5: requesting WMS layer without CRS like in OpenLayers 2

Back in the day of OpenLayers 2 displaying a WMS layer involved something like: var map = new OpenLayers.Map( 'map', {maxExtent: new OpenLayers.Bounds( -20037500.000000,-13347182....
0
votes
1answer
217 views

Openlayers error: Uncaught TypeError: t.getLayerStatesArray is not a function

I am getting the following error in the yellow background below. Can anyone explain why i get this? I am not using any bundler i include the ol.js javascript file in the footer Group.js:209 ...
0
votes
1answer
106 views

Clicking polygon in OpenLayers map and zooming , centering polygon in map?

I click on the map on a polygon and I'd like to zoom the map and center it around the polygon. We have done so until now: map.on ('click', function (e) {      console.log (s);     // coordinate = ...
1
vote
0answers
58 views

Get Modified Feature from Modify Interaction

THIS QUESTION IS STILL OPEN AND OF INTEREST Openlayers: 4.6.5 I have a Modify Interaction and two active Select Interactions. The Modify Interaction is instantiated like this: var interaction = ...
1
vote
1answer
176 views

GeoServer GeoWebCache caching wrong resolution tiles from USGS WMS

I have a simple OpenLayers 3 map with a topo layer that is cascaded from a USGS WMS through my GeoServer / GeoWebCache system. The tile zoom level resolution is correct when the GeoWebCache is turned ...
0
votes
0answers
30 views

Multiple OL views for single OL Map instance

I need to show multiple views of the same OpenLayer Map instance. Each view would have a different extent, but display the same layers visible on the Map instance. Is that possible? It's important to ...
0
votes
2answers
104 views

OpenLayers SRS in request

I have a layer in GeoServer and its projection is EPSG:27700. When I query the layer in my app I get and error. Explanation: The GeoServer preview displays it correctly. So I copy the JavaScript ...
3
votes
1answer
47 views

Using a projection other than Mercator with proj4js 2.5 and OpenLayers 5.3

I am following the OpenLayers FAQ regarding the use of coordinate systems that do not rely on the infamous Mercator projection. I thus produced a very small HTML with a simple example that could be ...
0
votes
0answers
27 views

WMS GetFeatureInfo JSON error

I'm trying to get informations from geoserver with AjaX jQuery of my spatial data at the clicked point using WMS GetFeatureInfo. But I have this ERROR : http://localhost:8082/geoserver/schemas/...
1
vote
1answer
265 views

Order of coordinates for extent property in layer Tile?

I was just going through the documentation for OpenLayers 3.11 and came across Tile(). Now it accepts a lot of properties: opacity, preload , map, etc.), but the one I am interested in is extent. ...
0
votes
1answer
154 views

OL3 gwc background layer does not align to gridset, works in OL2

I'm using GeoServer 2.10.1 and its built-in GeoWebCache and am trying to use a cached background layer in a custom gridset with a local epsg to work in a simple Ol3 app: proj4.defs("EPSG:3010","+proj=...
0
votes
1answer
2k views

Openlayers 4 and View Extent

I have been working on openlayers 4 and specifically my question is regarding limiting the extent the user sees, let's say 2 km by 2km is the viewing area, this configuration was done using the ol....
1
vote
0answers
45 views

Extracting bounding box from the polygon geometry in OpenLayers

Suppose I have a geometry like below: POLYGON((8744004.877693035 1958621.044138512,8744013.76051175 1958620.4469742286,8744019.582863515 1958613.8781671105,8744018.98569923 1958611.3402189056,8744015....
0
votes
1answer
375 views

Openlayers get boundingbox around circle in cluster layer

I have a cluster layer which contains circles. Each circle contains some number of features. I need to get the smallest bounding box for a circle when it's clicked. If I could get the center and ...
0
votes
2answers
2k views

OpenLayers ECQL BBOX and INTERSECTS: Can I set SRS name?

I am using GeoServer and am trying to understand one problem: Using this statement returns successfully the polygon intersecting with my BBOX. The layer is EPSG:2193 http://myserver/fwsys/wms?service=...
0
votes
0answers
29 views

Tiled WMS server producing no data on Openlayers map?

I've been investigating setting up a server with OpenLayers which will display tiled data from a datacube-ows wms server. At the moment I have an index.html file which initializes the server and a wms....
0
votes
0answers
34 views

Error when adding single image layer from WMS server

No one question from stackExchange with similliar title works for me. Cause I face another situation. I added WMS layer, and chrome's debuger throws this Group.js?d2e6:207 Uncaught TypeError: layer....