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

learn more… | top users | synonyms

1
vote
1answer
909 views

OpenLayers ZoomBox control kills SelectFeature event firing

I have a navigation toolbar with some common OL controls such as Navigation and ZoomBox on it. I also have a SelectFeature control that isn't part of the navigation toolbar b/c it should be active ...
10
votes
4answers
16k views

How to add a simple WFS layer from GeoServer to OpenLayers map?

I'm trying to add one of the included datasets with GeoServer to an OpenLayers map. I've followed the OpenGeo tutorials, seen similar thread on here, but I can't seem to crack it. Can somebody take a ...
3
votes
3answers
2k views

How to register onclick handler for *all* KML feaures in OpenLayers?

I'm a newbie using OpenLayers with JQuery to display vector data from KML files. I'm creating the layer like this: newlayer = new OpenLayers.Layer.Vector( layerid, { projection: ...
0
votes
3answers
5k views

Understanding the polygon handler function in Openlayers

Using openlayers, I want to be able to draw one polygon on a map. After one polygon is drawn, I want an event to fire that stops any more from being drawn until a button is pressed. My current code ...
2
votes
2answers
1k views

How to cache online tiles on a development machine?

I am developing a slippy map web application using openlayers. Right now my tiles come straight away from OSM and google, etc. For the moment I always work on the same area for development purposes ...
2
votes
1answer
3k views

How can I update the label of a Polygon Vector after it has been drawn?

I am quite new to OpenLayers. Right now, I have a polygon vector with some styling applied and a label. var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']); style.pointRadius ...
2
votes
1answer
503 views

Why does Mapserver (ms4w) not generate tmp images?

I am having trouble with my web-based application, where my tmp images are not being stored for later retrieval. The images are generated each time they have to be loaded, so zooming out and then back ...
5
votes
4answers
930 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. ...
4
votes
1answer
1k views

How can I change the display name of the “Scale” control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but I can't find how to do it. I searched in the ...
11
votes
3answers
777 views

Web mapping software for a huge raster time series?

I'm an ArcGIS Desktop user who is stepping into the world of web mapping for the first time. Following advice I found here on GIS.SE, I started with the free tutorials from OpenGeo. However, I ...
4
votes
3answers
3k views

How do I determine the center point of several features in OpenLayers?

I have several polygons being drawn on a map, usually representing a country or province or state. Depending on some chosen data, different regions may be selected, so what I was hoping is that ...
3
votes
1answer
719 views

OpenLayers polygon fill on IE has black shading

I have an odd problem on with OpenLayers on IE6, IE7 and IE8. A newly drawn polygon has odd black shading. In fact, even the line (stroke) has the same black outline. Works great in Firefox, ...
2
votes
4answers
2k views

WFS getfeature request with diffent SRS

I'm having problems with a WFS getFeature request. I'm using openlayers with an OSM map as baselayers which use the google projection. Overlaying the layer with WMS works perfect. When I do a request ...
3
votes
1answer
671 views

How do I fire a function after all features have been selected by a box in OpenLayers?

I have a map rendering with Polygons on a Vector layer set up as features. I set up the features so they fire off a function when the feature is selected and this works fine. The issue I'm having is ...
1
vote
2answers
3k views

SelectFeature not working in OpenLayers

I'm still sort of new to openlayers, but I've been able to set up a map which reads in a KML, loops through the different regions contained therein, and draws those polygons on a vector layer overtop ...
12
votes
2answers
4k views

OpenLayers alternatives supporting more client-side features

I am considering different architectures for a system that will ideally use client-side rendering for point features and must be plugin-free. I have been using this application developed in response ...
3
votes
2answers
2k views

GeoServer OpenLayers preview always points to localhost:8080

In GeoServer, when I go to Layer Preview/OpenLayers, I get a web page, but the HTML points to localhost:8080 (instead of a relative path) for its WMS requests, so I can only see previews on the server ...
4
votes
1answer
6k views

Setting up MapServer WMS and use it with OpenLayers

I have set up MapServer WMS on the localhost by the following map file: MAP NAME "Prvi_WMS" SIZE 600 300 # 600 by 300 pixel image output PROJECTION "init=epsg:4326" END ...
2
votes
5answers
3k views

Event listeners after each plotting of a point of a Polygon Vector in OpenLayers

I am quite new to OpenLayers. I have a polygonLayer for users to draw polygon vectors. The plotting feature is working fine. polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); ...
1
vote
3answers
354 views

How can we improve the OpenLayers documentation? [closed]

I have difficulty understanding the documentation. Is it just me? Are there alternative sources of information?
5
votes
2answers
2k views

Using the jQuery UI Slider to control layer opacity in OpenLayers

Added some bounty so more people take a look at my question. Thank you. I have been trying to utilize the jQuery UI Slider to control layer opacity in OpenLayers but I have an issue when trying ...
0
votes
2answers
372 views

Problems with zooming and mouse events in Openlayers

I'm having trouble with everything mouse related for an Openlayers map when the map is placed inside a DIV with position fixed. The map works fine when you're at the top of the viewport of the ...
5
votes
1answer
890 views

What is the best map provider solution for repetitive routing use?

[edit] What is the best solution in terms of cost effectiveness, stability & speed for running a lot of routing requests and comparing them. lots of times over and over? I understand now that it ...
4
votes
1answer
3k views

Select single feature from multiple types with WFS in OpenLayers

I have a WMS base and from that create a Vector Layer for selections. Then I create 3 Control.GetFeature() controls, each using WFS to select a different feature type upon clicking the map (the ...
2
votes
1answer
609 views

How does mapscript queryByShape work?

I am trying to return the results of queryByShape call from a (large) raster file given a user specified polygon. For example, when a user plots the following polygon on an openlayers layer as ...
2
votes
4answers
609 views

MapServer rendering at the lowest zoom levels

I am developing a web mapping application based on OpenLayers and using a WMS layer from MapServer (the source data for this layer is stored in PostGIS database) and I am facing the following problem: ...
2
votes
1answer
2k views

How to add labels to a WMS layer using OpenLayers and GeoServer?

I have point of data in mysql server. I am displaying this layer as WMS using OpenLayers and GeoServer. How can I add label to this layer?
2
votes
0answers
433 views

How to set up multiple Content.ftl files in Geoserver?

So today i started to play around with the content.ftl file for geoserver to change around the popup style. In playing i've discovered that if i call in my content.ftl file which contains code for a ...
4
votes
1answer
583 views

Openlayers: Clustering in Openlayers.Layer.Text

I have a map that displays 5 layers of markers. Each layer is a group of POI's. I load the POIs from textfiles using var cycling = new OpenLayers.Layer.Text( "Cykling", { location:"./textfile.txt"} ...
2
votes
1answer
588 views

How can I place a couple of html elements on the map?

I need to place html elements for drawing in it some text and graphic by Raphaeljs. Is it possible? I'am trying to create an empty marker for each visible feature and then erase icon container and ...
0
votes
1answer
356 views

How can save and restore my map's extent with GeoExt?

I'm using GeoExt with OpenLayers and trying to save the extent of the map. while exploring the page, users can be able to save the extent and restore via their browsers. Here is the point that I'm ...
4
votes
1answer
2k views

How can i search over my layers with openlayers?

i have my map running over geoserver and openlayers. but i want to add a search box to find places in it. Well not specifically places but directions. The map reads the layers directly over geoserver ...
4
votes
2answers
4k views

How to change the default color used by openlayers hover?

It is possible to change the color of highlightCtrl when I use onselectedHover? Default is light blue. I want to change it to another one eg. red? Does anyone know where this value is defined?
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 ...
3
votes
2answers
2k views

openlayers + mapserver: controlling tiles

I have a mapserver serving the following mapfile: MAP NAME "GLOBCOVER MAP" # Map image size SIZE 1000 1000 UNITS meters EXTENT -30.001389 -30.106069 80.998611 80.108847 ...
6
votes
2answers
989 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"> ...
1
vote
1answer
970 views

How to add mappanel back to container once removed?

I am trying to test following scenario: A Ext.Window has one gx_mappanel item; both Ext.Window and gx_mappanel are stored in variables; One button is to remove gx_mappanel item from Ext.Window ...
5
votes
2answers
3k views

Using OpenLayers - seeking example for saving feature to database using Ajax

I'm trying to save a point to the database using a balloon that has an input field and a save button. The button triggers the code and sends the feature info to the PHP page. It works, but the save ...
2
votes
1answer
157 views

How can I show custom titles on my table fields with OpenLayers?

I have a server with Geoserver, Apache and OpenLayers and it displays the map okay; I can see my data with an OpenLayers.Popup.FramedCloud call and it shows the content of my layer. I want to know if ...
2
votes
2answers
5k views

OpenLayers LatLon conversion

I have an OpenLayers map with a settings like a below. All LatLon points are represented like a POINT(3684182 5207957). In a more usual form (for me) it looks like a (104.287422, 52.284126). How can I ...
3
votes
1answer
680 views

geometryType property of Vector Layers in OpenLayers

ORIGINAL: I have a couple questions that are focused around the geometryType property with vector layers. When you create a vector layer you can set the geometryType property to limit the geometry ...
6
votes
1answer
427 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 ...
2
votes
0answers
844 views

GeoExt (ExtJs + OpenLayers): bug in IE9 when try to change map_panel from container A to container B

Techonology: GeoExt, which combines ExtJS with OpenLayers I am trying to dynamically change the app layout by changing a map_panel from container A to container B, and vice verse; basically, for each ...
2
votes
2answers
1k views

How to query which features of all vector layers intersect with a given bounds?

I am writing a Openlayers map app, and wondering whether there's a better practice to query which features of which vector layers intersect with a given bounds.. It's certainly not a good idea to ...
4
votes
2answers
918 views

TileCache and Openlayers Problem - Projections?

I have a very known problem, but I can't solve it. I have set the same maxExtents in the config as in the Openlayers init JS. I have done the same thing with the projection (EPSG:900913) and done all ...
9
votes
2answers
450 views

Is there a way to draw a straight line on a map which also represents a straight line on the earth surface?

I'm trying to understand more on projections. In this example, why must one calculate the curvature of the earth (great circle) if the map is already projected? Is there a way to draw a visibly ...
2
votes
1answer
175 views

OpenLayers.Control.DrawFeature Accuracy problem

When i draw a polygon using the OpenLayers.Control.DrawFeature then i export that polygon to KML using OpenLayers.Format.KML. Though, when I open it in google earth there is a big difference between ...
4
votes
1answer
1k views

How to center a popup window exactly where I've clicked?

I have a question how i can change this code selectedFeature = feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, div, null, ...
5
votes
2answers
2k views

How to create Geodesic Polygons in OpenLayers?

I would like to create geodesic polygons in openlayers. This is not the same as this question although VERY similar. Geographika was able to do it but his solution is based on a circle. I'm ...
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"); ...