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
6
votes
2 answers

Slow performance in OpenLayers 3 when panning with 500 features

I'm building an application for mapping features onto an image layer depicting a floor plan (using OL's ImageStatic layer). Each feature has an svg icon as style and may have additional svg icons as "badges" around the edges. I've set up a…
Fredrik Boström
  • 1,499
  • 1
  • 19
  • 22
6
votes
1 answer

Remove default controls from Open Layers Bing Map

I am building an App that uses Geolocation using Open Layers loading a Bing Map Layer. I would like to control the zooming just by touch alone and would therefore like to remove the default zoom buttons. Ideally I'd like to at least move the 'i'…
Helen Danger Burns
  • 421
  • 2
  • 9
  • 28
6
votes
2 answers

OpenLayers3 - Animated .fit to a specific extent

I have created a map using OpenLayers3. I can succesfully zoom to a layer on the map using the following code: map.getView().fit(extent, map.getSize()); However I woulld like something similiar in an animated way. I know about the following…
Titsjmen
  • 789
  • 6
  • 15
6
votes
0 answers

ol.overlay is not setting the position correctly

I am using openlayer 3.9.0 .I have the below code , in which i have to draw a number of overlay on map. These overlay are coming but not at exact coordinate. But as soon as i click on map some where these overlay moves to correct position. To…
satpal
  • 71
  • 5
6
votes
1 answer

Open Layers 3 get Google Maps baselayer?

I've read some posts regarding this matter with links to examples However I find it hard to follow how they've done it in the example: var gmap = new google.maps.Map(document.getElementById('gmap'), { disableDefaultUI: true, keyboardShortcuts:…
Nicolas T
  • 327
  • 1
  • 5
  • 15
6
votes
2 answers

OpenLayers3 : more than one overlay at a time?

I'm using OpenLayers3 to integrate a map into a website. I added some features representing objects according to their position. I added an overlay containing data on that object when it is clicked on, and it is working perfectly. But, there is…
LucDrt
  • 57
  • 4
6
votes
1 answer

Cannot set WFS filter the second time

Here is my scenario. The page loads and the map loads with an empty vector layer. So its there, but has no features. Then the user clicks a button and a CQL filter loads features according to the CQL settings. My methodology to implement this. I set…
slevin
  • 4,166
  • 20
  • 69
  • 129
6
votes
3 answers

Openlayers 3 map contextmenu

I would like to have a right-click context menu with the information of the point clicked. I.e. I right click on map, get a dropdown menu, here if I would pick 'add marker' or similar, I need to have the clicked position. I think simplest for…
DDan
  • 8,068
  • 5
  • 33
  • 52
6
votes
2 answers

Changing opacity for layers in ol3

I have a vague memory of seeing examples of Open Layers 3 where the added layers' opacity could be changed. There are still such examples on the ol3 examples page but they require the webgl-renderer (which rules out vector layers). Is there any way…
averas
  • 545
  • 1
  • 6
  • 15
6
votes
1 answer

Convert xyz coordinate of a tile to longitude/latitude

I wanted to make a map using openlayers but center it a unique way. For example I have a z/x/y coordinate of 12/2045/-1362, how do I convert it to longitude/latitude? It's quite the polar opposite of this: How to get X Y Z coordinates of tile by…
The Bassman
  • 2,241
  • 5
  • 26
  • 38
6
votes
0 answers

Features added to vector layer are not visible

I am trying to add new features to a vector layer. I do it with this code: layer.getSource().addFeatures(features); Where layer is an instance of ol.vector.Layer and features is an array of ol.Feature The features are added but they are not…
Marcin Roguski
  • 729
  • 2
  • 7
  • 16
6
votes
2 answers

How do I display 400,000 or more points in Openlayers 3 using less than 200MB of memory?

I created a standalone map to test this out for myself. I took a heap snapshot, using Chrome Developer Tools, of the page upon loading it and found it was using 882MB of memory. I'm looking to plot about an hours worth of lightning data and I would…
oukjweather
  • 63
  • 1
  • 5
6
votes
2 answers

ol3 / Openlayers3: change radius of circle when zoomed

I have a vector layer with the style currently defined as: var styles = new ol.style.Style({ image: new ol.style.Circle({ radius: 4, fill: new ol.style.Fill({color: 'red'}), stroke: new ol.style.Stroke({color: 'black', width: 1}) }) I want…
bramb84
  • 355
  • 4
  • 14
6
votes
2 answers

Openlayers 3 How to render every point in a geometry at a high ( small ) resolution?

How do I force ol3 to render every single point in a geometry? I'm having an issue with openlayers 3, where although I'm plotting a line string with 3000 points over a distance of maybe 100m, only about 1000 are rendering. EDIT: Now - Openlayers 3…
ryansstack
  • 1,396
  • 1
  • 15
  • 33
6
votes
1 answer

OpenLayers 3: Map is blurry

Sometimes the map is blurry when I add my map (same html, css, js) to a different page. The different page may have other html, css and js inside of it. The clear picture on the left is inside a page with added CSS from a third party. The one on the…
Alan
  • 297
  • 3
  • 12