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

learn more… | top users | synonyms

2
votes
4answers
191 views

Openlayers Vector Rendering

I've just added a couple of more WFS backed vector layers to a map and the performance has dropped. Whilst debugging this I've noticed that openlayers is considering every feature in the visible ...
2
votes
3answers
233 views

How to change 0,360 WKT string to -180,180?

I'm reading POLYGON WKT strings using OpenLayers.Format.WKT().read(). The polygons use 0,360 longitudes but my map is -180,180. When I display the polygons on the map they are displayed outside of the ...
2
votes
3answers
1k 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
3answers
2k views

Geoserver Access-Control-Allow-Origin

I have web client on Apache and WFS service on Geoserver, both on same computer! Web client is (Apache) running on port 89, and Geoserver is running on 8181 port! I do following settings in Apache ...
0
votes
3answers
261 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 ...
7
votes
2answers
204 views

Load third-party APIs only when the corresponding map layer is requested?

OpenLayers allows multiple map layers to be hosted on a common platform. If the map application supports a wide variety of maps, say from Google, Yahoo and Microsoft, I find that upon initialization, ...
3
votes
2answers
707 views

Offline Phonegap/Openlayers App

I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is ...
3
votes
2answers
427 views

OpenLayers - SelectFeature fails on a small polygon on top of a larger polygon

I'm using new OpenLayers.Control.DrawFeature to draw polygons and OpenLayers.Control.SelectFeature to select a specific polygon. I'm drawing one polgon and then a smaller polygon on top of the first ...
2
votes
2answers
294 views

Printing possible for openlayers GeoJson WFS with Mapfish printing service and wkhtmltopdf?

I searched lots of places but I couldn't find proper examples or documentation to do printing using Mapfish Printing service or Wkhtmltopdf. My application has a few WFS layers from openlayers and ...
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
2answers
49 views

Showing csv file on map

Does OpenLayers support the uploading and rendering of CSV files? If it does, how? I used this code and it didn't help. var curLayer = new OpenLayers.Layer.Vector("layer", { protocol: new ...
1
vote
2answers
26 views

how can we save vector layer as a file in openlayers

Im using mapserver + openlayer for GIS API and im new to GIS. I'm done with drawing line, point and polygon features in openlayer. but not being able to save it in some shapefile afterwards i got to ...
1
vote
2answers
52 views

Openlayers Animated marker

How to animated feature marker in openlayers like in google map example of bouncing marker. I'm new in openlayers so if you have a sample code much better.
1
vote
2answers
40 views

HTML Dom elements as marker / feature in Openlayers?

I want to set HTML Dom element as marker in openlayers, instead of GIFs,PNGs. Is it possible to do so?
1
vote
2answers
115 views

OpenLayers: Point icons disappearing

I have a very simple setup where I have a feature vector layer on top of an OSM layer in OpenLayers 2.13.1. However, I notice that the icons of my points in the vector layer begin to 'become ...
1
vote
2answers
151 views

Error in displaying wfs layer from mapserver/postgis

I have read and tested all the relative posts but I still don't have a solution for my problem. I have a layer suscribers (points) stored in postgis database with srid=32232. I would like to display ...
1
vote
2answers
849 views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
1
vote
2answers
1k views

How to get Native Bounding Box minx,miny,maxx,maxy using openlayers?

I am trying to develop GIS application using GEO SERVER and OPEN LAYERS i want to get bounds from geo server Native Bounding Box data of a layer instead of manually hard code var map; var key ...
1
vote
2answers
154 views

OpenLayers label without using StyleMap

I need to show label of each feature based on attribute field value. I know that I can use ${attribute} notation for this purpose. But this approach works only if I make StyleMap and pass it to vector ...
1
vote
2answers
112 views

How to specify one layer among many with getWMSInfo?

I am using getWMSFeatureInfo with multiple point layers. When I click on a point on map, how to specify which layer that point belongs to?
1
vote
2answers
303 views

