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

learn more… | top users | synonyms

4
votes
2answers
6k views

Display a WFS layer with OpenLayers

Good Morning! I have some troubles displaying a WFS layer with OpenLayers and hope someone here can give me a hint. Before moving on, I precise that I have already checked other posts, like here and ...
2
votes
1answer
1k views

How to choose between Markers and Features for drawing Openlayers objects?

Yesterday I was trying to create first mock-ups of my GPS tracker interface, and was exploring the available OpenLayers objects for drawing on a map. I began with simple task - placing a marker on a ...
4
votes
5answers
2k views

Openlayers renderer in IE8 - Labels not visible

I copied the source code of http://openlayers.org/dev/examples/vector-features-with-text.html. This url works just fine in IE8. I put the html page as it is in the webfolder in our network. I opened ...
4
votes
3answers
3k views

OpenLayers: Showing a WFS overlay on top of Google Maps

I have found similar questions asked previously, but I still fail to get a simple WFS point layer to work using OpenLayers and Google Maps. The original code I used was based on WFS polygon layers I ...
1
vote
1answer
290 views

Openlayers dynamically label polygon segments

My requirement is to show dynamic label on polygon feature's segments with some offeset. The label text should have the rank of each segment. If it is a square which starts at top left corner it will ...
5
votes
2answers
2k views

Using OpenLayers (with OpenStreetMaps) and PostGis for rendering data acquired from GPS tracking device?

I'm researching and planing to acquire data from GPS device and store them in postGIS database, then use geodjango to process/work them out and finally chart them on a map with OpenLayers. Will these ...
3
votes
1answer
3k views

Path to proxy.cgi for GeoServer is not accessible in browser

There have been several questions very similar to this asked already (including ones not involving GeoServer), but their solutions have not solved my problem. I am trying to use getFeatureInfo on my ...
5
votes
1answer
2k views

How to parse polygons from GML in OpenLayers?

I'm reading a GML file from an URL. This file contains polygons. I would like to draw the polygons on a map, where each should have a different color. But all examples I found on the web so far seemed ...
5
votes
2answers
4k views

How to change the WMS Background Color in OpenLayers?

I am using geoserver to serve up an image pyramid basemap. I want to have all areas outside of the data extent be black (instead of white). I have the map displayed inside of a div tag and changing ...
0
votes
2answers
373 views

Points appear at different location when using google map overlay

I have used vector point from database and also polygon country vectors from database.Points appear with in this country vectors but as I switch to google earth map as base layer the points at smaller ...
3
votes
1answer
483 views

How to save a Leaflet or OpenLayers map for opening later?

Can a webmap state be saved to a text file or something for restoring later? Like if I set up a map with a particular zoom and choose my layers and draw a polygon or two, can it be saved to a file and ...
0
votes
1answer
337 views

Google Map layer loads tiles even if this layer is disabled in OpenLayers

Sorry for cross posting I've asked this question in OL mailing list, but not get response yet. It is very important for me to resolve this issue. I've made a little example that reflect my problem. ...
1
vote
1answer
770 views

Capturing/overriding mousewheel zoom in openlayers

So I've created a map in openlayers and I am setting it up so that there are only certain zoom levels a user can see. I have the code created to handle forcing a user to the next acceptable zoom ...
2
votes
1answer
3k views

How to use Google Default Pan/Zoom controls in openlayers

I am using Google maps version 3 with Openlayers,My question is how do you use the default google control for Panning and Zooming and not the default controls Openlayers panning and zooming(The dark ...
0
votes
1answer
1k views

How to change events in the Oncomplete Drag function in Openlayers

below is code that works for Openlayers drag function: drag = new OpenLayers.Control.DragFeature(polygonLayer, { autoActivate: true, onComplete: function() {alert('Are you sure this is the ...
5
votes
2answers
2k views

How to disable polygon Label on the vertices (OpenLayers) in Edit Mode

I added the style on the polygon layer like so. var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']); // get a copy of the default style style.label = "1233456 ha" ...
0
votes
1answer
526 views

How to define a css class for a delete button in Openlayers?

Define a css class for delete button in openlayers? .olControlDelete { background-image: url("help.png"); background-repeat:no-repeat; background-attachment:fixed; ...
11
votes
3answers
3k views

How to merge two Polygons in OpenLayers?

I have two polygons. polygon1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing1])) polygon2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing2])) ...
2
votes
5answers
3k views

