Tagged Questions

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

learn more… | top users | synonyms

0
votes
0answers
12 views

MetaTiling in Openlayers 3

I'm new to OL3 and I'm using geoServer to serve tiles. For my application, some labels would disappear or get duplicated. I've done some research and it seems the solution is to use meta-tiling. I've ...
1
vote
1answer
7 views

Openlayers: how to remove the FID field with the WMSGetFeatureInfo function?

I'm using the WMSGetFeatureInfo control of Openlayers in order to have a pupop in the map with the WMS layer info. Automatically Openlayers inserts a FID field at the beginning of the popup. Is there ...
1
vote
1answer
18 views

Center OpenStreetMap at Location defined in specific Projection

<body onload="init_gis()"> <div id="map" style="height:750px"></div> <script type="text/javascript"> var config = { init_lonlat : new ...
2
votes
1answer
21 views

OpenLayers 3 - draw multiple lines/paths based on coordinates

I am trying to draw a line(s) based on give coordinates (starting and ending point). Googled , found few examples but non of them seem to work probably because they are for OL2, so this is my last ...
0
votes
1answer
17 views

Color Blend Mode for OpenLayers Vector Feature

Currently I'm developing a WebGIS app using OpenLayers 2.13.1, GeoServer, and PostGIS. The app has buffer analysis feature which is working fine like the picture below. What I'm looking for is: is ...
1
vote
1answer
18 views

Hiding specific icons/markers on text generated vector layer

I'm displaying a vector layer with pois, generated from a text file: lat lon icon iconSize iconOffset title description 56.030325 14.4774116666667 ...
0
votes
1answer
12 views

How to hide a layer dynamically from layers groups in Geoserver?

I have created a layer group (using 15 layers) in Geoserver. I can access this layer group through Openlayers & it's working fine. As per the client requirement, I need to develop a layer switcher ...
2
votes
0answers
19 views

how to display 2 wfs layer at the same time from mapserver?

I have two wfs vector layers. When i show only one layer, it works. But doesn't work when i'm trying to show 2 wfs layers at the same time. How to show 2 wfs layers together? I'm using OpenLayers. ...
0
votes
0answers
20 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
21 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
51 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
14 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 ...
1
vote
0answers
26 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
14 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
25 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
23 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. ...
0
votes
1answer
11 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
36 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
0answers
18 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
1answer
24 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
14 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
17 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
26 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
74 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
28 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
46 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
22 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
19 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
28 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
12 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
25 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. ...
1
vote
0answers
33 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
16 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
38 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
24 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
19 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
22 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 ...
2
votes
1answer
26 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
20 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
15 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
48 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
41 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
19 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
7 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
18 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
46 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
17 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). ...