Tagged Questions
110
votes
10answers
26k views
OpenLayers vs Google Maps?
I have used Google Maps a couple of times, but what wondering about OpenLayers.
Before starting any kind of coding, here are a couple of questions that come to my mind,
Why would I use OpenLayers ...
17
votes
3answers
16k views
Drawing a path with a line in OpenLayers using JavaScript
I have seen the examples presented here of how to draw a line but the examples only show how to do it with the mouse, by clicking.
What I want to do is draw the line manually using JavaScript given a ...
12
votes
1answer
764 views
How would I get OpenLayers feature selection and Javascript drag and drop working together?
I am writing an application that uses OpenLayers to enable users to drag and drop files on to a pre-defined set of features that get sent to a server with AJAX. The files themselves are raw data from ...
10
votes
7answers
8k views
Min/max zoom level in OpenLayers
I'm using OpenLayers to display a map in a web page. I am using tiles from CloudMade, but the same issues occur with the Mapnik tiles from OpenStreetMap.
I'm trying to restrict the map so that the ...
8
votes
3answers
2k views
Openlayers / Openstreetmap background is vertically striped and squished
So the background of my openlayers implementation appears to be squished into vertical stripes. The weird thing is that it wasn't always like this but even when I stash all my changes back to a point ...
8
votes
3answers
5k views
Javascript “unspecified error” in Open Layers
I am getting this error when the map loads.
The error is in the original, unmodified OpenLayers.js file on this line:
return!!(document.namespaces);
I have tried rewriting it to:
return ...
7
votes
2answers
5k views
Forcing an OpenLayers Markers layer to draw on top, and having selectable layers beneath
I have an OpenLayers map with a raster base layer, a vector layer and a markers layer in that order. They display fine, in the correct order with the markers on top of the vectors, great.
But when I ...
6
votes
2answers
3k views
OpenLayers: disable zooming on double-click
OpenLayers, by default, zooms in when a user double clicks a map.
What is the best way to disable this behavior?
6
votes
1answer
8k views
Using an PNG or JPEG for Map with OpenLayers (Scale/Zoom Problem)
I am using an image to display my map with OpenLayers. My JS code looks like this:
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 7,
isBaseLayer: true,
...
6
votes
1answer
3k views
How to get the current viewport of the map out of OpenLayers as geometry, bounding box or wkt?
I'm trying to find some hints where I should search for this topic but I've nothing found - and I spent many hours on this.
I'm also trying to get the current coordinates out of the current displayed ...
6
votes
1answer
6k views
How to select a feature programmatically on a vector layer in OpenLayers?
I'm currently searching for a solution to select (or highlight) a vector in a OpenLayers.Layer.Vector.
I've build a simple gridtable where a user can pick a vector (given as WKT formatted string) ...
6
votes
2answers
2k views
OpenLayers Refresh Strategy Problems
I'm developing an application, part of which uses OpenLayers (calling a Geoserver-served WMS) displaying some frequently updated data (a vessel track - or more specifically, a series of points).
I ...
6
votes
2answers
1k views
OpenLayers, and GeoJSON, not multiply marker on same coordinates
My code is showing markers from GeoJSON, when I'm haved zoomed into zoom-level 10,it load the GeoJSON-file, but how do I avoid to reput out the same markers?
Is there a way to check if there already ...
6
votes
5answers
1k views
performance difference between openlayers, decarta and google maps
We have recently been transitioning our company mapping system from Google map, first to deCarta and then to OpenLayers. We have found that OpenLayers and deCarta are remarkably slower than Google ...
6
votes
1answer
238 views
OpenLayers latitude inaccurately captured in Webkit Mobile browsers
I am programming a page with a Map where I need to capture the location of the Tap/Click on a map and store the coordinates. I am using OpenLayers js. On desktop browsers (IE/FF/Chrome), this is ...