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

learn more… | top users | synonyms

0
votes
0answers
5 views

OpenLayers: showing polygon within donut hole

I Am using OpenLayers 2.13.1 to display Zip-areas. I have a postGIS database with multi-polygons, that I show on a map. The user can select / deselected them. Some polygons have an area (I think they ...
0
votes
0answers
4 views

OPenLayers z-Indexing Issue

I'm having a hard time figuring out how to order the stacking of 2 layers - here's a fiddle, where I try to put the polygon in the front to the back: http://jsfiddle.net/HD9yJ/6/ I've read several ...
0
votes
0answers
4 views

OpenLayers: programmatically fire ModifyFeature event

Does anyone know how to programmatically simulate a vector feature click that puts this feature from normal mode: to modifyfeature mode: I only have one feature inside the vectors layers and i ...
0
votes
0answers
11 views

Openlayers 3 Vector Layer error

Getting error from Firebug on running this code: TypeError: f is null (ol.js 409) The map is showing up properly. After adding the line : this.map.addLayer(vectorLayer); I get the mentioned ...
0
votes
0answers
6 views

Drag and Drop in Openlayers

I have a number of vector layers, I want to be able to drag a feature off the map and drop it into a native application. Note, I do not want to move the features around, I already do that when in a ...
0
votes
0answers
13 views

Adding a google Maps Layer to OpenLayers 2.14

I have a well-working map consisting of several layers in OpenLayers retrieved from geoserver. Now, I want to add a Layer from google maps. Since I did not find any working explaination in the web - ...
1
vote
0answers
13 views

OpenLayers not displaying map from WMS layer in GeoServer

I've adapted the working example from geo-solutions website but still it is not working, it seems the problem is with jetty. below is the previous question I'm using Geoserver with jetty web server, ...
1
vote
1answer
39 views

How to add Mapserver WMS to Openlayers 3

I have a WMS server on localhost (using MapServer and Apache and Windows). I want to add my WMS to Openlayers. but any example that i found use openlayers 2. How to add MapServer's WMS to OpenLayers ...
0
votes
0answers
18 views

OpenLayers not showing map from WMS layer in GeoServer

I'm using Geoserver with jetty web server, I've published WMS layer in GeoServer and when i call it from QGIS it works perfectly, but when i call it with OpenLayers it is not loading, it says HTTP ...
0
votes
1answer
42 views

Add Google Maps Layer to OpenLayers Page

<script src="openlayers.js"></script> <script src="http://maps.google.com/maps/api/js?v=3&amp;sensor=false"></script> <script type="text/javascript"> .... ...
0
votes
1answer
14 views

Openlayers 3 Export map with highlights and popups

I try to export map in openlayers 3 with this example (Export Map Example) and it works. But when I export the map I get this picture : However I want to get this picture with highlights and ...
1
vote
0answers
16 views

Parameters in a SQL View (Geoserver) and WFS Layer (Openlayers): can't get them to work properly

I'm relatively new to GIS, openlayers, geoserver and javascript in general. I have the following problem: I need to display a choropleth map by coloring the different areas in my map based on a ...
0
votes
1answer
25 views

openlayers display Control.MousePosition on div.olMap

I have a map displayed in a div. I have a small div named coordexterne displaying mouse position. I try to put the small div on the map so to speak above the map. Until now, the small div is always ...
0
votes
0answers
10 views

Programmatically draw first vertice of a path with OpenLayers

I'd like to help the user to input an orientation for a segment with OpenLayers. I have that form where user can input the bearing for a point, but I would like to help him by : start drawing the ...
1
vote
1answer
14 views

ol v.2.13 - Selecting features with draw or zoombox

I'm attempting to add a feature to a legacy mapping project. I need the user to be able to draw a rectangle and have the features/markers inside of it selected and pushed into the selected array. Is ...
0
votes
1answer
19 views

How can I add google map layer as additional layer (OpenLayer, OSM)?

I am total newbie when it comes to Geoserver, JavaScript etc. I have managed to get my map working and the layers from my localhost are showing on the map. Base layer is OSM but I would like to add ...
1
vote
0answers
9 views

Adding layers to an OpenLayers map from a WPS process automatically after processing

I want to process two layers visible from a an OpenLayers client map interface such as Geonode and then add the result of the output directly to the map automatically after the processing is finished. ...
0
votes
0answers
14 views

Openlayers popup for markers issue

I've trails in a webmap and wrote a function for adding start points of trails as markers to the map. Now, I'd like to put some text as popups on mouseover to these markers. I pasted the relevant code ...
1
vote
0answers
31 views

WMS or WFS for selecting features and show attributes?

I am beginner in MapServer and Openlayers. I want to be able to select features and show their attributes by user click. I don't need to edit any feature. I know this is possible with WFS, but ...
0
votes
1answer
12 views

OpenLayers - Click on a panel triggers a map click but it should not

I added a panel to a map that is contained inside an IFrame. Then I attach a click handler to the div of this panel with JQuery to toggle a control. However, I notice that a click on the panel also ...
0
votes
1answer
35 views

Load single image by map API and draw overlays

I have an image which I want to make it zoomable and dragable in browser, and draw some overlays like lines and markers on it. So I wonder if I can use the map api like Google map or openlayers to ...
1
vote
0answers
19 views

How to add a WFS layer to an OSM base layer from GeoServer

I'm sorry if I'm repeating what has been asked several times! I'm a novice in open layers and java script , please can some one tell me where i am making a mistake , below is the code which i used ...
1
vote
0answers
13 views

Retrieve list of all features and values from raster layer (Geoserver and Openlayers)

I'm trying to retrieve a list of all values from a raster layer (GeoTIFF) in geoserver (2.5.x). I tried to modify the code from http://trac.osgeo.org/openlayers/wiki/GetFeatureInfo but I can't seem ...
0
votes
2answers
19 views

Adding Drawn Feature to existing Layer

-A layer that contains multiple features - I want to draw new features with new OpenLayers.Control.DrawFeature and to add them to my layer. var control = new ...
2
votes
2answers
24 views

Return Image from WMS service

I asked this question, and I realize that I am going in the wrong direction. So, I would like to do this : var geom = new THREE.Geometry(); // push vertices here var some_material = new ...
1
vote
1answer
21 views

Comparing two maps with two different libraries

I'm currently making a demonstration to compare the two OpenLayers libraries (2 and 3). For doing this, I have made two div elements and put the different maps on each other. The goal is to make a map ...
2
votes
1answer
17 views

Openlayers: Parsing GeoJSON-properties results in a “data”-property in feature

I'm using OpenLayers 2.12. I try to load a GeoJSON-response from server and (nearly) everything works fine: but the properties contained in the GeoJSON-response ("nummer" and "befund" below) were ...
0
votes
0answers
14 views

Inserting newly drawn polygon as feature in existing layer

I draw a polygon that I want to save in the existing WFS layer as soon as it gets created. var control = new OpenLayers.Control.DrawFeature(existing_layer,OpenLayers.Handler.RegularPolygon); ...
1
vote
2answers
41 views

OpenLayers 3 or 2

I am beginner in OpenLayers and am starting with the www.openlayers.org documents, which use OpenLayers 3 to teach the basics of OpenLayers. Now, I would like to add layers from Google Maps and ...
2
votes
2answers
37 views

why use openlayers with mapserver?

i am beginner in mapserver and openlayers. i start with mapserver and now studying openlayers and see openlayers can render vectors directly. my questions is : why use mapserver inside openlayers ...
0
votes
0answers
11 views

Displaying ESRI WMS layers in OpenLayers 3

I'm looking for an example that demonstrates how ESRI WMS can be displayed with OpenLayers 3. In OpenLayers 2, we had a OpenLayers.Layer.ArcGIS93Rest class (see example and docs). layer = new ...
0
votes
0answers
5 views

OpenLayers gx_geocodercombo returns syntax error

I try to implement a gx_geocoder combobox... { xtype: "gx_geocodercombo", hideTrigger: true, emptyText: 'Enter address (streetname housenumber municipality)', width: 350, layer: ...
0
votes
1answer
13 views

OpenLayers 2: WFS layer not being portrayed in map canvas

I have a "rich" application (OL 2.13 + GeoExt 1) where some layers must be styled dynamically according to user input. I am able to add a vector layer using WFS and then apply a style rule. Recently, ...
2
votes
1answer
41 views

Save Polygons as new Features in geoserver

I enabled the functionality to draw Polygons, as in the example. http://dev.openlayers.org/examples/draw-feature.html Now I want that, once I created a polygon, this polygon is saved as a feature ...
0
votes
1answer
16 views

Add Marker on the polygons' centre using Openlayers?

I have written a code to draw polygon from the WKT format.Now I need to add the marker at its centre. In the following code I have passed the centre and shape in WKT format(extracted from database). ...
3
votes
1answer
22 views

Label Style is converting decimal String names to Number

The feature.attributes.fid returns a String value like "9.3210". But on the map, this value is being converted to some number type and on map is showing the value 9.321 (without the 0). var ...
1
vote
1answer
32 views

How can I render the postgis layer to the openlayers map viewer?

I have a postgres table which is storing the dynamic GPS point data. The geom column has been created. Is it possible to render the last 10 mins GPS data to the OpenLayers map? Is there an example? ...
0
votes
0answers
18 views

getCenterLonLat differs from init values

bounds = new OpenLayers.Bounds(); bounds.extend(new OpenLayers.LonLat(36,57)); console.log(bounds.getCenterLonLat()); I expect something like Object { lon=36, lat=57, ... } I get some Object ...
1
vote
0answers
35 views

What is wrong with my WFS-T protocol setup?

So I want to transfer some Vector Layer Features from javascript code to my geoserver and then to postGIS, my code looks like this: saveStrategy = new OpenLayers.Strategy.Save(); ...
0
votes
1answer
14 views

log the coordinates of mouse poisition

Is there a simple way that I can access the coordinates (according to my used projection) and make them visible, like console.log(currentX+" "+currentY); ?
2
votes
1answer
41 views

Openlayers 3 Max Extent

I want to restrict where the user can pan on the map, but I can't seem to find any resources that tell how to set the max extent of a map view in OpenLayers 3. I know there was a solution in ...
2
votes
0answers
26 views

geoserver and openlayers select rectangle pixel values

I'm running a geoserver (2.5.x) with 1 raster file (GeoTIFF) as a layer. From my application I can access a single pixel value when clicked (through WMS), but what I'm really interested in is to get a ...
1
vote
0answers
26 views

Add WMS from geoserver to openlayers with OSM baselayer

I am new to javascript/the openlayer. Maybe you can provide me with some help. I would like to add a wms layer (BLD_504) from dwasa (workspace) locally. The code is as follows: <title> ...
1
vote
2answers
50 views

Openlayers 3 detect the layer by mouse move

I wanna do something like this ; Openlayers 3 Vector Layer Example But I don't want to one layer, 3 or more layer on the map and get feature like the example. How can I seperate the layer ...
0
votes
0answers
12 views

How to get feature on vector layer in Openlayers 3?

I'm try to get feature of a vector layer, but I'll have 3 or more Vector layer. When I click the map, I didn't get the feature. My vector layer definition; var vectorAltAlan = new ol.layer.Vector({ ...
2
votes
0answers
36 views

OpenLayers preview problem?

I just want display shapefile (.shp) that I have made in QGIS in openlayer geoserver. but There is a strange object that appears. I want to ask how to get rid of the strange object.
1
vote
2answers
50 views

Viewing large set of polygons in PostGIS using OpenLayers?

I am prety new to GIS. I have set up a postgis database with al large dataset and a openlayers front-end to display it. But since the dataset is getting prety big I am looking for a way to only load ...
2
votes
1answer
22 views

OpenLayers Full Screen control not working

I have a problem with openlayers controls. I have 2 controls which are perfectly working, var mousePositionControl = new ol.control.MousePosition({ coordinateFormat: ...
1
vote
0answers
15 views

How to emulate OpenLayers button click in C#

I'm trying to call a click of a user using C # with the following code ( " C # : GeckoWebBrowser.Navigate ( javascript : void ( Document.getElementById ( ' idOfElement ' ) .click ( ) ) " ) ; ...
2
votes
1answer
42 views

OpenLayers 3 measure example

Here is my fiddle, which is exact copy of Openlayers 3 measure example. What am I doing wrong when my fiddle isn't working? I can't see the blue dot to start measuring my path or area (same problem ...