OpenLayers is a JavaScript library for creating dynamic map widgets for web sites.

learn more… | top users | synonyms

2
votes
4answers
104 views

Sites that demo freely available Basemaps

I've seen such sites in the past. I remember seeing one put together by Wm Lerer at a conference a couple years ago. What I'm looking for is a map that demonstrates all (well, at least a lot) of the ...
0
votes
0answers
12 views

openlayer wfs protocall reset on map zoom

By considering wfs-example example. I have added one layer on map with BBOX and savestrtegy and add controls(add,delete,modify and save). wfs = new OpenLayers.Layer.Vector("Editable Features", { ...
0
votes
0answers
15 views

How can I zoom to featureset geometry item

I send GetFeatureInfo request to server with ajax and get the featureset data. I want to zoom a selected feature. Object {type: "Feature", id: "mydata.39025", geometry: Object, geometry_name: "geom", ...
0
votes
0answers
17 views

Save polygon feature type is not working

I am using following code to save feature. But the following code is not working for Polygon Handler but when I changed it as Path or Point that is working fine drawline= new ...
2
votes
1answer
88 views

Dynamically change location marker based on user's input

I have the following code for displaying OSM with a predefined feature. I am using OpenLayers3: var wmsLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); var ...
2
votes
0answers
17 views

Using MapFish to Print vector with filter based style?

Is it possible to define an OpenLayers WFS style, which is based on filters, to MapFishPrint request?
2
votes
1answer
25 views

Zoom to spatial cordinate in openlayer load

I am working on a project that uses openlayer to show shapefiles from the Geoserver and then show them on google map. The only problem is when the page loads, I want to go to the spatial cordinate and ...
1
vote
1answer
35 views

Select buildings in a html map and get osm

I have my own database of buildings with the architects and some metadata. In the past I tied them manually to the ID of openstreetmap. But now I need a map where I can click on a shape of building ...
2
votes
1answer
102 views

openlayers display projection

I'm displaying coordinates in epsg:900913 using ol.control.MousePosition() with OSM. I'd like to convert these on the fly in another epsg:2154. I call in the header : <script ...
1
vote
1answer
64 views

Display data from geoserver on click map with openlayers

I tried to display data with popup from Geoserver or Postgres to my map, but it dosen't work at all. Can anyone please help me? I used this code: function Info(e) { if ...
0
votes
0answers
14 views

Openlayers map changelayer event firing twice for params

I have registered changelayer event of my map. var registerEvents = function () { map.events.register("changelayer", null, onMapLayerChanged, true); }; var onMapLayerChanged = ...
0
votes
1answer
32 views

OpenLayers Drag&Drop a pin to select position?

Is there an OpenLayers example that allows the user to set a position with drag&drop. I would like to have a pin and set the position after the user drags & drops the pin to a new position.
0
votes
0answers
18 views

Openlayers complex markers

I have an example that displays an image as well as a string for each marker. My designers want the string to be displayed on top of the image and I don't know how long the string can be. Also I need ...
0
votes
0answers
47 views

OpenLayers 3 and Interactions - Select and Draw

I'm trying to make small app with OpenLayers3. I want to use two interactions - select and draw. Unfortunately when selet adding it's style to draw and remove other (selected earlier) features from ...
1
vote
0answers
63 views

Openlayers heat map not displaying properly in html

I was wondering if you could help me with something I am trying?? Created a heatmap from a sql point table using sld in GeoServer. Displays fine as a preview:- It looks tiled when I publish it to ...
1
vote
0answers
25 views

Add and Remove layers in openlayers on-the-fly

I am using OpenLayers 2.13.1 in my application and I have a couple of layers which need to be added/removed to the map on-the-fly. Here are the core codes: var layers=[layer1,layer2,layer3]; // ...
1
vote
1answer
19 views

Change Control MousePosition displayProjection

I added mouse control on the map with Lat/Long as display projection. I added a dropbox on the map for the user to choose a coordinate system (3 choices). Depending on the selection, I would like to ...
1
vote
0answers
40 views

Using Geoserver

I am new to GIS and interested in using Geoserver. I have had a look at tutorials and read some books on this but still feeling clueless. I intend to use C# to accomplish some tasks eg, plot points on ...
2
votes
1answer
48 views

Layer name in OpenLayers 3.0

I'm looping through all the layers in my map using map.getLayers().forEach(function(layer, i) { ... }); I'd like to get the name of each layer but I haven't been able to find anything in the ...
1
vote
1answer
28 views

Display data from postgresql on click map [duplicate]

I work with openlayers and geoserver. I'm searching for code that when I click on a point of a layer on the map, a popup window appears that contains information from the database (postgres) for this ...
1
vote
0answers
21 views

WMTS not numbered from 0/0 with OL3js

I am requesting a WMTS which does not number tiles from 0/0, but from some arbitrary given number. Is it possible to deal with this with openlayers 3? I thought WMTS should have defined first tile of ...
0
votes
1answer
11 views

Is OpenLayers compatible with OGC WKT SRS definitions?

I'm trying to use WKT in OpenLayers. Proj4js seems to have no problem with this but the OGC definition describes the units as "US survey foot" whereas OpenLayers has an INCHES_PER_UNIT definition of ...
1
vote
1answer
20 views

wmsgetfeatureinfo and GWC

I have one layer group glayer1 cached and I get the tiles from GWC. In glayer1, some layers are not queryable. I have layer2 which is queryable and contains short information. glayer1 is visible, ...
0
votes
0answers
27 views

OpenLayers layer mergeNewParams handle event or callback

I am changing the CQL filter of my WMS layer. var layer = new OpenLayers.Layer.WMS( "MyLayer", "url", { layers: "PGSA:myLayer", transparent: true }, { isBaseLayer: false } ); When ...
1
vote
1answer
35 views

OpenLayers get single layer from WMS multiple layers

Openlayers enables to declare multiple layers in one WMS layer class. var nasa_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", "http://wms.jpl.nasa.gov/wms.cgi", { ...
1
vote
1answer
292 views

Change OpenLayers 3 view center

I'm using OpenLayers 3 to interact with some maps. I first declare my map: map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ ...
3
votes
1answer
59 views

OpenLayers: How to get *real* centroid of a Line Geometry/Feature?

I have declared a line geometry as: var lineString = new OpenLayers.Geometry.LineString([source,target]); then I am trying to get the centroid of this lineString as lineString.getCentroid(). But ...
1
vote
1answer
44 views

How works Openlayers GetFeature Filter strategy

I want to select on map that "res_id = 182" but that is selecting all objects on the map. var filter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, ...
3
votes
1answer
124 views

Projection is undefined - OpenLayers 3

New to using OpenLayers 3 I want to display two layers from GeoServer: An image layer and a vector layer. So far I have the following: // Aerial Tile Layer var aerialLayer = new ...
0
votes
1answer
26 views

OpenLayers ArcGIS93Rest symbol size

I'm using OpenLayers 2 to display ESRI WMS data (ArcGIS93Rest layers). The data I'm displaying contains symbols (and sometimes labels) and I'd like to increase the display size of these symbols ...
1
vote
0answers
52 views

Openlayers proxy.php Curl settings for geoserver

We have to use a proxy to send a request to geoserver. I created a php file like this. OpenLayers.ProxyHost = "proxy.php?url="; is Openlayers settings. localhost/myapp/proxy.php is my proxy ...
1
vote
1answer
33 views

Get a list of property elements using GeoServer

I'm using GeoServer with openlayers and I want to build a filter check-box dynamically, depending on the elements of this column: How can I query GeoServer so that I get a list of the different ...
2
votes
1answer
116 views

How to draw WMS layer with Attribute-Based Dynamic SLD to HTML Canvas?

I'm working on an app using geoserver and openlayers 2.13.1. I have several wms layers and I need to export whatever in my openlayers map div as an image. After researching, I found this blog: ...
0
votes
1answer
51 views

Cluster numbering in openlayers

I am using openlayers 2 for making clustering on vector point data for which I am a beginner. I have installed geoserver locally via opengeo suite and using 'world_cities' dataset as an example. I ...
1
vote
1answer
43 views

Openlayers pan/zoom on windows 8 app

I'm building a windows 8 js application with an Iframe that uses openlayers with google as the basemap. Everything is working except for the map navigation. When I try to pan or zoom with my finger, ...
0
votes
0answers
14 views

How to make a popup containing links?

I have a list of links taken from a GeoJSON file. What I want to do, is program a popup with all these links inside, with OpenLayers. So, I wrote a function which returns a string containing HTML ...
1
vote
0answers
41 views

Trying to display GeoServer layer controls but nothing is coming?

I am a beginner with GeoServer trying to display layer controls but nothing is coming. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>GeoServer Layer</title> ...
1
vote
0answers
64 views

OpenLayers - Add points at vertices of line while drawing line

I would like to create points while I draw a line on my map in OpenLayers. That is, at each vertices of a line and at the end points there is a shape like a square, circle, or diamond. I have this ...
1
vote
1answer
15 views

Problems while rendering with Atlas

when I export my data genereated with the openLayers using Atlas rendering is always incomplete. Atlas is rendering too fast so that the data from openLayers is not completely loaded. Do anyone ...
0
votes
0answers
23 views

using WMS feature with OpenLayers object

I am sending query to a WMS address URL and getting results like following. data: { features: [...], totalFeatures: 2, type: "FeatureCollection" } I want to use features to calculate their ...
1
vote
0answers
15 views

Open Layers serverResolutions on WMS don't limit layers loaded

I'm building an animation that show an animation of +/- 40 WMS layers. This unfortunately gives some memory issues with OL 2.13 in all browsers but only in IE for OL 2.12. To circumvent this problem ...
2
votes
1answer
81 views

openlayers display labels

I am displaying and labeling a polygon Layer using a geojson file and the field nom_comm. I would like to label the polygons between two scales i.e. two zooms. (So to speak, labels are to be ...
2
votes
1answer
65 views

openlayers leaflet and popup

I am working on a map mixing openlayers and leaflet librairies (it is possible, correct ?). I am such a beginner that, after lots of readings, I thought creating popups was less difficult for me ...
0
votes
0answers
44 views

OpenLayers 3 TypeError: a is null loading WMS Layer

I am trying to load a WMS Layer and am getting the following javascript error: a is null (ol.js:145) Here is the code: <!doctype html> <html lang="en"> <head> <link ...
1
vote
1answer
209 views

OpenLayers 3: “goog is not defined”

First time using OpenLayers. I am getting an error "goog is not defined". Here are the steps I performed: Downloaded and unzipped v3.0.0-gamma.4 It created the following directory structure: ...
0
votes
0answers
20 views

openlayers clickevent for undercoat features polygon on multiple vector layers

I'm using two timers that give me coordinates and some data for my features (Sensors(de Sensoreinheit) & receiving unit (de Empfangseinheit)), deleting all features on the Layers and placing new ...
1
vote
0answers
22 views

Openlayers text symbology is not being shown

I have a Vector Layer in a .json file: { "type" : "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Station_Id":107, "NAME":"ARDEBIL(F)","ELEVATION":"1314.3"}, ...
0
votes
0answers
74 views

Proxy.cgi for OpenLayers reading from GeoRSS but not from WFS

I'm having trouble with the standard proxy.cgi written in Python for OpenLayers. Here's my code: #!C:/Python27/python.exe -u """This is a blind proxy that we use to get around browser restrictions ...
2
votes
0answers
34 views

Dividing a polygon into two OpenLayers

I'm using OpenLayers to draw a polygon to my users. I want the ability to implement through a line, split the polygon into two, with the cutoff line that the user drew. Does anyone know if this is ...
0
votes
1answer
73 views

How to calculate the Azimuth between two points in PostGIS?

I have a GIS API based on OpenLayers. I have been trying to implement Azimuth calculation in JavaScript and I needed some way to calculate the Azimuth in order to perform tests. I started using ...