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

Open Layers (5.0.0) error when importing OSM and TileArcGISRest together

I'm trying out a few OL demo apps, and finding I can't combine two of the demo scripts provided in the documentation into one script, because there appear to be conflicts between the imports. This is very easy to reproduce, import OL into a npm…
Single Entity
  • 2,925
  • 3
  • 37
  • 66
0
votes
0 answers

Unable to use OpenLayers library in Browser Debugger Console (React JS)

I am having one application which has OpenLayers Map and implemented using reactjs with OpenLayers library. I am trying to get the latitude and longitude of the map from the browser console in order to use the same in my selenium automation. I am…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
0 answers

How to do the export and import of object (map object) in ReactJS?

I am having RAS_MapComponent class and this will display the openlayers map with some defaulted linestring in the map. I want to test the defaulted linestring coordinates in another class.So, I need to pass the map Object to my test class from…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
1 answer

How to get the coordinates from the OpenLayers Map in ReactJS?

Some three locations are connected in a triangle shape in Open Layer Map. I am trying to get all the three locations (latitude and longitude) with the help of OpenLayers and React JS. But unfortunately, I am able to get the Latitude and Longitude of…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
1 answer

Unable to draw the default line between two location in OpenLayers with ReactJS

I am trying to draw some default line between two location (Location A, Location B) using location latitude and longitude with the help of OpenLayers and ReactJS. But defaulted line is not getting drawn. Unfortunately, I couldn't find the root…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
1 answer

How to position an image in OpenLayers 3 map?

I have a png image of other map that I know the original bounding box and the original projection. This image is 400x400 large but I have control over its width and height and can generate any size I want. How can I position this image over my OL…
Magno C
  • 1,922
  • 4
  • 28
  • 53
0
votes
1 answer

Openlayer clustering with different color of image

So basically I have several hundred of features containing a geom. I want the map to cluster different color of points. This is the features and color: //so both features and color contain several hundred of value features.push(new ol.Feature(new…
GG program
  • 127
  • 1
  • 1
  • 11
0
votes
1 answer

Cannot read property 'Vector'/'Draw' of undefined in React JS

I am trying to draw some rectangular shape in map using react js with open layer. But,I am getting an error as "Cannot read property 'Vector' of undefined" /"Cannot read property 'Draw' of undefined". I am getting an error after importing all the…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
1 answer

Cannot read property 'Tile' of undefined in ReactJS

I am adding a map using Open Layer in React JS and I have imported all the required libraries. but I am getting an error as "Cannot read property 'Tile' of undefined". What is wrong in the below code? Code: import React, { Component } from…
Subburaj
  • 2,294
  • 3
  • 20
  • 37
0
votes
1 answer

Openlayers 3 Wicket add new feature after initialize

I'm trying to add a new Feature with LineStrings whenever a button is clicked(after initialize), and I'm wondering how to do this without doing a refresh. Currently, when the button is clicked, the new Feature is added to map, but is not shown…
Lars Karlsen
  • 117
  • 9
0
votes
2 answers

Output degrees minutes from an OpenLayers coordinate, but without seconds?

The method ol.coordinate.toStringHDMS() will output in a format of degress, minutes and seconds with compass direction, e.g. 47° 59′ 59″ N 7° 50′ 59″ E But is there a way to output degrees and minutes without seconds? Truncating the seconds is not…
DaBozUK
  • 590
  • 1
  • 8
  • 24
0
votes
1 answer

OpenLayers 3 and Geoserver: Create popup on marker click

I have an OpenLayers 3 map with WMS layers from my Geoserver. I am trying to create a popup window on marker click (from the WMS layer) with the popup's content data from WFS GetFeature method. I have a JsFiddle here. The code is rather simple and…
lios
  • 218
  • 5
  • 26
0
votes
1 answer

OpenLayer 3 - GeoJSON - feature is null

I'm trying to get country string by coordinates, but feature is null. Why feature is null? how could I fix it? I tested with onclick event.pixel and it does returns feature but then I use map.getPixelFromCoordinate to get pixel feature becomes…
Mikebel
  • 51
  • 8
0
votes
1 answer

OpenLayers 4 webmapcontext

In one of my projects i want to use OL-4.6.5 instead of OL-2. But one key feature that we are using is the OpelLayers.Format.WMC(). Is this functionallity available in OL-4.6.5. Regards Magnus
0
votes
2 answers

Get all WMS layer features from the Openlayers 3 with in selected bounding box?

For vector layer we have solution to get the feature with in the bounding box. PFB the solution http://tsauerwein.github.io/ol3/animation-flights/examples/box-selection.html but, Is there any respective solution for for WMS layer?
Sumesh S.G
  • 43
  • 1
  • 6