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

What type of file does the openLayer/TileLayer/source require?

import { Component, OnInit } from '@angular/core'; import {Map} from'ol'; import TileLayer from 'ol/layer/Tile'; import Stamen from 'ol/source/Stamen'; import View from 'ol/View'; import {transform} from 'ol/proj'; import Zoomify from…
Ashim
  • 877
  • 2
  • 12
  • 22
0
votes
1 answer

Callback on clicking a layer in Open Layer

I have an Open Map that I created, with a vector layer with several polygons. How can I detect a user click on these polygons, and detect which square was clicked? var map = new Map({ layers: [ new TileLayer({ source: new…
lee
  • 740
  • 2
  • 11
  • 24
0
votes
1 answer

Customize vertex style when selecting features (point, line, polygon) in Openlayers 3?

I am trying to show the vertices on selected features in openlayers 3 by customizing their style. I have managed to do so for polygons, but need it dynamically on all feature types (point, line polygon) The solution for polygons is using multiple…
danji_ma90
  • 89
  • 8
0
votes
1 answer

How to create Openlayer Feature previews in a dropdown menu?

I am trying to create a menu which shows the list of openLayer Features saved in database with a preview option.each preview can have multiple Openlayer features(grouped features).I couldn't find a way to place the features in a small scale area. Do…
CodeBuggy
  • 429
  • 5
  • 18
0
votes
1 answer

how to detect when a vertex is added

I need to detect when a vertex has been added to a line as it is being drawn or edited. The way I'm doing it now works, but seems pretty clumsy so I'm wondering if I'm overlooking an "observable" event or if there is a more elegant way of catching…
Richard Greenwood
  • 876
  • 1
  • 10
  • 20
0
votes
0 answers

Publishing wfs through geoserver, accessing it by openlayers3 , editing WFS and automatically saving it to postgres database

I am trying to access shapefile from geoserver as WFS and edit it online and at the same time it should be saved in wfs_geom table in postgres database. I have created a geometry table "wfs_geom" (columns - id, geometry) in postgres and published it…
user8888885
0
votes
1 answer

Adding image along with animated linestring

I am trying to add an image/icon style along the lineString which is animating,but image/icon style is not getting added. Here is my style for line var lineStyle = new ol.style.Style({ image: new ol.style.Icon(({ opacity: 1, …
CKool
  • 3
  • 4
0
votes
1 answer

vectorSource.addFeatures with the parameter Array containing more than 10 features using openlayers 4.3.3

I have a map and I'd like to add features. The features are added correctly always at the end of the array. If there are more than 10 features added, the eleven one - is inserted anywhere. draw.on('drawend', function(evt) { var feature =…
E.Scott
  • 19
  • 3
0
votes
1 answer

How to make created Draw visible before mouse is moving

Is there a way to enfore a just created Draw interaction to visualize itself before the first mousemouse event? I use openlayers 4.6.5. The application creates an ol.interaction.Draw in response to a keyboard event. The type is a LineString. After…
0
votes
1 answer

OpenLayers 5 add conditional style to Text

I am trying to add conditionally styled text to vector object that I am placing on the map. I have a service that creates the "Style" that looks like this let myStyle = new Style( { fill: new Fill({color: Shade}), stroke: new…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
0 answers

POIs and Direction Path in Open Layer Map

I am using OpenLayer 3 Map, I want to add following two similar feature of google map in open layer map. "Search Near by Places": POIs(Near by Restaurant, Church , School etc) on map. "Direction service": Show direction in map between two points…
0
votes
1 answer

Changing style in OpenLayers clustered features

I am using OpenLayers with Javascript and showing clustered features on map. I would like to change the icon of the feature within a cluster according to one of its attributes value. var style1 = new ol.style.Icon(/** @type {olx.style.IconOptions}…
lios
  • 218
  • 5
  • 26
0
votes
2 answers

OpenLayers 4 extent.extend replacement

I am moving code from OpenLayers 3 to OpenLayers 4 (typescript) I had this piece of code that would extend my extent so that all vector shapes I drew would be visible when the map loaded... angular.forEach(webMapValues.vectorFieldLayer, function…
0
votes
0 answers

ol3 ext-ol how can make cluster for different layers

I'm using ol3/ol4 with ol-ext I create two layer: clusterSource = new ol.source.Cluster({ distance: distanceFt, source: new ol.source.Vector() }); // Animated cluster layer clusterLayer = new ol.layer.AnimatedCluster({ name: 'Cluster', …
SC-Gera
  • 11
  • 2
0
votes
1 answer

How to predict the future trajectory position and draw a line based on the current speed and course of the aircraft in openlayers 3?

I wanted to draw a vector line of the plane's current speed and heading to predict its future position, with a solid point added every five minutes. I didn't know how to do that. look like this
sueRimn
  • 21
  • 6