Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 18859

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

1 vote
1 answer
23 views

OpenLayers why are there no features when converting non-zero Selected features to JSON

Using OpenLayers with a Select interaction to select features, I'm attempting to convert the selected features to JSON for further processing within the select.on('select', ...) as per the code below. …
Son of a Beach's user avatar
0 votes
1 answer
45 views

OpenLayers prevent DragPan from bottom of screen

My OpenLayers app runs on iPhones in full-screen. … In my OpenLayers app, this gesture is also recognised simultaneously by OpenLayers as a DragPan interaction. …
Son of a Beach's user avatar
0 votes
0 answers
458 views

OpenLayers 'Canvas area exceeds the maximum limit' error in WKWebView

I'm using OpenLayers 6.13 in an iOS app. The app also runs on macOS (Mac Catalyst). The OpenLayers component runs in a WKWebView (essentially a Safari-esque web browser view, embedded in the app). … How can this error be avoided in larger windows with OpenLayers? …
Son of a Beach's user avatar
1 vote
2 answers
376 views

OpenLayers won't display polygon (or line) with zero size

Using OpenLayers 6, my app will not display anything for a Polygon (or line) where all the vertices have the same coordinates. …
Son of a Beach's user avatar
0 votes
1 answer
295 views

OpenLayers fullTileRanges of tileGrid no longer easily available in 6.13

Getting the details of a tileGrid was working fine in OpenLayers 6.5, but I've just upgraded to OpenLayers 6.13 and now the tileGrid keys are no longer available in plain English. … Instead there are only the coded keys (which presumably change with each build of OpenLayers. …
Son of a Beach's user avatar
2 votes
1 answer
951 views

OpenLayers line labels with 'line' placement not working

Using OpenLayers 6.13.0, I'm attempting to get my lines layer to have labels that follow the line (ie, parallel to the line, and bending with the line) as per the example at: https://openlayers.org/en …
Son of a Beach's user avatar
0 votes
0 answers
834 views

OpenLayers 'wrapX' not working on ol.source.XYZ() source

I recently posted a question about a WMTS layer not appearing in my OpenLayers map, and the resolution turned out to be that I needed to add the 'wrapX' option (or otherwise to pan all the way around the … Full JS code Using OpenLayers 6.5.1 is below: function newLayerTileGrid(urlTemplate, tileGridJSON, projCode, projString) { var tileGrid = new ol.tilegrid.TileGrid( JSON.parse( …
Son of a Beach's user avatar
2 votes
1 answer
673 views

OpenLayers WMTS function no longer working - No error messages

WMTS layers have been rendering in OpenLayers 6.5.1 flawlessly in from my code for some time now, but it has recently stopped working. … I can't actually think of anything that I've recently changed in the OpenLayers part of the app, so I've cut it down to a simple OpenLayers-only HMTL+JavaScript and it is still not rendering a WMTS layer …
Son of a Beach's user avatar
3 votes
1 answer
481 views

OpenLayers Source - how to get Attributions

Using OpenLayers 0.6.5, I want to be able to copy the attributions from one source, and set the same value for the attributions of another source. …
Son of a Beach's user avatar
3 votes
1 answer
827 views

OpenLayers dynamic JSON Vector Source works in OL v3 but not OL v6

I'm using OpenLayers display a map which can include vector layers with dynamic features (ie, the lines/points change frequently). … This was all working fine in OpenLayers v3.x but stopped working after upgrading to v6.5. …
Son of a Beach's user avatar
2 votes
1 answer
1k views

OpenLayers custom tileGrid for scanned map image - How to calculate resolutions?

I'm using OpenLayers 3 and attempting to display a layer based on a custom tile grid in a custom projection (EPSG:4202) on a standard projection map (EPSG:3785). … This also implied by the insane number of tiles that OpenLayers wants to fetch (and when zoomed out, the OpenLayers error that appears in the JavaScript console when zoomed out that says: Assertion Failed …
Son of a Beach's user avatar
4 votes
1 answer
2k views

Programatically Cache WMTS for Offline Use

The app uses online map services, including WMTS, WMS, TMS, XYZ and makes heavy use of OpenLayers to display these. … Can anybody provide advice on how to convert online WMTS to an offline cache that I can feed into OpenLayers? …
Son of a Beach's user avatar
0 votes
1 answer
212 views

Why does setting extent in OpenLayers end up with an adjusted extent?

If I run the following code in OpenLayers 3... …
Son of a Beach's user avatar
5 votes
1 answer
9k views

OpenLayers and proj4js.defs() - why does one custom projection work and not the other?

It is based on OpenLayers example code, but I've defined the map projection using proj4js. … From the OpenLayers API documentation at https://openlayers.org/en/latest/apidoc/ol.proj.html : [OpenLayers] will check if the Proj4js library and the necessary definition are loaded; if so, it will …
Son of a Beach's user avatar
4 votes
4 answers
15k views

How to get map units to find current scale in OpenLayers?

I need my OpenLayers application to be able to determine the current scale. This is not for display (there is already the scale line for that). … How can I get the current map unit from OpenLayers? Or can I get it from proj4.js for the current projection? (and if so, is that the same thing?) …
Son of a Beach's user avatar

15 30 50 per page