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.

4405 questions
1
vote
0 answers

Wrapper for migrating from OpenLayers 2 to 3 or 4?

How can I migrate my application from OpenLayers 2 to OpenLayers 3 or 4 without any code changes? Is there any wrapper which support OpenLayers 2 code structure but actually call the OpenLayers 3 or 4 methods? For example, when I run…
Ahmad Payan
  • 1,933
  • 1
  • 19
  • 31
1
vote
2 answers

How to force load tiles for lower resolution

How to load tiles from higher zoom level (lower resolution) on lower zoom when lower zoom level tiles are not available at all ? Is this possible ? For example: I have tiles for zoom 8 and higher and need that map on zoom 6,7 load tiles from zoom 8…
marioosh
  • 24,528
  • 42
  • 132
  • 181
1
vote
1 answer

OpenLayesr map 4 Panning/Dragging is not working in C# project

I am developing a desktop project using Visual Studio and C# and I have an Open Street Map in my application. Everything is working good expect panning with mouse. I search a lot on Google and stack-overflow but no success, that is why I decided to…
Manish Srivastava
  • 1,780
  • 2
  • 14
  • 23
1
vote
1 answer

Angular 2 + Openlayers No provider for SourceVectorComponent

I'm new in Angular 2, and i'm building dashboard application with openstreet map, thus i use this Angular2-openlayer. When i try implementing this code
bagas
  • 13
  • 3
1
vote
1 answer

OpenLayers library renders MapServer WMS layer with errors

I have set up MapServer WMS service with a point layer. And now I'm trying to write a simple WMS client using OpenLayers library. Generally, I have got some results, but with some issues. Some points are smaller than others. I have tried to connect…
bestjack
  • 11
  • 3
1
vote
2 answers

Drawing MultiPolygon with different style for each component in OpenLayers

I have a OpenLayers.Feature.Vector created as follows: var multiPol = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon([polygonGeometry1,polygonGeometry2])); Both polygons represent same logical object (an "entity") on a map, say…
gregorej
  • 561
  • 5
  • 18
1
vote
1 answer

OpenLayers 4 only getting user's location on localhost

So, I'm using OpenLayers 4 and trying to get the User location to set a marker on the map. On localhost it works fine, it tracks user's location and set the marker on the map But when I acess the site via local ip from another device it don't even…
ygorazevedo
  • 475
  • 4
  • 13
1
vote
1 answer

OpenLayers: how to style GeoJson properties

Hello I need to display some text below each point from a GeoJson layer in an OpenLayers map. I have a GeoJson source and I'm able to plot Points at right coordinates on the map. I would like to draw also some text below the Point and the text is…
ariaveta
  • 21
  • 2
1
vote
1 answer

Smoother loading of tiles in OpenLayer

I would like to improve the loading experience of my maps displayed with OpenLayer. At the moment, the loading of new tiles is not very smooth, especially when loading tiles in an empty area of the map. I would like to animate the apparition of the…
Olivier Amblet
  • 703
  • 3
  • 16
1
vote
1 answer

autoPanMargin in Openlayers is not working in IE

I have an overlay in openlayers and I am providing the autoPanMargin of 100 pixels. It will work fine Chrome but in IE 11 if we click on the right side it will not work. According to the API, autoPanMargin is the margin (in pixels) between the…
Naveen Kumar H S
  • 1,252
  • 14
  • 27
1
vote
1 answer

How should Openlayers RegularShape radius 1 and radius 2 be used to generate a star?

The Openlayers documentation for ol.style.RegularShape says: radius number | undefined Radius of a regular polygon. radius1 number | undefined Inner radius of a star. radius2 number | undefined Outer radius of a star. My interpretation is…
Son of a Beach
  • 1,442
  • 1
  • 8
  • 26
1
vote
0 answers

OpenLayers 4 and WFS (GML)

I am trying to display a geometry trough a WFS in OpenLayer 4. The problem is that using the following snippet of code.. The request is succesfull, I can see the XML (wfs gml) data in the response (using firebug) but the polygons are not visible. It…
user9370976
  • 117
  • 1
  • 1
  • 11
1
vote
1 answer

How to load image and extend it to fit the bound using openlayer 3

I'm using open layer 3 to load image into layer. Some images are either bigger or smaller than the container size. How to scale/zoom the images being loaded to fit well inside the container? I cannot find relating examples from open layer official…
connie
  • 97
  • 1
  • 7
1
vote
1 answer

openlayers 3 icon offset and rotation

I have the following problem: http://imgur.com/a/gORfM. JSFiddle added: https://jsfiddle.net/AJR80/phwq2v1k/ This is the code I use for the arrow... Rest can be seen in JSFiddle. var style2 = new ol.style.Style({ image: new…
Antti
  • 33
  • 1
  • 7
1
vote
0 answers

How to add objects from GeoJSON to OpenLayers map one at a time?

Let's say I have three lines each stored as a LineString to put in a GeoJSON. How can I access an individual LineString and add it to be displayed on an OpenLayers map? I know I can use something like: var vectorLayer = new ol.layer.Vector({ …
srysry
  • 133
  • 1
  • 9
1 2 3
99
100