Questions tagged [openlayers]

OpenLayers is an open source Javascript web mapping library for creating web map applications.

OpenLayers is a JavaScript library which implements an API for developing dynamic map widgets on the web. The library provides tools for presenting and editing geographic information using pure JavaScript with no server-side dependencies.

OpenLayers supports several different access methods for geographic data, including the OpenGIS Web Mapping Service (WMS) and Web Feature Service (WFS) protocols from the Open Geospatial Consortium. Other supported geographic data sources include OpenStreetMap, Bing Maps, and ArcGIS Server. See the OpenLayers live examples page or the documentation for more comprehensive details.

OpenLayers is a project of the Open Source Geospatial Foundation (OSGeo) and is released under a BSD-style license (also known as the BSD-2-clause).

Books

OpenLayers Cookbook

Tag Usage

When asking a question with the tag, please mention the OpenLayers version you are using - especially for coding related questions.

5064 questions
1
vote
1 answer

Unable to Load Vanilla GeoJSON in Openlayers 5

I'm starting with some valid GeoJSON which I've built using https://geojson.io. My desire is to load it in an Openlayers 5 map. I started with this tutorial, and attempted to use a remote source in place of a local one. The relevant block looks…
brianbancroft
  • 463
  • 3
  • 17
1
vote
1 answer

cross origin request blocked in openlayers- problem in accessing geoserver feature layer

I am working on openlayers with xampp and geoserver. My openlayer application is running on URL http://localhost:8008 I am trying to access a URL http://localhost:8080/geoserver/workspace But I am unable to access it. In browser console I have…
Ashutosh Mishra
  • 103
  • 1
  • 6
1
vote
1 answer

Dynamically change point/marker on click Openlayers 5

I am having issues trying to implement a dynamic marker in my OpenLayer Map widget. I would like that a marker/point is placed on the map "onclick". Instead of placing a new marker/point each mouse click, I would like the marker to be be refreshed…
NRav
  • 407
  • 1
  • 6
  • 18
1
vote
2 answers

How to draw linestring from consecutive points of array in openlayers

I am trying to draw LineString in openlayers with consecutive Points to give it a feel of animation like it is drawing from start to end. I tried to achieve it by following this example. All references of OL2 are converted to OpenLayers 5, but…
capnam
  • 429
  • 9
  • 25
1
vote
0 answers

Problem of Projection when adding a MultiPolygon geometry

When I add a MultiPolygon geometry which has been draw by an user on my map, the geometry not displaying at the place where i draw it. It display at a different place. I send the geometry to my api which his goal is to add the geometry in my postgre…
1
vote
2 answers

How do i save the js filereader result into a variable for futher use?

I'm trying to upload a local .json file into my web application. I have already come to a point where I can display the file in the dev tools, but I cannot make it available for further use. I suspect the problem to be in the way I handle (or don't…
jdoe
  • 99
  • 3
  • 14
1
vote
1 answer

How to combine view position with animation?

I want to implement a "track up" map view, where the current position is not in the center of the map but 1/4 of the map height from the bottom (like standard navigation systems are in track up mode). I found this to be working with [centerOn]…
ASI
  • 11
  • 2
1
vote
1 answer

put text in the middle of drawn areas Open Layer

I have kml files with Polygons. Each set of polygons(each kml) has a name. When I show polygons on map, I also show their name. The issue is that the same text appear in every polygon, while I would like the text to appear once only, in the middle…
user0810
  • 886
  • 5
  • 19
  • 33
1
vote
1 answer

OpenLayers multiple georeferenced images

I need to display specific maps over certain places. The maps are stored in image files ( JPG ) with know georeference. The rest of the view is filled by standard XYZ tiles. In order to display 1 image ( according the documentation ), I can use new…
user3523426
  • 836
  • 3
  • 11
  • 26
1
vote
1 answer

Add a rotated satellite image on the map using OpenLayers 5

I'm trying to add a satellite image on my map using OpenLayers 5. The problem is that I'm not able to do this, because I've just found an option to add an image on the map passing the image extent (xmin, ymin, xmax, ymax) and not the bounding box.…
rmmariano
  • 896
  • 1
  • 18
  • 32
1
vote
1 answer

WMS BBOX parameter not showing the box but whole world

I am trying to call a WMS service but the BBOX parameter doesn't seem to be working. The problem is that BBOX value isn't taken into account and still the whole world is shown. My code is as follows map = new ol.Map({ target: 'map', layers: [ …
lios
  • 218
  • 5
  • 26
1
vote
0 answers

Open layers 4.5 Tap/Touch on a Point (Android Devices)

I am trying to create a tap/touch on a feature to handle some action. It works on the Chrome browser. But when I install the apk on the Android phone/tablet it does not work. My environment: - Cordova 8 - Angular 6 - Open Layers…
1
vote
1 answer

How do I create custom geometries in OpenLayers?

I'm in the process of adding a some drawing tools to a map using OpenLayers v5. Once such task requires a custom drawing that is not covered in the docs or out of the box: concentric circles. I don't really know where to start so I have two…
jktravis
  • 1,427
  • 4
  • 20
  • 36
1
vote
2 answers

Problem when add a new control on map using OpenLayers and Vue.js

I'm trying to add a custom control on my map using the OpenLayers with Vue.js. I have the component Explore.vue that creates my "map" (olmap) using the OL and I pass it through binding to the child component LeftSideBar2.vue. When I try to add a new…
rmmariano
  • 896
  • 1
  • 18
  • 32
1
vote
1 answer

Openlayers how do you style drawn linestring different than what you are about to draw

I have a openlayers map which has draw interaction. When user starts drawing a linestring on the map, the portion of linestring drawn should look different than what the user would draw next. In brief when user drops a point on the map, the line…
capnam
  • 429
  • 9
  • 25
1 2 3
99
100