Questions tagged [openlayers]

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

742 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
98 views

Using OpenLayers with alternative map source to integrate Google Street View?

I am researching any possibilities of Using an alternative map source other than Google that I can integrate Google Street View. Due to the drastic rate changes for Google Maps API I would like to ...
2
votes
0answers
173 views

How to disable imageSmoothingEnabled for geoImageLayer?

Considering the code below (which uses openlayers and Viglino's ol-ext), how do I disable imageSmoothingEnabled for the geoImageLayer? I am trying to achieve the same thing as in this question, but ...
2
votes
0answers
2k views

OpenLayers: change cursor upon hovering over feature

I want to change the mouse cursor to a pointer when the mouse is hovering over a feature. I currently have the following: this.map.on('pointermove', evt => { if (!evt.dragging) { this.map....
2
votes
1answer
223 views

Select Features in qgis2web - openlayers

After using qgis2web to export a map, I am looking to modify the qgis2web.js file to have the possibility to select (highlight) features on click and keep them selected until I click somewhere else (...
2
votes
0answers
401 views

How to get extent from current resolution in OpenLayers 3 for printing

I need to print a map with a fixed scale of 1:500 horizontally on a A4 paper (297x210mm). The map is done with Openlayers, the print request is sent to QGIS server using WMS getPrint function. Till ...
2
votes
2answers
3k views

Add a vector GeoJSON layer in OpenLayers 5.1.3

I am trying to add a simple capitals GeoJSON vector layer to my map for basics learning, without managing to get it to work. I spent hours of roaming the documentation API. As follow is my script: ...
2
votes
1answer
790 views

Remove vertex from geometry (polygon) in OpenLayers 5?

I could able to remove the recent modified vertex of a feature using removePoint method of modify interaction, as well as using deleteCondition event of modify interaction. However, that is not what I ...
2
votes
0answers
452 views

How to get DPI to find current scale in OpenLayers?

Is there a way to automatically retrieve the DPI value of an OpenLayers page? The goal is to automatically retrieve the map scale from this code: function mapScale (dpi) { var unit = map....
2
votes
0answers
691 views

GML/SVG for indoor map in OpenLayers 4?

I am new to GIS world and trying to incorporate OpenLayers with GML or SVG. I am building a map engine and one of the features should be support of indoor maps. It can be accomplished with a static ...
2
votes
0answers
167 views

Caching WFS requests using OpenLayers?

I'm investigating how we can improve our vector-layer performance of our GIS component (based on openlayers 4). OpenLayers keeps all the fetched vector features in memory. This becomes a problem ...
2
votes
2answers
332 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 ...
2
votes
0answers
273 views

Limiting OpenLayers heatmap to vector feature boundaries

I'm looking to create a heatmap using OpenLayers, which is possible using the ol.layer.Heatmap class. However, I want to limit the visualisation of the heatmap effect to span just the underlying ...
2
votes
0answers
414 views

Openlayers 4 - Load WMS image source require authentication

I try to load WMS image layer with openlayers 4.6 and angular 5, the code is: const syr_layer = new ol_layer_Image({ source: new ol_source_ImageWMS({ url: 'serverurl', crossOrigin: 'anonymous'...
2
votes
0answers
68 views

Make Mollweide oval

On base of this this thread i have a map with xyz-tilelayers in Mollweide projection. Now, the tilelayer is presented in rectangular form, parts of the world are duplicated and presented in a very ...
2
votes
0answers
258 views

QGIS server ignores GetFeatureInfo request tolerance

I'm using getGetFeatureInfoUrl to retrieve features from a WMS layer. Tolerance is a server side parameter, QGIS server offers optional parameters to define the tolerance for point, line and polygon ...
2
votes
0answers
87 views

click on features with some problems

I'm using OpenLayers to build a map with some features that are polygons, together they are a heat map which shows the number of issues in that area. When I click on a feature, for now, it shows an ...
2
votes
0answers
261 views

Not able to pass the parameters to SQL view in GeoServer

I created a sqlview(villagefilter_view) in GeoServer and added one parameter %vilselected% select * from niphad_survey where village=%vilselected% Name: vilselected Default value: 'Ranwad' ...
2
votes
0answers
161 views

Great circle rendering of satellite ground tracks reversed in southern hemisphere

I'm working on rendering some satellite ground tracks from postgis, through geoserver, and onto openlayers. The python library I'm using to get lat, lon from TLE data isn't perfect, so there are ...
2
votes
0answers
158 views

How do I add a caption(legend) inside a button when turning on / off a layer?

I'm working with OpenLayers 3 on creating a webgis I want to add a caption (png image) of a map via a button, as I demonstraded. When someone click the button I would like the caption image to appear ...
2
votes
0answers
2k views

OpenLayers 4 - get resolutions

I want to create combobox with all available scales, that could replace standard zoom slider control. As far as I know, there is no scale attribute in OL and scales must be calculated from resolutions....
2
votes
0answers
55 views

Reporting tool for Openlayers

Is there any reporting tool that can be used to build custom PDF reports with maps from OpenLayers? I tried iReports, but i was not able to create such report. Any suggestions?
2
votes
0answers
195 views

GeoWebCache 1.11.0 application/json not supported for GetFeatureInfo

I have been trying to find out whether or not I can serve a response to a GetFeatureInfo request from my GeoWebCache in a JSON format, but I have been coming up empty. My capabilities list doesn't ...
2
votes
0answers
32 views

Interaction draw in projection

I have a simple interaction on my map, by this interaction user can draw circle in any part of map. But i need to consider a current projection, can i apply projection to interaction? I try to say ...
2
votes
0answers
112 views

Restrict extent and Zoom in OpenLayers3 upto 1 mile

I need to restrict map to a certain extent plus one mile. How to do that? here is my code map.setView(view); map.getView().fit(bbox, map.getSize()); view = new ol.View({ ...
2
votes
0answers
168 views

Adding non georeferenced image as BaseLayer

I am trying to add non georeferenced image as a Base layer in OpenLayers3 (v.3.8.2). On top of that there is WMS, called from GeoServer, as Overlay. I successfully loaded both layers, but they are not ...
2
votes
0answers
796 views

Draw and modify polygons in openlayers

I want to draw only one polygon, modify it and then save the polygon. I already do the saving. I'm not able to modify the polygon as it snaps. Here is what I need but I'm not able to make it work. ...
2
votes
0answers
302 views

dynamic zoom linked to a drop-down menu

I would like to get a dynamic zoom linked to a drop-down menu. For example I have a list connected to my database with all the regions and I would like that when the user choose a region that a zoom ...
2
votes
0answers
148 views

Display multiple pop-ups when superposition of polygons with Openlayers

I have a map with polygons vector objects. Superpositions can exist between the polygons. That is to say a bigger polygon is sometimes completely above a smaller one. With Openlayers, is it possible ...
2
votes
0answers
527 views

Reproject XYZ tile layer on the fly in Openlayers 3?

I have an Openlayers 3 application which has a default map projection of EPSG:27700 with both base layers and WFS layers using the same system as well as various mapping tools like measuring options. ...
2
votes
0answers
1k views

OpenLayers and Ionic 3 | tileLoadFunction not working

I am building a simple map app with the Ionic 3 framework. I am using OpenLayers 4.0.2 as the map api. It has been going great until I tried implementing a custom tileLoadFunction for the basemap ...
2
votes
0answers
157 views

How to make a proper unification function

Well i make a map with OpenLayers 4 in draw a a brunch of polygons an try to union them if they intersect. i made this code : function unification(){ var parser = new jsts.io.OL3Parser(); ...
2
votes
0answers
819 views

Uncaught TypeError: a.addEventListener is not a function When using React OpenLayers Wrapper

I am trying to create a web app using a Django back end with React for the front end. I am using a React OpenLayers wrapper on the OpenLayers site and keep getting the Type Error. Can someone please ...
2
votes
1answer
420 views

GetFeatureInfo doesn't return anything

I'm attempting to display some properties from the points on my map. I'm using the example provided on the geoserver site: http://openlayers.org/en/latest/examples/getfeatureinfo-image.html?mode=raw. ...
2
votes
0answers
2k views

(Uncaught SyntaxError: Unexpected token < in JSON at position using openlayers js)

I am trying to insert a map with WFS request from GeoServer with OpenLayers tool but I get this error: Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<...
2
votes
0answers
150 views

How to use show Raster Attribute Table in OpenLayers?

I have some GeoTIFF files that I am showing on an openLayers map using GeoServer. Now, I wish to access a Build Raster Attribute table on my web application. In other words, if a user clicks on a ...
2
votes
0answers
160 views

Rendering freehand drawn geometry from geojson on map with OpenLayers?

I want to render freehand drawn geometry from a geojson object on a map. I have the freehand drawing all set up and working. The geometry is LineString but I am adding the freehand: true property ...
2
votes
0answers
73 views

MapServer reading SQL from 8-bits data type TIFF

I'm converting to SQL (PostGIS) some raster files (TIFF). Then I'm using those SQL files for queries with MapServer, and displaying it in my app with OpenLayers with no problems. Everything goes well. ...
2
votes
0answers
374 views

OpenLayers 3 - Build GetMap query string for WMS

We have an application with OpenLayers 2. There we are using WMS layers, which make requests to an custom Web service. This Web service creates an image for the current map window. To achieve that, we ...
2
votes
0answers
1k views

Android WebView doesn't display OpenLayers 3 map

I'm trying to display an OpenLayers 3 map in an Android WebView. Only the zoom controls and the copyright hint are displayed, the map itself not. JavaScript is enabled for the WebView, right to access ...
2
votes
0answers
159 views

Is it possible to perform a join on the fly within OpenLayers, to join a filtered tabular service to a polygon WFS layer?

We have around 2 million species observation records we want to display to users in an OpenLayers-based front-end. I created a VIEW in our PostgreSQL database that summarizes these records by species,...
2
votes
0answers
819 views

Static Image Layer Performance Issues - Open Layers 3

I am receiving data points in lat/lon. I need to plot all of these on a static image in OpenLayers 3. I am not using OSM or anything else, my image should be the base layer. I got it working by adding ...
2
votes
0answers
216 views

Why is EPSG:4326 projection making trouble with the zoom?

I'm quite cartography illiterate. I implemented an OpenLayers 3 map on my website and everything's working fine except for the zoom in/out. The first time the map loads, I can zoom into any city and ...
2
votes
0answers
334 views

Display EPSG:3844 ArcGIS WMTS service in OpenLayers: origin axes in wrong order

I'm trying to display a EPSG:3844 WMTS service from an ArcGIS server in OpenLayers 3.20.1. In order for it to be displayed correctly, I need to manually swap the origin coordinates found in the ...
2
votes
0answers
885 views

event.stopPropagation() doesn't work

I'm found out that event.stopPropagation() on Chrome and IE doesn't work. In FireFox it's ok. It is relevant with popup. When I have a few WFS layers I need prevent popup from lower layers as below ...
2
votes
0answers
230 views

OpenLayers 'zoom to extent' issue on swipe tool

I am working with OpenLayers version 3.16 in which I have added few layers and comparing those using swipe tool OL3-ext. Layers are coming from GeoServer. While zooming to extent on selected layers ...
2
votes
0answers
162 views

Openlayers3, vector data layer not visible after proceeding select onchange function

I input two polygon geojson layers, one is just boundary layer, another is the vectorlayer contains many attributes. I add map.on('click', function(evt), so users can click on the map, and the ...
2
votes
0answers
755 views

TMS tileOrigin on Google Maps ImageMapType

I'm trying to show a tiled image layer on Google Maps, which is currently showing on an OpenLayers / ESRI engine. OpenLayers has a parameter on a TMS layer to specify tileOrigin (0,0 is different) ...
2
votes
0answers
800 views

Style GeoJSON layers depending on attributes in Openlayers 3

I'm trying to mimic most of the great google-vector-layers and leaflet-vector-layers from Jason Sanford (https://github.com/JasonSanford) to easily display, style and add customized popups for data ...
2
votes
0answers
91 views

building forms dynamically

I found this previous post How to edit feature attributes with openlayers? and wanted to make forms dynamically. I tried making a variable and using a getProperties function but that didn't make ...
2
votes
0answers
111 views

QGIS Web Client, tiled raster at fixed zoom levels?

I have a tiled png raster map, which is available in zoom levels 8, 9 10 and 11, loaded as background layer / basemap via OpenLayers.Layer.OSM. in /site/js/Customizations.js I added in ...

1
2
3 4 5
15