Dynamically Reload OpenLayers Marker Layer based on user input

Not really sure how to ask this, so I'll outline the scenario. We have a database with locations in it. There are various types of cars at each location and each car has a problem of varying ...
1
vote
2answers
563 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
2answers
51 views

Intersection between line and polygon

I have 2 layers in openlayers: first is parcel layer (polygons) and second is railway layer (lines). They are already drawn and all i need to do is when i click on some line, to get intersection of ...
0
votes
2answers
32 views

Openlayers Marker z-index

I have multiple marker in one layer OpenLayers.Layer.Marker and some times the marker overlap the other marker. My question is how do I bring the marker in front when its click? is there a setZ-index ...
0
votes
2answers
77 views

WMS layer is distorted

My WMS layer(EPSG:3847) looks fine in GeoServer However, it is distorted in browser: I found someone hade the same problem(Openlayers and Geoserver: OSM/Google Maps and WMS Overlay)but I still ...
0
votes
2answers
89 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 ...
0
votes
2answers
158 views

Add features to vector layer from WFS protocol read response

Im trying to add the features i get from a WFS query using the WFS protocol. But something doesnt work. I have looked at other post with people having similar problems, but their solution dont fit ...
0
votes
2answers
142 views

OpenLayers request a WFS feature

I am trying to request features of a wfs layer and then zoom to them. The wfs layer is defined as follows: wfsLayer = new OpenLayers.Layer.Vector("University", { strategies : [new ...
0
votes
2answers
240 views

How to set default style of layer using rest api in Geoserver

Hello friend, I want to change the default style of the layer in Geo server using the REST API.For this i get this code curl -v -u admin:geoserver -XPUT -H "Content-type: text/xml" -d ...
0
votes
2answers
3k views

How to configure Proxy.cgi file for Geoserver On Tomcat?

I have a web map application in my local machine(windows xp and dont have IIS) and I have postgis data in Geoserver on Tomcat (Ubuntu). To get the WMSgetfeatureInfo, I have configured the proxy.cgi ...
0
votes
2answers
252 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 ...
0
votes
2answers
531 views

OpenLayers WMS - TypeError: this.resolutions is undefined

I'm trying to setup a map with WMS and WFS Layers by using Geoserver. However, when I'm combining WFS and WMS (with some Google basemaps) together in one map I got following error in Firebug: ...
-1
votes
1answer
372 views

My wms vector data overlay on openlayer vmap work fine but on osm img is not rendering

i am try to overlay my India roads vector over an openlayer (http://vmap0.tiles.osgeo.org/wms/vmap0) vmap work fine.but i want to do the sam task over osm(open street map), i am trying many different ...
-1
votes
1answer
355 views

How do I use getinfo to get attribute information i openlayers as I click a feature

I want to create a popup window as this one http://openlayers.org/dev/examples/dynamic-text-layer.html when I click on the feature.. I used the same code but its not working... the pop up is not ...
-1
votes
1answer
40 views

Zoomin to Polygon

1) I have a list of records(states) in a table and an Hyperlink, when user clicks on Hyperlink(state hyperlink) I need to zoom in to repective polygon(state) on layer. How can I acheive this? 2)My ...
-1
votes
1answer
126 views

load base layer from database

I have svg maps of floor plans which I am using OpenLayers to project and display interactive features on. I would like to load the files from my database, (where they are stored as blobs) instead of ...
-2
votes
1answer
139 views

Align openlayer in center of Div

Layer is displaying in the bottom right corner of the div which I want it in center of the div. Div in jsp: div id="map-id" class="map"></div> var bounds = new OpenLayers.Bounds(-268, ...
-2
votes
1answer
69 views

Render specific vector data from database with openlayer

I want to render some data on a map. They are stored as points in my database (postGiS), each one is associated with a name. I want to render points with the same place name in the same color. ...