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

learn more… | top users | synonyms

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
691 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, ...
5
votes
1answer
581 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: ...
5
votes
2answers
5k views

Will mousedown events fire with Touch events on OpenLayers mobile?

I can't get the mousedown event to fire on a mobile device when I click on a marker. I'm using openlayers 2.11 with TouchNavigation. The mousedown event fires just fine in Chrome on my Desktop. Are ...
5
votes
4answers
8k 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) { ...
4
votes
1answer
540 views

Is there a way to get centroid of geographic object in MSSQL?

I have a table of OSM geographic roads in MSSQL 2012. I want to create a new column with the centroid of each road (So I can set center on OpenLayers map for each road). How can I do it ?
4
votes
3answers
4k views

How can I unselect a feature in Openlayers?

I am able to identify the selected features on my map using the following line: vector_layer.selectedFeatures I would like to be able to deselect this feature using a standalone function (not an ...
4
votes
1answer
898 views

OpenStreetMap tiles not loaded despite being received

While using OpenLayers to load OpenStreetMap, I observe that part of the map would sometimes be covered with blank pink tiles. I searched and found similar complaints with solutions suggesting the ...
4
votes
1answer
2k views

Overlaying WMS from Mapserver in OpenLayers with epsg:900913 from Google/Bing/OpenStreetMap

ADDED: Another curious effect is that no matter to what scale I zoom on the baselayer google/bing map, the WMS overlay is always the same-sized shot of MN. That is, as the baselayer map is scaled up ...
4
votes
1answer
2k views

How can I remove a layer from layerswitcher in openlayers?

I have several vectors and WMS layers in layer switcher.But i don't need these layers to be displaying in layer switcher.How can i remove these layers from layer switcher? Thanks in advance..
4
votes
1answer
600 views

Authentication in geoserver with openlayers

Is there a way to authenticate in geoserver with a external webpage (made with asp.net and openlayers)? I have restricted the access data only by certain users, and I don't want to authenticate this ...
4
votes
0answers
371 views

Map is missing when I “export as image” via print composer [closed]

I have point data on a vector layer that prints accurately via print composer (when I "export as image"), however my map below either does not show up or shows up at an incorrect scale. I used ...
4
votes
3answers
554 views

Can I prevent features from being created outside an OpenLayers map?

In our app, we allow users to create features on maps. The boundaries of these features will later be converted into real-life latitude/longitude coordinates, but does not make sense if features are ...
4
votes
2answers
2k views

Prevent OpenLayers WMS layer cache by browser

I am using OpenLayers (GeoExt) with google chrome browser. All WMS layer is for live database. I have refreshed the browser at certain interval using javascript but the data is cached in browser and ...
4
votes
1answer
3k views

Print Library for Open Layers?

I realize this is a bit of an open question but are there any known open javascript libraries which facilitate printing an OpenLayers map? I'm looking to produce the content on the client and ...
4
votes
1answer
7k 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?
4
votes
1answer
4k 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 ...
4
votes
1answer
5k views

register event “loadend” on layer

I'm trying to register a listener event on "loadend" for my google maps layer on OpenLayers. But for some reason it's not firing. There must be something small i'm overlooking. What is wrong with my ...
3
votes
0answers
103 views

How to determine and send alert SMS for next bus stop in a GPS tracking system?

In my gps tracking system (PHP/MySql) I have got 5 Stops for a vehicle. Whenever the bus reaches stop 1, the passengers at stop 2 should get an SMS alert. And in the same way for the sops followed ...
3
votes
2answers
697 views

Cluster Strategy different Labeling at Different Level

what I did? I am trying to plot some points using cluster strategy of openlayer using animatedCluster plugin. I have gson data as given: { "type": "FeatureCollection", "features": [ { ...
3
votes
2answers
316 views

Question Regarding Interpretation of Openlayers BBOX in 4326 Projection

I have a BBOX strategy in my Vector layer, which is sending HTTP GET Requests to my server in order to get the features I wish to display. The projection of the layer is EPSG:4326, so it is my ...
3
votes
1answer
264 views

Can I use QGIS plugins in PyQGIS as a stand alone script without iface?

Can I use a qgis plugin especially (openlayers plugin) in stand alone pyqgis script? I don't find examples, just code using iface but that cannot used in stand alone script.
3
votes
2answers
484 views

How to get column names of layer (WMS) using OpenLayers?

Is it somehow possible to get layer's column name using OpenLayers? any example and documentation would be really useful? Edit: I have already tried WMS_describeLayer topp:states layer: <?xml ...
3
votes
1answer
1k views

How to display a control (zoom bar) outside map container in openlayers?

Since I'm new to OpenLayers this question might be the simplest of them all but after a quick search on the subject I couldn't find anything useful, so: Is it possible to put a OpenLayers zoom ...
3
votes
1answer
1k views

Wrong tiles generated in OpenLayers XYZ layer

I am creating a map in OpenLayers using Base layer as ESRI online map server. And second layer as our own esri map server serving the overlay. The Base layer shows correctly, but OpenLayer requests ...
3
votes
1answer
2k views

How do I clip/mask a satellite photo to a polygon?

Given a shapefile composed of contiguous polygons, I'd like to clip (or mask) regions of satellite photo to the polygon outlines, and export each resulting raster in medium resolution for further ...
3
votes
1answer
3k views

Change Vector projection in Openlayers

I have added vector layer to map vactorTest = new OpenLayers.Layer.Vector("Editable Features", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], projection: new ...
3
votes
1answer
555 views

GeoServer - Serving html files

Encountering a Geoserver - Openlayer WFS layer not visible I found this interesting answer . Solution about html page on the server surprised me very much as I tried previously to load an html page ...
3
votes
1answer
4k views

Path to proxy.cgi for GeoServer is not accessible in browser

There have been several questions very similar to this asked already (including ones not involving GeoServer), but their solutions have not solved my problem. I am trying to use getFeatureInfo on my ...
3
votes
1answer
1k views

Can a layer's style be modified dynamically using an SLD in OpenLayers?

I am a complete novice with GeoServer and OpenLayers. I'm trying to ascertain at what point a style is applied to a GeoServer layer which is drawn in OpenLayers, when using an SLD. The Introduction ...
3
votes
1answer
2k views

OpenLayers SelectFeature control ignores graphicZIndex

I am having trouble with SelectFeature control with hover = true and highlightOnly = true. There are two adjacent polygons on the same layer, one on top of the other. There's also a SelectFeature ...
3
votes
2answers
4k 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 ...
3
votes
2answers
1k views

How to set a custom center and zoom level for Zoom World icon in OpenLayers?

OpenLayers Zoom Pan Control has a Zoom World Icon. When it is clicked the map zooms all the way out. Is it possible to override this behavior and define a center and zoom level to which the map should ...
3
votes
1answer
2k views

OpenLayers WFS protocol query after vector layer creation

I want to be able to create a layer on init, then load features from a WFS protocol afterward. I'm having trouble doing this. Using WFS protocol in vector constructor works fine and is not my ...
3
votes
2answers
665 views

Generate cache tiles for EPSG:27700 for use with OpenSpace

I am using GeoServer 2.1.0 (windows jetty local install for dev), open layers and Ordnance Survey openspace api and have a set of shape data that I am using as an overlay. Everything is working as ...
2
votes
1answer
523 views

Add TMS layer to OpenLayers

I have found some examples but haven't managed yet to adapt them to my needs... I have an image that is served as TMS (tiles already statically rendered): ...
2
votes
1answer
663 views

Google maps layer as the base layer and WMS as overlays shows empty map

I have a problem of showing my base layer which is Google Maps. The browser console reports "Uncaught TypeError: undefined is not a function" in var google_streets = new ...
2
votes
1answer
735 views

Problem with WFS-T save strategy in Openlayers

In my web map application, I have added the editable wfs vector layer for feature editing. But in save strategy method, Insert and Update Geometry is working fine.But Update Attributes is not saved in ...
2
votes
1answer
1k views

How to display several points of a KML with the same coordinates in OpenLayers?

I've got a KML, where several points have the same coordinate, similar to following code: <?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> ...
2
votes
1answer
402 views

How to auto-update WFST store with GeoExt/Openlayers?

I built an WFS-T with a grid panel (Ext.grid.EditorGridPanel) to edit features' attributes. Now, I want the feature store (GeoExt.data.FeatureStore) to reload/update automatically so that other users ...
2
votes
2answers
1k views

KML from EPSG:4326 to EPSG:900913

im trying to create KML files manually (XML format) by extracting data from a postGIS database with "geography" values in a column. But i belive i need to transform the projection of each row in the ...
2
votes
0answers
764 views

How to add multiple nested node in GeoExt

I have following codes, but i want to add severel parent>child>chill>child>child (4 level inside) nodes with all check box options (for user choice) in the tree panel, in fact sum of all these (parent ...
2
votes
3answers
813 views

adding non spatial attributes using geoserver

I am using Openlayers + geoext to perform transaction operations in postgis database using geoserver . i can insert spatial data into postgis but cannot insert other data like road name, road type in ...
2
votes
3answers
642 views

Can we request new OpenLayers WMS image for an extent without moving the map?

Can we request new OpenLayers WMS image for an extent without moving the map center ? Reading OpenLayers code, OpenLayers move map center to new extent, and THEN do HTTP request to get the image. Is ...
2
votes
3answers
2k views

OpenLayers GetFeatureInfo for GeoServer Layer Groups

I've created a GeoServer layer group. I'm using OpenLayers.Layer.WMS to retrieve the layer group, and this works fine. In addition, I'd like to pull feature info for the layer. For this, I'm using ...
2
votes
0answers
378 views

Zooming the map after filter

I have wms layer and after i do cql filter on this. And now i want to see result. I want map zoomed to this result. My code. ex=layer.getExtent(); map.zoomToExtent(ex); But getExtent() returns ...
2
votes
1answer
881 views

Open Layers Control Modification

function testPanZoom() { console.log("test func"); var newPanZoom = new OpenLayers.Control.PanZoom(); OpenLayers.Util.extend(newPanZoom, { onButtonClick: function(evt) { ...
2
votes
1answer
1k views

How to make a predetermined Polygon (Circle) From 4 Coordinates, The Radius and Center Longitude and Latitude in Openlayers

I know how to make a predetermined Polygon in Openlayers (see below). Please have a look at http://studio.netnrg.co.za/dev/rnd/blake.loizides/openlayers var feature2 = new ...
2
votes
1answer
1k views

QGis failed with error: latitude or longitude exceeded limits

I have some shapefiles from vegetationtypes in QGis and i wanted to put a googlemap in background, so i installed the open layers plug in. But every time i tried to load the map, theres an error ...
2
votes
1answer
233 views

Select all vector features underneath the mouse cursor (clientside)

I have a number of polygons that are exactly equal covering each other and shown on one layer. When using OpenLayers.Control.SelectFeature - only the topmost feature is selected. How to get info on ...