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

learn more… | top users | synonyms

5
votes
1answer
4k views

How to create a movable point in OpenLayers?

I have the following code: function mapCreate(lon,lat){ map = new OpenLayers.Map("map1"); var osm = new OpenLayers.Layer.OSM(); vectors = new OpenLayers.Layer.Vector("Vector Layer"); ...
2
votes
1answer
470 views

How to determine maxResolution and numZoomLevels in dynamic environment?

I want to determine resolution and number of zoom level dynamically instead of inputting the values in openlayers client. When the user move the position on map by dragging or panning control, I can ...
1
vote
0answers
187 views

Mapnik, TileCache, Apache2 - Setup&Debug

I'm trying to setup TileCache with Mapnik working on an Apache Server. Right now I don't see any tiles in my OpenLayers Framework in the webbrowser. I really ask myself where the problem is hidden. ...
9
votes
2answers
2k views

How to add a layer to SelectFeature without losing existing selections?

I'm using an OpenLayers.Control.SelectFeature for selections on multiple layers. However, when I add a layer using setLayer(), my selections on the other layers are lost. Anyone know how to work ...
14
votes
8answers
9k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
6
votes
1answer
6k views

Openlayers and Geoserver: OSM/Google Maps and WMS Overlay

I am experiencing projection problems with the following set up: GeoServer with ESPG:4326 based shapefiles (*.shp) OpenJump to edit my shapefiles Openlayers with EPSG:900913 base layers GeoServer ...
4
votes
1answer
336 views

GeoWebCache tiles with specific scales

Is it possible to generate some tiles by GeoWebCache with specific scales eg. 1 000 000 , 500 000 etc. By default they are eg. 611.4962261962891, 305.74811309814453, 152.87405654907226, ...
2
votes
2answers
1k views

How to optimize a WMS request by limiting number of tiles?

I want to display the layer using WMS and meanwhile I want to limit the number of tiles with their respecive BBox when map is loaded. At the backend I am using geoserver. I can limit the number of ...
3
votes
1answer
331 views

What are the requirements for using Google's GEvent?

For a current project, we need to know when a Google map is done loading all of its tiles. I found the following question, which was for the same basic problem: register event "loadend" on ...
0
votes
2answers
440 views

apache vs lighttpd vs nginX as OpenLayers / GIS Server

How is using one of the above technologies to host an Openlayers-based GIS application? My investigation with apache and lighttpd showed that apache is not the best for heavy load environments. In ...
0
votes
1answer
679 views

How to highlight track in KML on hover with OpenLayers

I have KML layer with multiple tracks and I would like to highlight them individually on mouse hover. I tried to implement this like in the example found in OpenLayers examples, but couldn't get it ...
1
vote
4answers
666 views

How do you solve the map publishing problem with Geoserver 2.1.1 on Windows 7 x64?

Well, my problem is that i have geoserver installed over a windows 7 x64 system with both java (JRE 6u29) x32 and x64 installed and i can't proyect my layers on the website. The preview on geoserver ...
3
votes
1answer
1k views

OpenLayers.Format.KML write style

I would like to apply a style to the KML that gets generated from the write() operation of OpenLayers.Format.KML. The current style that is on the vector layer does not get exported with this code: ...
2
votes
1answer
615 views

Combine hover info with onclick info in openlayers?

I am trying to do some complex thing. I wonna have: popup with a name of a feature on mouse hover, popup with more complex info ( name, foto, etc.) after mouseclick on the same feature - the same ...
16
votes
6answers
8k views

Map projection in OpenLayers

I want to overlay some data whose projection is WGS-84 on Google map layer in OpenLayers. But I just can't make them in the right place. I did as follows: map = new OpenLayers.Map('map', { ...
3
votes
1answer
657 views

Stroked and filled vector lines in Openlayers

I am drawing vector lines, using GeoJSON, in my web application that uses Openlayers. I want the line to be displayed in yellow color with black border. I am using the following for the line styling: ...
16
votes
3answers
3k views

How to put GeoServer layers behind authentication?

I want to publish map layers using OpenLayers and GeoServer. While this is easy enough to set up, I'm a bit lost when it comes to authentication possibilities. What I want is to create different users ...
3
votes
1answer
169 views

Calculating the time taken to complete the overlay display in map?

Currently, I am able to calculate the server response time by logging the difference of current date to initialize the map with the time when layers is added. But this gives me server response time. ...
2
votes
1answer
1k views

How to deactive Vector Selection In OpenLayers wms features

This is my sample code and work fine :), But I have a little problem, I'm using multiple layer (WMS), when I zooming the layer will be shown or hidden. In my example bellow when OpenLayers level zoom ...
8
votes
4answers
8k views

