Questions tagged [openlayers-3]

OpenLayers 3 is the complete rewrite of the OpenLayers 2.x mapping library, targeting modern features of HTML5 and CSS3. It is not compatible with OpenLayers 2. OpenLayers is completely free and open source, having been released under the 2-clause BSD License.

OpenLayers 3

OpenLayers 3 is a high-performance, feature-packed library for creating interactive maps on the web.

Beginners may wish to consult the following resources:

Usual search keywords are 'OpenLayers' and 'ol'.

Source code can be found on GitHub at https://github.com/openlayers/openlayers.

Tag usage

Use of the tag was encouraged by OpenLayers developers for questions specific to OpenLayers 3, but it no longer is. The tag will probably get more attention.

2413 questions
0
votes
1 answer

How to use Openlayers3 library files in codeigniter View files

I am trying to use openlayers in my codeigniter for showing some map information when a user visit some place. But I am stuck in initial stage. I know this is a stupid question, but I really need to use it. I can use the Openlayer librarys like…
Saroj
  • 1,343
  • 4
  • 15
  • 31
0
votes
0 answers

How to handle tile request errors from ol.source.WMTS - Openlayers 3

By using the obvious event handler:: layer.getSource().on('tileloaderror', function (ev) { console.log(ev); }); I get an output rather useless, since it doesn't seem to contain any information regarding HTTP Response body/headers etc. Is…
Jimi
  • 198
  • 2
  • 13
0
votes
1 answer

Grab features from openlayers map?

I'm trying to pull a feature off my openlayers map object and change the color of the feature on the map. olMap.getLayers().getArray() is what I have been using to get the layers. Are these actually features? I want to apply a simple style such…
John Lippson
  • 1,269
  • 5
  • 17
  • 36
0
votes
0 answers

Openstreetmap add css class to marker

I'm using OpenLayers and I want to add a specific CSS class to highlight a marker. The marker is a .png image, and I can't find the propper way to add the css class to modify its style Here is an example of the same image with and without style. I…
Pakopub
  • 63
  • 6
0
votes
0 answers

clustering features based on the boundaries in openlayers

Is it possible to make clustering based on polygons? We want to cluster the features based on the boundaries of each city or province.
AmirHossein
  • 367
  • 1
  • 8
  • 25
0
votes
1 answer

How to slow down mouse before modifyend with OpenLayers

I have a map with a draggable marker (ol.style.icon in fact). There is a strange issue: If I try to move marker, it is like trying to reel in a marlin but after a zoomin/out or a first drag (clic tight then clic release), marker naturally slows…
Pim92
  • 99
  • 1
  • 5
  • 15
0
votes
1 answer

openlayers error on draw/modify (in vuejs)

The code I am using is in my previous question (resolved) The interaction works perfectly and my goal is to get an array of coordinates, also works perfectly. Although everything works, I am getting an error in console every time I move the mouse in…
TDawg
  • 833
  • 2
  • 8
  • 24
0
votes
1 answer

Style OpenLayers 3 cursor when drawing shapes

I have a feature that allows a user to draw a square or rectangle on an OpenLayers map. I would like to change the style of the cursor. The cursor is, by default, a blue circle. I would like to change it to a square so the symbology matches the…
Captain Caveman
  • 1,448
  • 1
  • 11
  • 24
0
votes
0 answers

How to "apify" OpenLayers with Node.js?

I was playing with an idea of having a openlayers instance running on node and being able to call it from my website? For example I would like to send location parameters for it and use openlayers plugins to generate a response (since similar plugin…
user1271930
  • 331
  • 1
  • 7
  • 21
0
votes
0 answers

OpenLayers events using Angular 6

I'm having problems using the on in typescript, I need to use event.context but it's from ol.render.Event but I only can receive ol.events.Event this.imagery.on('precompose', function(event){}) To get around this I tried…
0
votes
1 answer

Check for a pending map redraw

Is there a way to detect a pending map redraw? For example map.getView.setCenter([x, y]) will not cause a map redraw if x and y are the same as current center, but will cause a redraw if they are different than the current view center. (At least…
Richard Greenwood
  • 876
  • 1
  • 10
  • 20
0
votes
1 answer

Remove older map - Open Layers 3

I would like to change the icons features on a map My idea was to delete the old map and generate a new one My map: var map = new ol.Map({ renderer: 'canvas', target: 'mapOl', layers: [ignLayer, vectorLayer], overlays: [overlayPopup], …
b-user
  • 97
  • 1
  • 3
  • 10
0
votes
1 answer

Save canvas as png locally with javascript with Cross doimain

I want to save an image of the canvas tag, but when i try create an image from the canvas it tells me "SecurityError: The operation is insecure", which i believe is problems with the canvas coming from another domain than what im on. This canvas is…
Lars Karlsen
  • 117
  • 9
0
votes
1 answer

angular 5 : how to know my map is loaded correctly inside constructor of all components?

I have a mapservice(maps.service.ts) , in which I've wrote some code for loading the map , like this , loadMap(target: string, extent?: number[], proj?: string) { var self = this; this._mapExtent = !extent ? [372728.74434305,…
AhammadaliPK
  • 3,448
  • 4
  • 21
  • 39
0
votes
1 answer

Styling a sketchpoint

Using the Draw interaction with version 4.6.5 or 5.0.3, I want to draw resp. place some text on the map. The text is a point with some specific properties read by the style function on the vector layer. By default the sketch geometry is visualised…
Chris
  • 234
  • 1
  • 11