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

learn more… | top users | synonyms

7
votes
2answers
9k views

OpenLayers: Use scales instead of resolutions

Venturing around in the OpenLayers source code, it seems like everything related to zoom-levels is done using resolutions. Fair enough since this related directly to screen space. I would like ...
8
votes
3answers
1k views

Best way to animate radar data in openlayers

I have a project using OpenLayers which displays radar data on a map. The radar data itself is just a bunch of polygons each of which is filled with one of 6 possible colors. The goal is to animate ...
7
votes
4answers
8k views

How to select fields returned by GeoServer WMS GetFeatureInfo request?

I'm running simple local mapping service based on PostGIS/GeoServer/OpenLayers stack. Following opengeo tutorial I've tied click events in OpenLayers to WMS GetFeatureInfo call using: ...
6
votes
3answers
1k views

30,000 data points… can this be reasonably served using openlayers?

I'm trying to tackle a web GIS problem and need to figure out the best strategy. I have a map with 30,000 cells on it forming a grid for the province of Alberta. I have a list of data points for ...
8
votes
2answers
1k views

Map hosting options

I'm trying to figure out how to best get started on a web-mapping project, and am wondering about where I should host my maps from. In terms of my skills, I'm quite good at desktop mapping and ...
6
votes
3answers
2k views

How to generate a thumbnail of an openlayers map?

I would like to allow the user to generate a thumbnail image of what the user is seeing in the OpenLayers map canvas so the user may print, save, share, email, or whatever. Any ideas of how i would ...
6
votes
1answer
2k views

Using local mbtiles in openlayers?

--The problem-- I've successfully added mbtiles from Mapbox free online source to OpenLayers, but cannot figure out how to get the mbtiles I've created/stored locally to show up in OpenLayers. --The ...
5
votes
4answers
934 views

Where to start with Web GIS development, or which technology to select?

I am very new to GIS development, and to be be frank I have no background about it at all. I searched the web but the tutorials I found seemed to assume the reader has some background information. ...
5
votes
1answer
971 views

Maximum number of Tiled Layers in Open Layers

I'm developing an OpenLayers site where the client wants a dozen layers that can be individually turned on and off, which is a bit of a bummer in terms of performance. The data is PostGIS and static ...
4
votes
1answer
1k views

How to draw Geodesic lines in Openlayers?

Hi i want to display multiple lines between two coordinates. i will pass no of lines and color of the line, it has to display like below image. please see the below image.this is my previous post
3
votes
1answer
286 views

What is the best practice to show GPS movements on map (Openlayers or Leaflet) using DB and Geoserver?

I have GPS unit which update the DB with Points every 10 seconds. I want to show the position in real time (as much as I can) on map using OL or Leaflet. What I did is serving the Point as Layer in ...
3
votes
3answers
845 views

How do I edit info feature attributes in GeoServer with OpenLayers

Can you help me? I have a very difficult problem when doing project... I have used OpenLayers and GeoServer. When I click in the map to get feature info, I receive the info for the feature and ...
3
votes
2answers
2k views

Load layers only when zoom level is reached

I'm trying to load different layers based on the user zoom level with OpenLayers. I've seen some similar questions in here, but they load the layer and then hide/show it based on the zoom level. I ...
2
votes
1answer
1k views

Unable to see whole world map by decreasing panzoom bar?

I am seeing one weird thing in Openlayers today. I am unable to see whole map by using panzoombar, previously i used to. <html> <head> <title>OpenLayers Example</title> ...
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 ...
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 ...
13
votes
6answers
6k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
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 ...
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", { ...
8
votes
4answers
7k views

How to Dynamically refresh / reload a KML layer in OpenLayers

I have previously asked this question to no avail so I thought putting this up here would be a good idea. Here is an example on: How to Refresh / Reload a KML layer in OpenLayers. Dynamic KML Layer. ...
7
votes
2answers
1k views

How to resize a point on zoom out?

I've added a point on map like this but it is static in size. How to resize that point on zooming? Map on zoom out Any guidance and help is appreciated.
7
votes
4answers
2k views

Is it possible to put Geoserver behind a proxy and access the WMS/WFS using OpenLayers

I just start to work with Geoserver and Openlayers and one of the main concerns of the project now is do not expose the geoserver web interface outside of the internal network. No access to ...
7
votes
9answers
1k views

WMS with Access Control (ACL) for different users? Or solution for thousands of points on web map?

I have a set of Sites in the thousands. Not all users see same the same Sites on the map - thus ACL. Data is stored in a non-GIS database (mssql, ora, etc) and right now is retrieved with a standard ...
6
votes
5answers
480 views

A good tutorial for Openlayers

I need to create a web map showing many raster layers. I am using mapserver and want to use Openlayers, however I can't find any good tutorial about it. I see a couple of old questions (1 and 2) ...
6
votes
2answers
2k views

OpenLayers filter: OGC (xml) or CQL?

While having not used filtering that much in OpenLayers, we are discussing which type of filtering we should use: The OGC XML filter or the more simple CQL filter? Are one of them more appropriate ...
5
votes
1answer
491 views

Enabling CORS in OpenLayers

Is it possible to enable Cross-Origin Resource Sharing (CORS) in OpenLayers? If so, how? I have a web map in OpenLayers, and I'm using an HTML canvas to render it as a PNG image. My script works ...
5
votes
2answers
4k views