How do I get the coordinates of a click on vector feature/layer in OpenLayers?

I need to get the coordinate of the click when the user clicks on a vector feature on the OpenLayers map. The SelectControl only gives the feature that was clicked and not the coordinates of the ...
6
votes
2answers
3k views

How to change the appearance of a Feature.Vector that's already displayed?

I've created a bunch of Feature.Vectors from Point objects and assigned them a Style. Now I want to dynamically change the appearance of one of the features in real time; e.g., change it from red to ...
1
vote
0answers
458 views

GeoNetwork opensource - Geoserver/Google Maps integration

I'm using GeoNetwork 2.6.4 and I would like to change the default base map to Geoserver, adding a Google Maps Satellite Layer. Which is the best way? Any suggestions?
1
vote
0answers
38 views

Why is eraseGeometry method not called?

I'm extending OpenLayers.Renderer class. The problem is eraseGeometry method is not called. What can be wrong? I need it to be called when features are out of the visible area.
2
votes
2answers
1k views

Image display/scaling in OpenLayers vs Google Maps

When I plot an image on OpenLayers, it looks like that image is stretched a little bit as compared to Google Maps. I was wondering if it is normal or there is something wrong with my code. ...
5
votes
1answer
3k views

Can image layer be rotated in OpenLayers?

While working on Ground Overlays, I noticed that it has a tag called <rotation> <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> ...
1
vote
1answer
517 views

How to update GML layer without reloading local file?

