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

learn more… | top users | synonyms

1
vote
1answer
18 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 ...
1
vote
1answer
11 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 ...
2
votes
1answer
153 views

Openlayers map WMS stretched by latitude

I am working on a small javascript application for displaying map with WMS layers from 2 servers. The problem is, that image is stretched by latitude, it is wider, as it should be. This is is how it ...
0
votes
0answers
10 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 ...
0
votes
1answer
14 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 ...
2
votes
1answer
292 views

How to drag a feature in Open Layers 3

I'm trying to replicate something that was fairly easy in Open Layers 2 in Open Layers 3, which is: dragging an existing feature to a new location on the map. In Open Layers 2 I just added a ...
0
votes
1answer
159 views

How to Represent large data using google map api in javascript

1) I am trying to represent data using bins as the data was too large to display each and every point simultaneously. but the problem with this also existing if the no of bins are getting larger ...
2
votes
2answers
34 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 ...
1
vote
0answers
7 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
33 views

Can I use Node.JS as backend programming language combined with Openlayers and postGIS? [closed]

Would you recommend it or there is another one that works better with those?
0
votes
1answer
126 views

How to set the length of a line using openlayers

I'm trying edit a polygon by changing the length of some lines by code. Found this method to calculate based on the bearing. But I didn't find anything on how to calculate the bearing, before I start ...
2
votes
3answers
925 views

OpenLayers.Format.GeoJSON throws an exception “SyntaxError: JSON.parse: unexpected character” for valid JSON

In my GeoExt client, I have the following line that retrieves JSON data from a web service into a FeatureStore: var store = new GeoExt.data.FeatureStore({ layer: route_layer, fields: ...
0
votes
1answer
128 views

WMS - Export Retrieved XML Data

I use WMS layer in my app and could successfully retrieved Feature Info by click like so: http://openlayers.org/dev/examples/getfeatureinfo-control.html My question is: Is there any way to export the ...
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 ...
0
votes
1answer
31 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 ...
2
votes
2answers
3k views

Openlayers & WMS - GetFeatureInfo problem

I'm making a small project but I encounter some problems. Let me explain that : Having generated mapfile with mapserver and they are viewable by the openlayers interface, I would like to make me ...
1
vote
0answers
27 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
11 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
2answers
18 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 ...
1
vote
0answers
10 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 ...
2
votes
2answers
21 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 ...
0
votes
1answer
206 views

WMSGetFeatureInfo Not Returning Results

I am having a problem getting the results back from a WMSGetFeatureInfo call to my GeoServer. Using OpenLayers 2.12, GeoServer 2.4.0, Windows Server2008, and Microsoft IIS 7.5 with Application Request ...
1
vote
1answer
260 views

SQL Data: How to draw circles with a radius based on lat/long data in DB

I have a . sqlite file with many columns, two of those columns being lat and long. I've been searching around for a bit now (don't think I want to be using BuildCircleMbr from spatialite?) but I'm ...
0
votes
2answers
212 views

javascript function to search all OpenLayers vector features covering a pixel

I have an OpenLayers map that draws features in a vector layer. The features are selectable and have a popup on select. Unfortunately in a lot of cases the features overlap so it can be impossible to ...
2
votes
1answer
405 views

combine two OCG filters in Openlayers : ERROR: invalid input syntax for integer

i need to combine two OCG filters. each one works fine separably but if i combine them using Filter.Logical.OR, the first one works only. var c_filter = new OpenLayers.Filter.Logical({ type: ...
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
1answer
245 views

Openlayers FramedCloud popup appears in the wrong location

I have an application that is using OpenLayers 2.13.1. It is utilizing a bing basemap and overlaying WMS layers. I am using a FramedCloud popup. I would like the popup to appear where the user clicked ...
0
votes
0answers
13 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
38 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 ...
0
votes
0answers
8 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
1answer
233 views

Overlay wms + google layer in Openlayers

I want to use OpenLayers, GeoServer layer with the google maps api as a base. In my GeoServer layer is redesigned to EPSG: 900913 when I open the geoserver openlayers with everything ok. On a map ...
1
vote
1answer
110 views

Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination?

I am developing an web GIS for map data presentation for public. Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination or similar? More Details: ...
0
votes
1answer
263 views

Openlayers 2.12 - add selectFeature to button results in “Geometry Undefined”

I have modified the Openlayers mobile Vienna WMS example, and am trying to change the labelButton to allow selecting of features to open a popup. I think it is necessary to do this as on a touch ...
0
votes
1answer
11 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, ...
0
votes
0answers
4 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: ...
3
votes
1answer
19 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 ...
5
votes
1answer
1k views

WFS-T: changes not saved on an OpenLayers map

I have written a script allowing to display a few WMS and WFS layers and I want to make my 2 WFS layers editable. I have all my controls and can draw / modify / drag / delete my features but, on one ...
0
votes
1answer
13 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). ...
2
votes
1answer
39 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
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 ...
2
votes
1answer
1k views

Layer visibility using maxscale minscale not working

I'm using Openlayer and Geoserver. I have a series of layers that have a scale parameter like: 1:50000-1:25000 where 50000 is the max scale while 25000 is the minscale. I have a map like in this ...
1
vote
1answer
467 views

register to event in openlayers 3

I have a web application in openlayers and I am starting to rewrite it to openlayers 3. In the application i have some features that i need to delete/move/add/edit the features then to save it to the ...
1
vote
2answers
45 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 ...
1
vote
2answers
47 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 ...
1
vote
1answer
28 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? ...
1
vote
1answer
398 views

Problem creating a popup in mobile openlayer

I'm trying to use the mobile version of openlayer, unfortunately I could not use framedcloud in it, I could only create a square popup does not look very aesthetic, besides the main need is to ...
1
vote
1answer
409 views

How to trigger a map click event?

I have a map with some markers. On clicking a marker, a popup would appear and on clicking the map, any visible popup would be hidden. I want to hide any currently visible popup upon clicking a marker ...
0
votes
1answer
123 views

Mapfile SYMBOLSCALEDENOM and SIZEUNITS (miles) 200: Keep SIZEUNITS while circles change size based on zoom

I've been trying to understand how to keep the SIZEUNITS at 200 while the circles appropriately adjust based on zoom level. Thought I had this working properly but turns out I did not. You can see ...
1
vote
1answer
337 views

Identify functionality using mapserver

I am just creating a simple web application using mapserver. It has the basic pan, zoom in/out functionality. Now what I want to try is to get an identify functional added into it so that when I click ...
1
vote
1answer
603 views

Stop OpenLayers featureselected event listener blocking map drag event

When trying to drag the map, if the user clicks on a vector feature the featureselected event is triggered and the map dragging does not happen. Please try to drag the map starting from any feature in ...