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
1
vote
0answers
12 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
30 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
26 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
31 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
14 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: ...
2
votes
1answer
18 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
51 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/...
1
vote
0answers
15 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
29 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
0answers
27 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
37 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
1answer
23 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....
0
votes
0answers
25 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
0answers
27 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
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/...
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 ...
1
vote
0answers
44 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
0answers
28 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....
1
vote
0answers
23 views

Add parsed GeoJSON points to OpenLayers and make them Clickable

I have points layer, displayed in OpenLayers map. I want to make them clickable, so when I click on every point I get the property I want (ex: coordinates). I'm newbie in OpenLayers and don't know ...
1
vote
0answers
46 views

Limit custom tiles to certain extent in OpenLayers

I want to fit my custom tiles at a certain region. For example let's say i have custom tiles for a certain country (example: USA) and I am using OSM or anything at all. How do i make sure that my ...
1
vote
1answer
54 views

Qgis2web WMS popup on everywhere click on map [closed]

i have generate a web map by using qgis2web plugin. The map contain 2 wms layers from my geoserver and one OSM basemap. the popup working nicely when click on the feature. but there is empty popup ...
2
votes
1answer
25 views

Clear Vector source without recursively calling the sources loader method

OpenLayers v4.6.5: var source = new ol.source.Vector({ format: new ol.format.GeoJSON(), loader: function() { return $.ajax({ url: ...
1
vote
1answer
27 views

Extract the coordinates from a GeoJSON file that displays point on my Map in OpenLayers 4

Well I have this GeoJSON file : {"type": "FeatureCollection", "features": [{"id": "1", "type": "Feature", "geometry":{"type":"Point","coordinates":[-5.8039556,35.7903036]},"properties": {"gid":"1","...
0
votes
0answers
24 views

Automatically reloading layer when source is changed [duplicate]

I have a ol.layer.Vector that regularily changes its source. How do I perform a reload of the source everytime I change it?
1
vote
1answer
28 views

OpenLayers 5: To display the label for a point

In my project there are two GeoJSON point layer, both has the same attribute 'name'. I would like to use this attribute for labeling all points. I've found this similar question but it is for ...
0
votes
0answers
61 views

OpenLayers coordinate system

I am using a Tile Layer for my map and XYZ for the source of this tile layer in OpenLayers. I am providing PNG files as Z/X/Y. I want to replicate the real world coordinates on my map. The files that ...
0
votes
0answers
9 views

Showing image when clicking on Point in OpenLayers Map? [duplicate]

I have this map: I want to show an image when I click on a point. Every point has its own picture. I am new to OpenLayers. How can i do that after getting the data in GeoJSON?
1
vote
1answer
30 views

Reproject GeoJSON with OpenLayers 5

I'm using GeoDjango to render many points on a map based on OpenLayers 5. My points have EPSG 4326 and the map has EPSG 3857, I need to reproject the points. On the OpenLayers API I've founded two ...
1
vote
1answer
34 views

OpenLayers vector layer from GeoServer does not appear completely

I have successfully loaded the vector layer but the webpage only shows parts of it, some are not displayed. Any idea what might be the cause? var jsonSource_testLayer_1 = new ol.source.Vector({ ...
0
votes
0answers
38 views

Issues printing OSM basemap using MapFishPrint 3

I'm trying to get the GeoExt MapFishPrintProvider function mentioned in this other post to work. However, the debug tools are writing this message to the console: "Couldn't find a suitable ...
2
votes
0answers
33 views

Reloading of failed tiles in OpenLayers [duplicate]

In OpenLayers 5, if loading of some tiles has failed (because of temporary network issue, for example), those tile are never attempted to load again. Is it possible to force OL to retry loading of ...
0
votes
1answer
47 views

How to set resolution according to a given scale in OpenLayers [duplicate]

This is a followup to this question. What I know is: given the papersize, I can calculate how many pixels for a given DPI fill a millimeter (dpi * 1/25.4) =pixelpermilimeter the number of pixels ...
0
votes
1answer
34 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
39 views

Uncaught ReferenceError: MapWidget is not defined

I'm trying to create a form usefull to add only one single point on a map, I'm doing this for the first time. I use GeoDjango from Django 2.2 and OpenLayers 5. I've created a simple model with only ...
0
votes
1answer
50 views

Converting from Washington State Plane Coordinates to Web Mercator? [closed]

I received coordinate data in Washington State Plane: EPSG:14602. I need to convert this to EPSG: 3857, aka Web Mercator. I'm using Javascript. Here's what I've tried so far: Using OpenLayers: ol....
0
votes
1answer
33 views

IOExceptionERROR: parse error - invalid geometry Hint: “POLYGON ((” <— parse error at position 12 within geometry

My page did WFS reqest well, but not display bjects, cause result of request wa : java.lang.RuntimeException: java.io.IOException java.io.IOExceptionERROR: parse error - invalid geometry Hint: "...
1
vote
1answer
55 views

Putting content of popup into modal using OpenLayers?

I'm trying to put the content of a OpenLayers 5 popup into a Boostrap's modal but I cannot make it. Here the code with popup; it work fine: . . . <div id="popup" class="ol-popup"> <a ...
0
votes
1answer
31 views

OpenLayers 5: this.source.loadFeatures is not a function with Cluster

I'm trying to change the example of the Clustered Feature using my points from geojson layer but there is something wrong. var random_points = new ol.layer.Vector({ title: 'Random Points', source:...
1
vote
1answer
30 views

OpenLayers 5: change the color of the highlighted feature

I've made a little script to highlight a feature on hover the mouse My inspiration comes from here. Now I would like to change the color of the highlighted feature. I can do this using style function ...
4
votes
2answers
57 views

Change Opacity of Style

Is there any convenient way to change the opacity of a ol.style.Fill or ol.style.Stroke Object? As far as I understand it, there are 2 ways to define a color with an opacity. fill.color = [255,0,0,...
0
votes
1answer
47 views

Using meters to buffer with JSTS?

I'm trying to create a buffer using OpenLayers with JSTS library. However, even after transforming geometry from EPSG:4326 to EPSG:3857, the buffer method doesn't create distance in meters as ...
2
votes
1answer
77 views

Show points (layer) from PostgreSQL database on OpenLayers map

I have this code, I want to load a collection of points stored in a table in PostgreSQL database, I retreive the GeoJSON format succesfully, but the points never show up on the map! The three files ...
0
votes
0answers
26 views

Visualize polygon as point OpenLayers

I am using OpenLayers 5 for visualizing some polygons I get from a GeoJSON file. I would like to style them with markers at the center of each, but no idea how to start. Styling them as polygons is ok....
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 = ...
0
votes
1answer
32 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
0answers
24 views

Couldn't load plugin 'openlayers_plugin' due to missing 'QtWebKitWidgets'

I am using Qgis 3.8 and I am trying to use the plugin OpenLayers. However, when I try to install the plugin I receive the following error: Couldn't load plugin 'openlayers_plugin' due to an error ...
1
vote
1answer
43 views

OpenLayers generating clientside PDFs

I am currently working on a solution to generate clientside PDFs from OpenLayers content. The experience is okay so far, but I am having a bit of a hassle. The abstract is as follows: Calculating ...
1
vote
0answers
32 views

OpenLayers getText() from style function

I have a feature with a label set via feature.style.text. In my unit tests, I need to grab the value of the label. Normally I would use getStyle().getText().getText(). However, in the example below ...
2
votes
0answers
32 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:...