I set up a GML layer with local GeoJSON file as data source: veclayer = new OpenLayers.Layer.GML("vector", "localfile.json", { format: OpenLayers.Format.GeoJSON, strategies: [new ...
5
votes
2answers
3k views

How to display KML image overlays in OpenLayers?

I am working on displaying Ground Overlays on OpenLayers by parsing KML manually. To do so, I was trying to add an image on top of Google Map by looking at GroundOverlay section from ...
4
votes
1answer
1k views

Does OpenLayers supports KML Ground Overlays?

I am not able to display Ground Overlays in a KML file with OpenLayers. Does OpenLayers supports KML Ground Overlays? If not, how would I proceed in writing my own code or plugin for OpenLayers so ...
0
votes
1answer
1k views

How to modify a Marker object's icon after it's been drawn?

I'm displaying gps track data (e.g. points in time, like the path a vehicle covered) and I need to allow the user to "play back" the track, by having the markers change color one at a time in ...
4
votes
1answer
6k views

How to get features in Openlayers vector layer

What is the exact API to get all features in a vector layer in OpenLayers? Suppose I have the "map" object, within which is a "Vector Layer": how can I obtain features in the layer?
5
votes
2answers
603 views

How to time function calls in OpenLayers?

We have an existing application that has a function that wraps the OpenLayers.Layer.Vector constructor, which gets its layer info from a KML source over http. Once this function completes, I need to ...
6
votes
1answer
2k views

How to add KML data but from variable - not from url?

I have a working map that retrieves KML from a url, but now I need to get the KML data from a local variable instead. Is there support for this, and if so what is the syntax. Searched the api and ...
4
votes
3answers
672 views

Is it possible to lock overview map?

Issue: I've got openlayers application with some overview map which has just one scale so the size of it doesn't change even though I zoomed my map. Now i would like to make overview map locked - ...
4
votes
1answer
2k views

Changing the line color of a marker box using OpenLayers

I'm trying to figure out how to change the line color of a marker box in openlayers. I've been learning from the following example: <!DOCTYPE html> <html> <head> <meta ...
1
vote
3answers
392 views

Looking for PDF map downloading capability in OpenGeo GXP

I am looking for a plugin to OpenGeo GXP in order to download maps in PDF format. Could you help me? Thanks
1
vote
0answers
207 views

About event to Latitude and Longitude in C#

I am beginning to study Ready GXP and I would like to know which event receives Latitude and Longitude and passes them to the browser for execution in C#. Could you help me ? Thanks
3
votes
0answers
491 views

Requesting multiple features on different layers

The case: A lot of features need to be rendered on an openlayers map. Drawing all features on the map (WFS) causes performance issues (especially in IE). Therefore I have chosen to use WMS so that the ...
5
votes
1answer
2k views

WMS getFeature control doesn't take 'viewparams' into account

I use Geoserver to get my WMS data. Everything works great for showing data in openlayers. Geoserver has the ability to create sql views and use parameters to return certain geometry. These ...
3
votes
2answers
709 views

Does the a wms layer in openlayers have “maxfeatures” option?

Does the a wms layer in openlayers have "maxfeatures" option? I'm asking this because my wms layer contains allot of points ( > 100.000). When zoomed in I don't want the rest of the features (not ...
7
votes
1answer
1k views

How to select WFS features by polygon in OpenLayers?

I need to be able to select features on a wfs layer using a polygon instead of a box. I was hoping this would be a standard option in the SelectFeature class. Too bad this isn't the case. Any ...
1
vote
1answer
945 views

Invalid filter when using MapServer as a WFS

I'm trying to use Openlayers and Mapserver to display a shapefile. My HTML file is as follows: <html> <head> <title>OpenLayers Example</title> <script ...
8
votes
2answers
1k views

Openlayers - Losing selection or style on layer redraw

When I zoom or move the map my layer is redrawn. This is what I want, because I have allot of features to load at once. This is the code: wfs = new OpenLayers.Layer.Vector("WFS", { ...
3
votes
2answers
3k views

Is there a way to limit the overview map to a certain zoom level?

The OpenLayers overview map control works great when I use standard options. I would like to limit the overview to one resolution, but I can't seem to find the right combination of values for the ...
6
votes
1answer
426 views

How does OpenLayers determine a layer's projection?

Could anyone explain the strategy OpenLayers take to determine the layer's projection? For example, if I didn't explicitly specify any projection for a marker layer, what projection would the layer ...
3
votes
1answer
774 views

Why is Openlayers KML-layer undefined when using permalink

I am working on Openlayers to dynamically load KML tracks on map. I want it to load filtered KML everytime map is moved or zoomed based on viewport and zoom level. I got it working with code below, ...
4
votes
1answer
3k views

GeoServer Web Feature Service (WFS) in Open Layers Problem

I am running GeoServer 2.1.1, and have a datastore from ArcSDE populated with features projected in EPSG:26918. I can successfully add a WMS to an OpenLayers map, but am having issues with WFS. I have ...
5
votes
4answers
7k views

How to display mouse position as tooltip in OpenLayers?

I want map coordinates as mouse over effect in OpenLayers. I am using the following code, however it is showing pixel coordinates: map.events.register("mousemove", map, function(e) { ...
11
votes
4answers
1k views

Options for displaying PostGIS rasters in OpenLayers

This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in ...
41
votes
8answers
7k views

How to create Vector Polygons at the same amazing speeds GISCloud is able to render them?

EDIT (outlining new bounty added): I have added the largest bounty possible to this question in hope of getting a very detailed answer. Your solution should outline a step-by-step guide utilizing open ...
16
votes
4answers
11k views

How to define layer order in Openlayers?

I have a marker layer, two vector layers and two raster layers. The marker layer gets covered by the two raster layers. Is there a way to move the marker layer always on top? Edited: The order of ...