Tagged Questions

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

learn more… | top users | synonyms

0
votes
0answers
37 views

QGIS web client mobile/tablet viewer

I have been looking at OL3-mobile-viewer as an option to make my maps more accessible. Unfortunately I cannot figure out what I need to change to hook it up with my existing QGIS server and ...
0
votes
1answer
42 views

Using Proj4js in Openlayers - Proj4js is not defined

I want to use Proj4js. <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js"></script> <script type="text/javascript" ...
3
votes
1answer
63 views

Transforming coordinates from one projection to another

var bounds = config.init_center.transform( new OpenLayers.Projection("EPSG:31466"), new OpenLayers.Projection("EPSG:3857")); console.log(config.init_center); console.log(bounds); I have ...
0
votes
0answers
19 views

Local Layer put as overlay on Open Street Map, appears on totally wrong place

Local are layers work well on OpenLayers. (Location: somewhere in North Germany). One WFS Layer and one WMS Layer. Now added OpenStreetMaps as a base layer. The WMS Layer is not visible anymore and ...
2
votes
1answer
48 views

How to do OpenLayers.Request in OpenLayers3?

I have been searching for solutions to call GeoServer REST api from OpenLayers 3 for a long time. I found that for OpenLayers 2, there is a OpenLayers class OpenLayers.Request for doing this: ...
1
vote
0answers
19 views

Authenticate to geoserver using openlayers 2

I want load layers from geoserver using openlayers in php page. How I should do it? Maybe can give ane code examples? Layers not public, need authentification.
0
votes
1answer
36 views

How to prevent vector layer zooming if base layer does not allow farther zoom

I am using different types of base layer in OpenLayers and drawing vector layers on them. I am having trouble with Google satellite base layers. I have noticed that satellite view has different zoom ...
0
votes
1answer
44 views

how to get Extent or BoundingBox from geoserver in openlayers3

I use wms layer from geoserver on my map and i use openlayers3 api. I want to zoom to my selected layer but for this i have too use extent of my selected layer. ...
1
vote
1answer
24 views

Force Bing logo to bottom of map OpenLayers

Any way to force the logo position of a Bing layer in OpenLayers? See this image for the strange location:
1
vote
1answer
67 views

missing LayerSwitcher in openlayers3

I was wondering if there is a LayerSwitcher control in OpenLayers 3? I read that ol3 is a complete rewrite. But I can't seem to find the equivalent of LayerSwitcher from ...
0
votes
1answer
34 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
2answers
37 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
26 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 ...
1
vote
0answers
25 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
1answer
48 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
179 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
34 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
50 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
42 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
44 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
40 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
14 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
17 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
57 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
19 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. ...
1
vote
0answers
43 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
35 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
44 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
40 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
25 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
32 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
30 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 ...
2
votes
1answer
33 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
31 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
19 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
75 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
47 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
56 views

Displaying ESRI REST Services 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
10 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
29 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
61 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
23 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
28 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
41 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
61 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
17 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); ?
3
votes
1answer
135 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
30 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
59 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> ...