What causes this unexpectedly poor GeoServer/PostGIS/OpenLayers performance?

I am having a tough time making this map run smoothly (play around with it for a bit, you'll see). I have taken a few tips from OSGeo's Making Maps Fast document, but I think there's another issue ...
0
votes
2answers
8k views

Openlayers How would i get a hover label over my polygon

make a hover/mouseover label for a polygon in Openlayers? I made a map with draw, delete and drag polygon function. Now I need to make a hover mouseover for this. How to get a hover label for ...
0
votes
2answers
4k views

How to delete polygon in Openlayers

I would like to delete my polygon in Openlayers after i have drawn it. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> html, body, #map { ...
2
votes
2answers
1k views

WFS Layer does not refresh or give new data when map moved in openlayers

I am trying to add a WFS Layer with a BBOX strategy. When I change the extent I want GeoServer to return only the features in that extent. Here is the code I am using to add layer. wfs = new ...
2
votes
3answers
2k views

Openlayers get coordinates from polygon

please could someone help me and bless me with an example of how to get coordinates from a polygon in OpenLayers?
1
vote
1answer
3k views

Openlayers get coordinates of a circle vector after draw

I have made a openlayers map. I have made two features on the map. Navigate DRAW POLYGON I have made 40 sides to my polygon which turns out to be a circle. After I have drawn my circle I want to ...
3
votes
2answers
1k views

How to subtract Geometry Point Polygons in OpenLayers?

I have two json arrays, one for background polygon and one for other polygon. And from them, I got two polygon layers. backgroundLayer = new OpenLayers.Layer.Vector("Background Layer", {styleMap: ...
0
votes
1answer
1k views

Pgrouting OpenLayers all together

I'm new to all this I'm still trying to understand how things work.I have found a tutorial for pgrouting that shows the shortest path with Dijsktra or A* or shooting star at a map . I followed the ...
0
votes
2answers
387 views

Is there a way to get Openlayers' KML reader to deal with tessellation?

I'm trying to use OpenLayers' KML reader to display a KML file on a map, but the KML itself has LinearRings tha have a tessellate value of 1. I realize that this is used by google earth to snap the ...
4
votes
1answer
671 views

How to prepare SVG images for presentation in OpenLayers?

I have a collection of SVG vector images I need to display on a map, probably using OpenLayers/KML. Is there any way to convert a vector image from SVG to KML? Or would it make more sense just to use ...
2
votes
1answer
2k views

Help Setting up GeoServer Proxy with OpenLayers

I have a GeoServer WMS in Apache-Tomcat at http://localhost:8080 and a mod_wsgi app in standard Apache at http://localhost:80/myapp. My OpenLayers map is being hosted statically by the Apache-Tomcat ...
0
votes
2answers
906 views

GeoExt Tree Example Modification

The example provided in http://api.geoext.org/1.0/examples/tree.html shows all overlayes are checked but how do I make these overlayes unchecked while page is loaded?
2
votes
1answer
238 views

What are necessary GeoExt dependencies?

Is use of OpenLayers-2.11 ,GeoExt-1.1 and ext-4.0.7-gpl supported . I have only included ext-all.js in the script src. Should I include others too?
3
votes
1answer
4k views

GetFeatureInfo Request with GeoServer and OpenLayers.loadURL Not Working

I'm making a simple GetFeatureInfo request against a GeoServer WMS, but it returns empty responses. The request utility I'm using is OpenLayers.loadURL. The funny thing is, I can paste the generated ...
3
votes
1answer
883 views

How to deal with popups for clusters in openlayers?

I have an openlayers map which generates points from an array as vector features, with popups for these features, which works fine. Since I have so many points on this map, I have started working with ...
2
votes
1answer
273 views

Prevent formatting of label text in OpenLayers

I have a vector layer in OpenLayers containing a few point features. Each of my features have an attribute tag which contains a short text identifying the feature. Example: tag: '1e-1' Applied ...
0
votes
1answer
1k views

Building Floor Plan map using OpenLayers and json

How to show map of building floor plan using OpenLayers and json. moreover, i want to know that how to change features dynamically with zoom based from json files. Let's take example, Initial the ...
1
vote
2answers
557 views

config parser error raised by TileCache and Mapserver with OpenLayers

Just a forewarning, I will try to be as extensive with my question as possible. Due to a number of reasons why this might not be working, I have posted all sorts of portions of my debugging below. ...
2
votes
3answers
654 views

How to join a WFS layer to a stand-alone table in OpenLayers

I'm a complete novice at OpenLayers, and am checking whether the following is possible. I envisage a dataset of polygons in GeoServer, being served as a WFS layer into OpenLayers. The polygons won't ...
1
vote
1answer
707 views

openlayers - wms - map not loading - what Bounds/Extent/Scale to use?

I simply want a map on a webpage where I can zoomin and zoomout and navigate around. I'm working on this for 4 days now, and can't get it to work: I want to display the map using a WMS-service here ...
3
votes
1answer
1k views

Can a layer's style be modified dynamically using an SLD in OpenLayers?

I am a complete novice with GeoServer and OpenLayers. I'm trying to ascertain at what point a style is applied to a GeoServer layer which is drawn in OpenLayers, when using an SLD. The Introduction ...
3
votes
1answer
2k views

OpenLayers SelectFeature control ignores graphicZIndex

I am having trouble with SelectFeature control with hover = true and highlightOnly = true. There are two adjacent polygons on the same layer, one on top of the other. There's also a SelectFeature ...
0
votes
1answer
102 views

How to get nearby tiles from a location?

I want to get the tile in which a particular location lie and also its nearby tiles. Is there any google map api which could return this information.
6
votes
1answer
627 views

What server and API to use for displaying complex polygons with dynamic symbology?

Background I need to interface a map into an existing website which allows the user to query a database and which currently results in a table listing population statistics per county. For example, ...
5
votes
3answers
3k views

OpenLayers on mobile device: possible to use local map tiles?

Is that possible for an OpenLayers app (running on mobile device) to load the map tiles that are deployed in the device, if the app is able to access these files (e.g., using PhoneGap)? from this ...
1
vote
2answers
768 views

GeoExt Legend Modification To Include Feature Count

GeoExt has Legend capability but is is quite basic which shows only feature types like in example http://api.geoext.org/1.0/examples/legendpanel.html. How could it be modified display legend with ...
2
votes
2answers
366 views

How to combine vector layer and wms layer based on some constraints?

I would like to group wms and vector layer together but with some constraints in openlayers. The requirement is, if lets say vector layer 1 is selected then its corresponding wms layer should also be ...
1
vote
1answer
2k views

Loading a raster using Openlayers and Mapserver

I'm trying to load a raster into my browser using Openlayers. I can examine my WMS raster layer using OpenJump, but I'm not able to get it to load into my browser. My mapfile is as follows: MAP ...
3
votes
2answers
169 views

Why does OpenLayers display red tiles for USGS map?

I am trying to display the USGS national map via OpenLayers: http://viewer.nationalmap.gov/viewer/ OpenLayers is able to display the USGS map. However, when I zoom in, the tiles turn red. Could ...
4
votes
3answers
345 views

How to choose a language for web map development?

I am building a web map application using: GeoServer OpenLayers Tomcat I would like to build a web application, where the user can log in and have the map arranged according to their profile. ...
2
votes
1answer
1k views

OpenLayers call ArcGIS WFS: no feature returned

I spent a long time looking for an example using OpenLayers to call ArcGIS WFS, however, almost none is found... currently the code I wrote is based on the example of GeoServer, however, no feature is ...
2
votes
2answers
1k views

How to programatically generate my own wms file?

I'm new to OpenLayers and as far as I understood layers are retrieved from an wms file. I know this is not precisely a development forum but I was just wondering if there is a way to fool this ...