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
0
votes
0answers
75 views

Openlayers add feature in Internet explorer memory issue

We have a map configuration, where at a certain zoom level we have to plot N number of features, ranging in hundreds to thousands, but on Internt Explorer, if the feature count is more than 2500, than ...
0
votes
0answers
192 views

OL 4.2 WMS getGetFeatureInfoUrl producing incorrect URL

EDIT: URL works fine, I mistakenly thought i,j, width, and height were sending info specific to the WMS image being checked for features. I could be misunderstanding how the URL works so correct me ...
0
votes
0answers
677 views

Add a second click function to a selected polygon feature in Openlayers 4

I am trying to add a click function to a selected feature which will delete this selected feature in OpenLayers 4. var Delete = { init: function() { this.select = new ol.interaction....
0
votes
0answers
490 views

openlayers - how to render vector layer in openlayers with WebGl

I was used this tutorial and copy code of tutorial step by step but don't work for me. As mentioned in the tutorial, I was used ?renderer=webgl as a query string. here is jsfiddle of my code: https:/...
0
votes
0answers
109 views

Polygon misalignment with OpenLayers & Ordnance Survey data (possible projection issue)

I'm trying to plot polygons on an OpenLayers map of Scotland which represent the area covered by UK Ordnance Survey maps. These polygons should cover the whole of Scotland and have no gaps between ...
0
votes
0answers
202 views

OpenLayers3 no refresh WMS in zoom-in

I have an aplication, made with OpenLayers 3, GeoServer and ReactJS, showing some WMS. And for a strange reason I can't manage to refresh the image when I zoom in ONLY if the screen resolution is ...
0
votes
0answers
906 views

OpenLayers map refresh

I'm trying to reinitialize my map upon modal open. But it seems that after the modal open all I can see is the map controls but the other layers is not visible. Below is my code <div id="...
0
votes
0answers
441 views

How to calculate the extent of a projection?

I am trying to change the projection of my Open Layers map from 'EPSG:3857' to 'EPSG:26915'. I tried to use var projection=new ol.proj.Projection({ code: 'EPSG: 26915', extent:...
0
votes
0answers
462 views

How to draw features on OpenLayers geoserver raster source?

I can successfully draw a point on an OpenLayers map with source new ol.source.Vector({features: features});. However, I am trying to show these points on the raster source that I am pulling through ...
0
votes
0answers
583 views

Display Mouse Position OpenLayers in Custom Projection

Being extremely new to this I am trying to build a fully functioning map from scratch using OL3 have tried to work this out myself but I just can't get it to work I always seem to get the ESPG 3857 ...
0
votes
0answers
227 views

GetFeatureInfoUrl is not working

I want to use GetFeatureInfo in WMS layer. I have got some code but it shows only a blank window, and there is not​ any error. This is the code link https://jsfiddle.net/seema30/LtcvhLwf/.
0
votes
0answers
152 views

Get a popup instead of an iframe when using getElementById

I have a map (openlayers) that gives me an iframe of attribute data when a pixel is clicked/ queried. How would I go about having a nice popup window instead of an iframe? My code for the query is: ...
0
votes
0answers
97 views

Selecting adjacent polygon in vector layer in OpenLayers 3?

I am trying to change feature of all polygon's with in 100 radians of given lat long. initially i used buffer but instead of highlight polygon's it creating as new layer. below is the code i have ...
0
votes
0answers
303 views

Google maps as a Layer inside Geoext3 Tree Panel

I'm trying to load Google Maps as a Layer in Geoext3 tree Panel. I'm using Ol3-Google-Maps. My code is: var googleLayer = new olgm.layer.Google({ name: 'Google', title: 'Google', ...
0
votes
0answers
277 views

How to transform feature geometry to 4326

I am working on WFS-T update.below is the code I am using to update modified data map.addInteraction(interactionSelect); interaction = new ol.interaction.Modify({ features: ...
0
votes
0answers
168 views

Creating a lightweight 1 degree x 1 degree mesh with GeoJSON?

I have produced via QGIS a 1°x1° mesh polygon and exported that in GeoJSON format. However, the file is 11-15 MB large. That is really too heavy to be used in Web applications, such as OpenLayers (...
0
votes
0answers
193 views

OpenLayers 3 GML dimensions

I'm using OpenLayers 3.16 and trying to parse the GML I'm getting from a WFS source. It's parsing ok, well mostly, but OL is assuming it's in 2 dimensions, while actually it's in 3. Is there a way to ...
0
votes
0answers
479 views

Openlayers-3, can't get attributes from a WMS layer

I have an osm map and a WMS from mapserver in Openlayers-3. I am trying to display some attributes from WMS "emprises" layer according to this example. But The window is empty : I just see "...
0
votes
0answers
399 views

How to add heading to position using openlayers 3?

I've seen the geolocation with tracking example in OL3, what it does is it rotates the view depending on the heading of the device. I've done some research on the web and all what I've found does the ...
0
votes
0answers
503 views

Openlayers 3 polygon not rendering on map

I've set up a small example of an OpenLayers 3 map, and I am trying to add a custom polygon to the map. If I use the data from the example, it works correctly, the polygon renders, and it is shown on ...
0
votes
0answers
3k views

OpenLayers3: How to use zIndex for Layers

In my project I have the following situation: layer A: zIndex = 1000; layer B: zIndex = 2000; layer C: zIndex = 3000; layer D: zIndex = 4000; I add the layers in this order: layer A, layer C, layer ...
0
votes
0answers
1k views

OpenLayers 3 - popup auto pan

I created a simple OpenLayers3 map with the plugin Qgis2web. It consists of a basemap with points. Every point has its own popup. This is the html code for the map and for the popup. <div id="map"&...
0
votes
0answers
587 views

Prevent browser freeze when loading lots of GeoJSON features at once

In my OpenLayers 3 (v3.15.1) application, I use to load a larger amount of GeoJSON features on my map via an ol.Vector source and a custom loading fuction. This function receives the GeoJSON data from ...
0
votes
0answers
842 views

Examples of ArcGIS Server 10.x REST map service layers with OpenLayers 3?

I am looking around, but so far I have only seen examples for OpenLayers 2 that use ArcGIS REST map services (dynamic, not cached). Is there a way I can add an ArcGIS 10.x REST map service to ...
0
votes
0answers
566 views

OpenLayers 3 - in-house tiled ArcGIS basemap not visible

I am new to openLayers. I am trying to display an in-house cached basemap from an ArcGIS REST service. I can see the basemap if I use "ol.source.TileArcGISRest" for the source property, but the ...
0
votes
0answers
962 views

Calculate Tiles X,Y, Z for current view or extent in OpenLayers

Im using OpenLayers with the openstreetmap tile server. var urlTemplate = "http://c.tile.openstreetmap.org/{z}/{x}/{y}.png" I would like to download tiles for the current view or an extent. So that ...
0
votes
0answers
351 views

Mapquest routing using multiple stops(via) in OL3

I am trying to find the route between two stops in Mapquest by passing the lat long details in the URL, http://open.mapquestapi.com/directions/v2/route?key=YOUR_KEY_HERE&outFormat=json&...
0
votes
0answers
253 views

getTileUrlFunction Openlayers 3

I have a quadkey function to try to reach a non-Bing Source which uses a quadkey but it returns 404s everytime although the request looks correct. I wondered instead if I should try to pass a custom ...
0
votes
0answers
104 views

GeoServer GeoTIFF rendering skips data between Greenwich and the Dateline

I've got a custom web application using OpenLayers3 running GeoServer (2.7.1) as a back-end. I've added a world-wide temperature GeoTIFF as a test, and it renders in a strange way. If I move the ...
0
votes
0answers
374 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
0
votes
0answers
1k views

Getting attributes of OpenLayers map with JavaScript

I have created an OpenLayers map via the following code: var map = new ol.Map({ target: 'mapdiv', layers: [ new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'sat'}) }), new ol.layer....
0
votes
0answers
231 views

Starting animation after X seconds in OpenLayers 3?

Following the documentation, A normal animation is working fine. But an animation with a delay (parameter: start added to previous example) is not working. Am I doing something wrong?
0
votes
0answers
520 views

Layer Tree Collapse Alongside OpenLayers3

I have the following JSFiddle that includes a layer tree for my OpenLayers3 map. It is currently set up so that when you click on the branch 'parent', the layers collapse. I'm looking to make it so ...
0
votes
2answers
131 views

OpenLayers doesn't display US Census-based GeoJSON Layer

I'm getting started with OpenLayers and all was going well until I tried to use my own GeoJSON file. I started with the Cartographic Boundary Shapefiles - Counties from the Census website, loaded it ...
0
votes
0answers
353 views

How can I delete renderer from OpenLayers 3?

If I'm creating new renderer using the following code (taken from http://openlayers.org/en/master/examples/geolocation-orientation.html) , map.beforeRender(function (map, frameState) { if (...
0
votes
0answers
261 views

Using OpenLayers example in OpenStreetMap Wiki?

I'm trying to work my way through this wiki page to add OSM into a OpenLayers map I am working on, however I cannot even get the first example to work. I have downloaded OpenLayers V3, copied the ...
0
votes
0answers
721 views

How to get Point feature from Mouse interaction in openlayers 3

I am unable to get point features from event coordinate like below $(map.getViewport()).on('click', function (evt) { //var pixel = map.getEventPixel(evt.originalEvent); var ...
0
votes
0answers
294 views

Get GeoJSON data from AJAX enabled service

I want to get GeoJSON data from GeoServer using asp.net and AJAX enabled service. firstly I made a class for request web: public class Request { public static string WebRequestByUrl(string url) ...
0
votes
0answers
618 views

Google Maps zoom number and min/max scale(Openlayers)

How to set Google maps' zoom number accordingn to min/max scale of a wms layer? If min scale is 1/50000 and max scale is 1/5000 (units: m), which zoom number is resonable? I tried to set min zoom ...
0
votes
1answer
254 views

GeoServer get native SRS of layer

I want to get the native SRS/EPSG-Code of a layer deployed in GeoServer. Maybe similar to this solution: https://stackoverflow.com/questions/32766126/get-the-epsg-code-from-openlayers-3-layer but with ...
-1
votes
0answers
30 views

OpenLayers 6.x - select by Circle, select by Line

OpenLayers 6.x, Angular, typescript. Questions are, how to: Select features by Circle Select features by Line Remember that checking the extent of a circle or a line is not a good solution as it is ...
-1
votes
1answer
37 views

Openlayers blank map after construction for production

I follow this OL tutorial to build an Openlayers app. I am very new with that sort of dev environment (nodejs/parcel).All is working fine when in dev. OSM Tiles and MapServer Layers appear in web ...

1
11 12 13 14
15