OpenLayers canvas renderer - redraws all features on selecting a single feature

I am currently trying to learn more about OpenLayers, and I'm coming up against performance / behaviour issues that I wouldn't expect to see. To elaborate... I have combined this example for ...
3
votes
2answers
352 views

Design question: what's the role of WFS-T in this kind of webapp?

I have more experience in "traditional" (Java EE) webapp development, and I am trying to figure out a decent design for a mapping web application. My application has a map, and users can see and edit ...
3
votes
1answer
3k views

OpenLayers - is it possible for a feature to have both a single click and double click event?

I'm have an OpenLayer map with a single vector layer containing many features. I've been using SelectFeature to pop up some info when a feature is clicked, and that's working fine. However, I now want ...
3
votes
1answer
618 views

Is there a map-level event to signal the start/end of drawing?

In OpenLayers, is there an event which fires when the map starts drawing any layer, and another for when the map has finished drawing all layers? I wish to display a "waiting" animation while any ...
3
votes
1answer
606 views

Waiting for Vector & WFS loading

user borrowed from friend since i use vector layer with wfs protocol, there is a little while before features loaded on the map. So i need to tell user to wait a moment until they load. what best ...
3
votes
2answers
3k views

How to get routes and download them from OpenLayers?

I am trying to generate a route in openlayers with a start and end points and some points during track. I read about openroute: http://wiki.openstreetmap.org/wiki/OpenRouteService#RouteLink But I ...
3
votes
1answer
4k views

SelectFeature with Double-Click

I have the ability to select features on the map with a click using OpenLayers.Control.SelectFeature. How can i add a double-click handler to that? I have tried modifying this code to suite my needs, ...
3
votes
1answer
856 views

OpenLayers GeoJSON Data Store

Background: I have a single geoJSON data object that backs multiple Vector Layers of its features. I do this because the feature data has many attributes and can be presented in many different ways, ...
3
votes
1answer
867 views

OL+Geoserver+PostGIS(postgreSQL)

My task is to store the values in the database(postgreSQL) when the user inputs the lat-lon values in the form. and after submitting the form, the map should be displayed with markers at corresponding ...
3
votes
2answers
1k views

Zoom after apply CQL_FILTER in OpenLayers

I apply a filter to one layer and works nice. I want to maximize the bounds where I applied the filter, like this: // mapbounds = array(minx,miny,maxx,maxy) activeLayer = new OpenLayers.Layer.WMS( ...
2
votes
1answer
2k views

How to get Openlayers cluster strategy work for large data?

The map Layer has around 1500 points. I am able to display all the points in the map without any problem but adding the cluster strategy to the layer does not work. The Cluster strategy functions when ...
1
vote
3answers
3k views

Show pop-up where user clicked in OpenLayers

How to change this example ( http://openlayers.org/dev/examples/select-feature-openpopup.html ) so that when the user clicks on a line (feature) pop-up display where the user clicked? A few days ...
1
vote
2answers
2k views

How to initialize a WFS Layer?

Here is the code block (the layers are stored in Oracle database): var saveStrategy = new OpenLayers.Strategy.Save(); var adresspt_wfs = new OpenLayers.Layer.Vector("Address points WFS", ...
7
votes
4answers
341 views

Splitting Linestrings on the dateline with OpenLayers

A couple of years ago I posted a questions titled "The International Date Line wrap around" @jdeolive suggested I split the features at the dateLine. So I tried. So when I try to split my satellite ...
7
votes
4answers
1k views

Simplify GeoServer WFS output

I am dealing with some large datasets and would like to minimise the amount of data sent over the network. I am using OpenLayers' BBox strategy to only transfer the data that is needed but I am ...
7
votes
2answers
4k views

displaying feature info in a popup

Thanks to Nicklas' anwer to my previous question... I was able to "combine my shapefile and CSV data have made a lot of progress on my project. Now I want to display the attribute data in a popup ...
6
votes
1answer
1k views

Add a OpenStreetMaps road data layer on Google Maps API v3

I've successfully embedded a Google Maps API v3 map on my site, and added OpenStreetMaps (OSM) as the base layer. Is it possible to use Google's tiles as the base layer, and then overlay street data ...
6
votes
1answer
817 views

How to preserve topology while editing polygons in OpenLayers?

I’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine. ...
5
votes
4answers
7k views

Customizing Popups in Openlayers

Is it possible to customize the shape of popups in OpenLayers? For example, I am creating a pop-up using the following approach: var popup = new OpenLayers.Popup.FramedCloud( "popup", ...
5
votes
1answer
1k views

MGRS in OpenLayers

I am trying to view the Military Grid Reference System coordinates in Openlayers through the MousePosition control. Is there an easy way to accomplish this just through Javascript? I am looking at the ...
5
votes
3answers
3k views

Different level of detail(layers) on different zoom level at OpenLayers map

I want display different detail(layers) on different zoom level on OpenLayers map. I mean when zoom in should display lot of layers and when zoom out those unsuitable layers should hide automatically. ...
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 ...
5
votes
1answer
2k views

Is it possible to display the length of each segment with the Openlayers measure control?

I am trying to make a OpenLayers measure tool that displays the length of each segment on top of each segment and the total length of the measurement as shown below: I have used this example ...
4
votes
3answers
331 views

Advantages of WFS over GeoJSON/KML?

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines on top of an OSM map in several layers. Those points ...