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
1 answer

Openlayers 3 forEachLayerAtPixel get only layer

I am working Openlayers 3. I added three layers WMS on the map in order as follows: Commune, District, Province. I used "forEachLayerAtPixel" to get information of the current layer when zoom. Example: When zoom to layer District then get…
1
vote
1 answer

Magnifying Tiles in OpenLayers 2 or Increasing MaxZoom Without Distorting Projection

I am using OpenLayers2 with Bing. My customer requires a deeper zoom level to interact with the maps. Currently, the max zoom level I can achieve is 19 which I tested with the getZoom() function. I have tried to set the "numZoomLevels" in the map…
td-edge
  • 538
  • 1
  • 6
  • 18
1
vote
1 answer

I want to change this random function to onclick function

I am actually creating circles on page randomly and I want to draw these onclick function. But Which code I have is random function which randomly distribute on page. So how can I change this code to onclick ? …
tousif Noor
  • 168
  • 2
  • 15
1
vote
1 answer

Is it possible to extract style information from GeoJson for an openlayers javascript map?

I have a geojson file structured like this: { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": { "marker-color": "#4620dd", "marker-size": "medium", "marker-symbol": "park", …
1
vote
1 answer

OpenLayers display feature property on map on Select interaction

I have working feature select interaction on pointerMove working and highlighting feature. One more thing that I would like to get is to display feature property on selected feature. I would like to get on map on that particular feature not on new…
mysiar
  • 392
  • 1
  • 3
  • 11
1
vote
1 answer

OpenLayers animate getView().fit()

I've been looking at the animation features of openlayers and I can see how simple it is to zoom to a given point and resolution using view.animate({ center: position, zoom: 11 }); but what I can't figure out is how to…
mat-mcloughlin
  • 5,944
  • 11
  • 40
  • 58
1
vote
0 answers

Draw Circle by getting Input from Textfield in OpenLayer2

I want to draw a circle on a map. Can anyone help in drawing circle on map by taking values from user in Openlayer2 ? Thanks in advance.
tousif Noor
  • 168
  • 2
  • 15
1
vote
1 answer

What is the proj4js projection code for the Gall-Peters Projection?

Does the Proj4JS library support the Gall-Peters projection? I can't seem to find a projection acronym for it?
winwaed
  • 7,355
  • 6
  • 30
  • 78
1
vote
2 answers

Updating feature styles in OpenLayers 3

I am pulling data from a 3rd party API that gives me lat/lon coords as well as a status for the point. I am currently able to successfully plot the points and give them the correct style for their status on the first iteration. However, every 3…
Truextacy
  • 532
  • 1
  • 4
  • 21
1
vote
0 answers

Geoserver Cross-layer filter in OpenLayers 2 for WFS protocol

I need to execute a spatial INTERSECTS query between layers of type Point and Polygon, to find points that intersect with a polygon of attribute fclass == park. CQL Query: INTERSECTS(geom,…
1
vote
1 answer

Static Image Layer Performance Issues - Open Layers 3

I am receiving data points in lat/lon. I need to plot all of these on a static image in OpenLayers 3. I am not using OSM or anything else, my image should be the base layer, with a vector layer (the points) on top. I got it working by adding the…
Truextacy
  • 532
  • 1
  • 4
  • 21
1
vote
1 answer

OpenLayers map with two layers from two different sources zoom differently. Can OpenLayers change how zoom levels behave?

In our application we are using OpenLayers.js version 3.20. We have a customizable setup, so that the application can show a map consisting of a number of layers from multiple sources. Now, in a specific customer setup, we have a map layer…
NilsAndreas
  • 171
  • 2
  • 9
1
vote
2 answers

Rotate labels on tiles generated by Maperitive

I'm using custom generated tiles on web map (displayed using openlayers). Tiles are generated by maperetive and it's great. However my map is rotated -3/4Pi (openlayers has this feature) and many labels are rendered upside down. I belive maperitive…
ambienthack
  • 380
  • 4
  • 8
1
vote
2 answers

with openlayers , how do i make sure the markers in TWO layers are all dsiplayed

I have markers in two marker layers,which i need to keep separate, so I can clear one or the other in the application. What is the best way to make sure all markers are displayed. Doing it for one layer is easy with zoomToExtent. But how to do it…
GilShalit
  • 5,364
  • 8
  • 37
  • 54
1
vote
1 answer

How to get a SRS/CRS name from geoserver?

I received a list (XML) of SRSes by request: http://gis1:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities then parse it and get a list of EPSG codes like "EPSG:1234" How I can now get a name of specific SRS like "Pulkovo 1942 /…
1 2 3
99
100