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

learn more… | top users | synonyms

6
votes
3answers
738 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 ...
6
votes
2answers
235 views

Is it necessary to master openlayers to use geoserver?

Is it necessary to learn openlayers to use geoserver? Can i completely ignore OpenLayers so long as i master using geoserver to publish data on my website because i understand openlayers is contained ...
6
votes
4answers
3k views

Best solution for printing Google Maps?

What is the best solution so far for printing Google Maps as a base layer of Vector layers in Geoserver/OpenLayers application ? I used to print WMS layers using GeoExt print page example, but when ...
6
votes
4answers
7k views

How to reproject base layers in OpenLayers?

The issue is: I have vector/topo/image tiled maps for some places in north america which were published as ArcGIS Server REST service. These maps (A) are based in EPSG26912 projection. Now I wanna ...
6
votes
3answers
1k views

Determine if a polygon intersects itself in OpenLayers

I let the users draw polygons and then I try to save them out to the SQL Server 2008 SQLGeography field, but it is giving me an error: Error 24200: The specified input does not represent a valid ...
6
votes
2answers
4k 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 ...
6
votes
1answer
4k views

Openlayers wfs vector layer

I'm trying to add a vector layer with a wfs layer and it's not working.Can anyone point a solution? Openlayers code: var wfs = new OpenLayers.Layer.Vector( "Stavros Features", ...
6
votes
3answers
391 views

Why is using Bing Maps with QGIS free but not with ArcGIS?

Since the end of 2013 a free use of Bing Maps in ArcGIS is no longer possible. You have to obtain a Bing Maps key directly from Microsoft. In QGIS (with OpenLayers plugin) it is possible to use Bing ...
6
votes
2answers
2k views

How can several vector layers have different controls, using Openlayers?

Using openlayers I have two vector layers. One layer is called lineLayer consisting of vector lines, and the other is called pointLayer consisting of points. When I hover on the lines I want to be ...
6
votes
2answers
1k views

Does an openlayers vector layer work across browsers?

I was under the impression that it was. Here is my example: <html lang='en'> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
6
votes
4answers
3k views

WMS GetFeatureInfo and CQL on Multiple Layers

I am having issues with querying CQL filtered layers with OpenLayers and GeoServer, using the GetFeatureInfo control. It is ignoring the CQL filter and just querying the entire layer (as evidenced by ...
6
votes
1answer
494 views

Do OpenLayers maps always show/flash an empty screen while zooming?

When double-clicking on an OpenLayers map, the screen is momentarily blank while the next zoom level draws. Is this avoidable? It's not ideal, given that many other mapping APIs show a smooth zooming ...
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 ...
6
votes
1answer
664 views

What is the difference between projection and displayprojection for a Map in OpenLayers?

I am familiarizing myself with Openlayers, and am having trouble with understanding the projection and displayprojection properties for a Map. When the map is initialized with the following code: ...
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
459 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 ...
6
votes
2answers
592 views

How to check whether a layer is vector or not in OpenLayers?

am not sure whether this is a stupid question or not.. but I am wondering how to dynamically check whether a layer object belongs to OpenLayers.Layer.Vector class. Thanks for any replies!
6
votes
2answers
2k views

OpenLayers/proj4js and the EPSG:27700 (UK) Projection

I'm trying to use OpenLayers to transform projections, which in turn uses the http://proj4js.org/ library. var ll = new OpenLayers.Projection('EPSG:4326'); var a = new ...
6
votes
1answer
3k 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 ...
6
votes
1answer
4k views

Trying to place a Point geometry on OSM map, unsuccessfully

I have a piece of code that takes a map layer and places a vector layer on top of that. Currently, I'm just trying to place a few points on top of the map, unsuccessfully. I managed to place 1 point ...
6
votes
2answers
592 views

How can I zoomToExtent and then zoom out?

I use openlayers 2.12 I use HTML5's geolocation API to get the coords and then I insert them in a layer as feature (point). After that, I zoom in , since the layer has no other feature. ...
6
votes
1answer
210 views

Fast data representation on the vector layers

I have found an interesting article about how HTML5 supports representation on large datasets. Article can be found here. In the article it is said that HTML5 and feature simplification can ...
6
votes
1answer
2k views

OpenLayers measure tool - instant measurement

I need to use measure tool to measure distances (instant measurement!) in my application. Instant measurement example can be found here. But the main problem is that when I use instant measurement ...
6
votes
1answer
2k views

What's the difference in using OpenLayers and Mapbox?

Hey guys I found this tilemill to develop WebGIS application using MapBox. I wanted to know how is it better than OpenLayers and if I have to develop which would be a better options to go for, as I ...
6
votes
1answer
2k 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
3k views

How to select multiple Features from multiple Layers in OpenLayers?

Is there a way to select multiple features from multiple vector layers by using clickTolerance in click? I checked the documents of getFeature control and selectFeature control, seems not work in ...
6
votes
2answers
2k views

OpenLayers tooltips

Please point me to examples of combining OpenLayers and any external tooltip libraries like this. I try to use native OL tools for building tooltips here, but they not flexible and customizable. ...
6
votes
1answer
1k views

How to enable smooth zoom in Openlayers in default library set?

I've compared two Openlayers samples: Online dev example - clientzoom release dev example - clientzoom First one zooms in smoothly, second one just flashes and shows tiles from next zoom level. ...
6
votes
1answer
678 views

Is dynamically generating Choropleth maps a solved problem?

I am trying to work out what mapping tools I would need to use to dynamically create Choropleth maps from our data. I am working on a project where the backend is a big database of statistics, and ...
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 ...
6
votes
1answer
2k views

Draw route direction overlay on Google Maps or OpenLayers

I'd like to display the route direction generated from GraphServer on either Google Map or OpenLayers. The result I want is basically identical to how Google Map shows route directions, by ...
6
votes
3answers
1k views

Openlayers - Cloned features get style from original feature

I am having a problem with the styling of a WFS vector layer from GeoServer after cloning features from it and adding them to a new feature. First I create a new empty vector layer and add it to the ...
6
votes
1answer
999 views

How import a shapefile on-the-fly and have GeoServer render it instantly?

I am tasked with adding one feature to an existing app. It was built with OpenLayers and GeoServer. The task is to import a shapefile on-the-fly and have GeoServer render it instantly. However, I ...
6
votes
1answer
164 views

Is it possible to display an OpenLayers map upside-down?

This is more fun than a serious question, but I'd like to know if it's possible to display an OpenLayers map upside-down as per the uncommon, but interesting upside-down maps. I guess it's mostly a ...
6
votes
1answer
711 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, ...
6
votes
1answer
3k views

Changing the geometry of polygon in OpenLayers

i would like to programatically change the geometry of a polygon. feature.geometry.move() works ok, but i rather need supply a whole new geometry. When i try feature.geometry = newGeometry, the ...
6
votes
2answers
590 views

Is there a way to use image sprite for different marker icons?

I just made the switch from Google Maps V3 to OpenLayers. I realise that OpenLayers API uses a lot of inline styling. If an image file consisting of several images can be used, it would cut down ...
6
votes
2answers
375 views

How to visualize geolocated data on a slippy map on a website?

I am trying to visualize some data on a website that has been measured while driving around. My source is a CSV file with longitude, latitude and my measured data. I have been able to export it to a ...
6
votes
3answers
958 views

OpenLayers WFS flip coordinates

I have a problem integrating WMS and WFS. Basically what i want is when user clicks on WMS then a clicked polygon is added to vector (and selected). The problem is that the WMS is in version 1.3.0 and ...
6
votes
1answer
7k 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 ...
6
votes
3answers
3k views

Difficulty to display WMS and Googlemaps layers using Geoext and ext

i have the following code on my html file: // World Geodetic System 1984 projection var WGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 Google Mercator projection var ...
6
votes
2answers
2k views

Openlayers geometry: how to convert area from degrees to square kilometres?

I get a multypolygon from my web service and want to calculate the area of that polygon. I was trying to use this piece of code: var poly = new OpenLayers.Geometry.MultiPolygon(poligon); var area = ...
6
votes
2answers
842 views

Tilemill Dynamic Tile Generation

I have recently used Tilemill and I wish to implement it for dynamic tile rendering.As I've seen an CartoDB doing in cloud system,they can query & generate dynamic tile for request with UTFGrid. ...
6
votes
5answers
1k views

Deactivating Openlayers Cluster after a certain zoom level

I want to deactivate the cluster strategy after zoom level 16. The Cluster strategy gets deactivated and I also change the style of the original features and redraw the layer. But still it takes the ...
6
votes
1answer
74 views

Geoserver and PostGis output [closed]

I have a peculiar rendering of a small table in PostGis of polygones (imported from a shape file) from Geoserver (layer preview with OpenLayers) The object are just cloned ... Would you give me a ...
6
votes
1answer
172 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, ...
6
votes
1answer
351 views

How To Do OpenLayers.Mobile Popup

It seems that the OpenLayers.mobile.js library (v 2.12) doesn't have a popup class. Does anyone know how to do a popup with the mobile version? I'm using some code that i ported over form normal OL ...
6
votes
2answers
964 views

Options for PostGIS and Mapserver outputing SVG, and client with OpenLayers

This question is related to "Options for displaying PostGIS vectors in OpenLayers?", but I need SVG output on server. OpenLayers must render SVG directly. We are using Mapserver6, and thinking on WFS ...
5
votes
2answers
5k 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 ...