Tagged Questions

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

learn more… | top users | synonyms

3
votes
1answer
23 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
37 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
41 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
15 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
54 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
30 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
59 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
0answers
21 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
53 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 ...
3
votes
1answer
31 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
19 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
48 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 ...
0
votes
1answer
61 views

How to transfer a WKT string from OpenLayers to Geoserver or PostGIS?

Supposing I have created a Vector Layer in OpenLayers and then transformed it to WKT or GeoJson, how can I export it from OpenLayers, and possible import it to PostGIS or GeoServer?
1
vote
0answers
23 views

wrong layout when using Openlayer plugin

I'm drawing a simple map and I noticed a weird problem. Very briefly: I have a simple shapefile (a region) and the Google Satellite layer of the OpenLayer plugin activated on my map canvas. On the ...
1
vote
1answer
67 views

How to transfer layer data from OpenLayers to PostGIS database or QGIS?

Supposing I have a created some layers in OpenLayers containing only Geometry Points, how do I transfer my data to a postGIS database? Is there a way to turn pure javascript/openlayers to a table in ...
2
votes
1answer
70 views

Openlayers creating RegularPolygon that is too small then return false

sorry my English very pool and just can type few word... My project has to use imagelayer to show map , it can create box on map, box will be a area to put device marker on top , but when the box ...
2
votes
0answers
41 views

How to plot heatmap/locations in Geoserver & Openlayers map from the Lat/Lon data of PostGIS table?

I am using Geoserver, Openlayers, PostGIS for Geospatial web implemenation. I have an Indian map shape files for States, Districts, Talukas. I am able to generate a map with states, districts, ...
1
vote
1answer
354 views

Why use a database when you can have all of your data in javascript/openlayers?

I have a really simple and basic question. First of all, I have to mention that I am pretty new to web applications and GIS. I am working on a web application using Openlayers, Postgresql/postGIS and ...
1
vote
0answers
25 views

Saving Changed Features from OpenLayers does not work because GeoServer claims Layer to be read-only

Trying to save a few changed Features in OpenLayers back to my geoserver (2.4.4) with saveStrategy.save(). Features don’t change. What I get in the geoserver protocol is: ...
1
vote
1answer
25 views

openlayers 2 can't close popup

I have a map with points from GeoJSON file. I created a default style and a select style for these points. I created a popup with attributes from GeoJSON when clicking on a point. All works fine, ...
1
vote
1answer
57 views

Setting Base Layer in OpenLayers 3

I know there is a setBaseLayer function in OpenLayers 2. Is there a way I can accomplish that in OpenLayers 3?
2
votes
0answers
13 views

Pause OpenLayers interaction until pan complete

I have an OpenLayers map with thousands of vectors and a tiled strategy for retrieving them. I rarely get above 15fps panning the map, which is undesirable. I notice a similar Google Maps application ...
1
vote
1answer
44 views

How to set an x-offset for my whole linestring/layer?

Supposing I have a layer imported from GeoServer succesfully, and it looks like this: (some will remember me from my previous question. And, yes, that is my city Volos, Greece. There is a map and a ...
0
votes
1answer
52 views

geoserver wms capabilities URL for google maps

I like to use google map in my application and also i want to get that by wms cascading of geoserver. To make use of cascading I want to know the capabilities url. So please any one guide me where i ...
2
votes
1answer
43 views

Non-default icon of OpenLayers Vector Feature

thats propably some minor problem, but i have deadline above my head and i can't get any clue whats wrong with my code, so I decided to come here for help. Im changing from markers to vector layer and ...
1
vote
0answers
40 views

Get info from WMS layer with Openlayers mobile jquery? [closed]

How to get feature info from WMS layer (geoserver)? I am using openlayer jQuery mobile. I've already called the WMS in jQuery mobile, but how to get feature information when clicking the attribute.
4
votes
3answers
60 views

Connection between OpenLayers and GeoServer is faulty

Hello so I have connected my Geoserver to my OpenLayers website and it seems like something is wrong about the connection. I added a WMS layer in Javascript like this: But when I load the page ...
1
vote
1answer
51 views

How to get longitude and latitude in degree units

When i navigate on my map , I receive the latitude and longitude, but I want them to be specified in degrees. I don't know what should I do please help this is my code: function ...
2
votes
0answers
24 views

using mapserver with open layer

I have implemented mapserver in windows environment and i get map from following url ...
1
vote
0answers
26 views

OpenLayers - map.zoomToExtent() zoom to wrong bounds

I wonder what could be the cause of that weird behaviour. I create a bounds and do a zoomToExtent() on it but the map zoom to a wrong bounds a lot smaller than what I expected. Only the left (xmin) ...
1
vote
0answers
29 views

Openlayers 2.13 not calling correct XYZ tiles from couchdb?

End goal is to be able to access a pouchdb of map tiles on phone off-line that has been synced from remote couchdb of map tiles. Openlayers is not calling the correct document from the couchdb to ...
1
vote
0answers
20 views

Openlayers permalink not working

Basically I have a permalink which contains the co-ordinates of a temporary layer when I enter this permalink into the browser the layer shoes and then goes. I used use a vector layer the permalink ...
3
votes
2answers
37 views

SetVisibility(false) does not work

layer_gesamt = new OpenLayers.Layer.WMS( "Geoserver layers - Tiled", "http://mygeoserver/xyz/wms", { LAYERS: 'myLayer', STYLES: ...
1
vote
1answer
58 views

How to get layer type in OpenLayers 3?

I would like to iterate through all of the added layers in an ol.Map instance and only select the vector layers. So far I could get the individual layers with the a property of the resulting object of ...
1
vote
1answer
25 views

openlayers drag control returns wrong XY

I am trying to use a Drag Control in a webgis. My problem begins when I finish the 'move' of a point. That is, originally the point has an XY like -8.308567019533697 and 41.376871762432685, displaying ...
2
votes
0answers
22 views

Using OpenLayers' Refresh strategy for GeoJSON

I am trying to use the Refresh Strategy reading a GeoJSON file in OpenLayers, however it doesn't work (but it works perfectly using for instance .Fixed() strategy), here is my code: var ...
0
votes
1answer
27 views

Geoserver security and application security separation

I am using geoserver that publises WMS, WFS services to clients. I am using geoserver services in an OpenLayers application. My application will requiere username and password authentication. 1 - ...
0
votes
0answers
9 views

Calculating z coordinate for longitude, latitude Google Map [duplicate]

I have a point (lon, lat) values. Is there any service to calculate Z coordinate of this point. Google service, OpenLayers service or others.
1
vote
0answers
34 views

Help embedding Openlayers map in Eclipse BIRT report

i have this code, it displays the zoom buttons only but it doesnt display my map. what could be the problem? <html> <head> <script ...
2
votes
0answers
61 views

Comparing mapping APIs

I am planning to write a thesis about mapping APIs and compare three of them (Google Maps API, Leaflet and OpenLayers) or four, if you consider OL2 and OL3 as different APIs. I am planning to make 3 ...
2
votes
2answers
83 views

Modifying a WMS feature in POSTGIS with Openlayers

I have a WMS layer that i'm using to display complex features to the users. It was really the main reason i chose GeoServer, because rendering all the vectors, made it painfully slow. Like GeoServer ...
1
vote
0answers
62 views

How to disable Google map zooming animation effect?

I am using Openlayers mapping library in my application. I have integrated Google map V3 & added other several WMS overlays, Vector layers etc. Every thing working fine. But I am facing big ...
2
votes
0answers
34 views

Correct syntax for retrieving features from GML format in OpenLayers

Yesterday I made with qgis the shapefiles of my town and now I wanted to add them in a web application I'm making with OpenLayers. The problem is that, while it loads them perfectly with the wms ...
2
votes
0answers
29 views

PointStacker - Random locations at different zoom level

I'm applying PointStacker transformation on one of my layers using Geoserver 2.5.2 and OpenLayers 2. I know, that I have 7 datapoints located on the exact same location. However, when I change the ...
0
votes
1answer
26 views

Geowebcache tiles hiding vector layers

I'm using Openlayer 2.13, Geoserver 2.3.5 for Development. I have a Geowebcache layer as base layer And one vector layer for showing route(Please check the attached image). If I drag or zoom in to ...
1
vote
1answer
52 views

Building web application to get PostGIS query from user and view result map using GeoServer via OpenLayers?

I'm a newbie in web-map application area. I just found the small application in this tutorial interesting I am a bit confused, because when i publish a map using geoserver and openlayer, I have to ...
1
vote
0answers
26 views

Routing and OpenLayers: How would you connect a point to another through a 'road' node? [duplicate]

So my question is in a routing application,probably using osm as base layer, how do I get a line-string that goes through the road and not directly from one point to another? Is there any ...