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

learn more… | top users | synonyms

4
votes
1answer
1k views

WFS-T: changes not saved on an OpenLayers map

I have written a script allowing to display a few WMS and WFS layers and I want to make my 2 WFS layers editable. I have all my controls and can draw / modify / drag / delete my features but, on one ...
4
votes
1answer
4k views

Saving Google Earth Location: OpenLayers Plugin in Quantum GIS

I use the OpenLayers plugin to load Google Earth Layers in Quantum GIS to digitize/identify certain features. As my work is large occassionally I have to quit Quantum GIS to resume later. The problem ...
3
votes
3answers
865 views

GeoServer layer preview shows only missing images for tiles

Just getting started with GeoServer and already running into problems. When I click on Layer Preview and view any of the preloaded data in OpenLayers (or any other format) it is just blank and has the ...
3
votes
1answer
879 views

Problems with gxp Print plugin via opengeosuite sdk

I am trying to import the print plugin within an application built using the Opengeo Suite sdk and I have run into issues as is described in the following thread ...
3
votes
1answer
1k views

How can GeoJson polygons be colored programmatically using OpenLayers?

I'm experimenting with dynamically setting the color values of a geojson polygon. In my geojson file, there is an attribute for each polygon called pop_den. I am trying to update the fillcolor of the ...
3
votes
1answer
2k views

Cant see WFS-T layer with OpenLayers and GeoServer (Windows)

I am trying to implement a simple test of a OpenLayers + WFS-T + GeoServer -setup. I have followed the instructions by populating PostGIS and configuring GeoServer, and can see the WFS-T layer data in ...
3
votes
0answers
2k views

How to edit Attributes on WFS Layer through Popup?

I am working on a project for university. So far I have displayed WfsLayers which can be select from a panel, also I can click on my points whereupon a Popup will show up with some information which ...
3
votes
1answer
975 views

How to send WPS request using OpenLayers

I have generated the WPS request below using GeoServer's WPS Request Builder. I wish to append more parameters to this request (geometry selection), and then send it either using GET or POST from ...
3
votes
2answers
1k views

How to change the vertex style for editing?

When I use drag feature, then the circles on the polygon edge has the same style. For example, this OpenLayers site. I need to change it, I mean they need to be a different color. What is their ...
3
votes
1answer
2k views

XYZ Layer in Open Layers has Missing Tiles

In Open Layers I'm having a missing tile problem where it generates a missing link icon and a pink background. I found several threads including this one saying to add this code ...
3
votes
2answers
2k views

Openlayers create, edit and save/export to kml

I'm trying to create, edit and save a point vector as kml file in an Openlayers app. I have managed the create and edit by adding and empty vector layer and then adding the control ...
3
votes
1answer
4k views

How to draw lines with different colors in Openlayers?

I want to display multiple polylines with different colors in openlayers. Can any one guide me regarding this. I have done this in google maps. but i don't know how to do it in openlayers. I am ...
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: ...
3
votes
1answer
3k views

Reproject a vector layer (EPSG:27700) using WFS onto a googlemaps background (EPSG:900913)

I have the following HTML-javascript code and i have problems reprojecting the vector layer (WFS) from EPSG:27700 (British National Grid) to EPSG:900913 (googlemaps). I managed to project the WMS ...
2
votes
2answers
468 views

GeoServer and OpenLayers in production - Securing WMS calls?

I've a mapping site where users have to login in with username and password. Once logged in the user gets a map of their data using WMS and WFS to display and edit data. This data is served using ...
2
votes
2answers
369 views

How to get a feature that lies closest to a point in openlayers?

Im trying to perform routing with openlayers, geoserver and mysql. In order to get the start and end points, I need to be able to get a feature of the node layer (which has point features) that lies ...
2
votes
3answers
3k views

How to add wms layer in OpenLayers from a geoserver?

How to overlay a wms layer from geoserver (localhost)in Open layers? What is the basic syntax of Geoserver WMS Layer? Details are as follow ! workspace name: india layer name:hospitals. <script ...
2
votes
2answers
402 views

Create CMS system using Cartaro

The main objective for our project is to create a portal website in Drupal. On this website, people must be able to upload their geographical datasets (mostly shape files, but also xml files that ...
2
votes
3answers
588 views

how to change color of feature to mark it as recently modified with openlayers

I am developing a crowd sourced app using openlayers. after user clicks an feature, a popup form is displayed. After clicking the save button, the data is used in processing which takes some time so ...
2
votes
1answer
1k views

Openlayers - Get extent of WFS vector layer and zoom to that extent when map

I would like to do the following: 1) While loading an OpenLayers map object get the lat/long Bounding Box of a WFS vector layer served from GeoServer. 2) Use the extent from the WFS vector layer to ...
2
votes
4answers
973 views

creating 2 dragable layers at the same time in OpenLayers?

I have been been working with this for a while now. Whenever you add 2 seperate draggable layers, openlayers will only activate the last one added. I wish it could be as simple as the code below. But ...
2
votes
1answer
2k views

Creating Vector features onload in Openlayers

Using openlayers and javascript I wish to create two vector layers and add a polygon to one of them and a circle with a centre point to the other My polygon will be in WKT and my circle will be a ...
2
votes
1answer
839 views

How to unproject coordinates on a Google map with Openlayers?

Below is my code and a pic. When I finish making my circle on a Google map with Openlayers, I get the following coordinates but I want coordinates like E.G: bottom: -27.762124575762 left: ...
2
votes
1answer
792 views

geoserver wfs insert error

I keep getting an insert error from geoserver when trying to save a point, poly etc etc to my postgis table. any ideas, my code is below var Projection = new OpenLayers.Projection("EPSG:4326"); ...
2
votes
4answers
641 views

Incremental retrieval of data from a database - OpenLayers

I have a new task now: The user will input the lat-lon values in a html Form and when an INSERT button is clicked these values should be stored the DB. Now when a submit button is clicked the markers ...
1
vote
1answer
591 views

Probleme with WFS protocol in OpenLayers

Sorry for disturbing. I know my problem look common, but I really don't know what to make. Here is my code for getting a WMS layer in OpenLayers from Geoserver. var wfs2 = new ...
1
vote
1answer
1k views

How can I add an infowindow to an OpenLayers GeoJSON layer?

In my OpenLayers script I refer to an geojson layer. Is it possible to add an info window?If yes, how can I create this. Script is as follows: var lon = 5, lat = 52, zoom = 7, epsg4326 = ...
1
vote
2answers
335 views

How to edit using a WFS service, without showing it on the map in OpenLayers?

I have a service with about thousand points. I wish to enable the user to edit the attributes of the features. Since there are so many points, I don't want to display them as a vector layer (using ...
1
vote
1answer
674 views

GetFeature Request with Polygon Intersecting Polygons

My task is very straightforward: a user draws a polygon and query all parcel polygons. The query string extends the URL limit. So I am posting XML to WFS. However, GeoServer always returned 0 feature, ...
1
vote
1answer
720 views

Googlemaps Layer on Openscales

I'm using openscales in a web mapping project, i would like to add a Google maps layer, i know that there's some licence problems , but i don't care for these licence issues, i'm looking to add ...
0
votes
1answer
417 views

How get Map extents for draw polygon when final click is done?

I am using openLayer js to draw a polygon and now i want map extents of the drawn polygon one final click (i.e. user finish drawing polygon or double click is done). For drawing the polygon i am using ...
0
votes
2answers
8k views

Openlayers How would i get a hover label over my polygon

make a hover/mouseover label for a polygon in Openlayers? I made a map with draw, delete and drag polygon function. Now I need to make a hover mouseover for this. How to get a hover label for ...
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 ...
0
votes
1answer
2k views

Query Feature using OpenLayers + MapServer

I'm trying to query a feature in OpenLayers, but it's returning just an image highlighted that is not possible to make zoom, pan and drag. My intention is to query a feature on the map like street ...
8
votes
1answer
2k views

getExtent() in OpenLayers returns strange values

I'm trying to get the bounding box of the map area displayed by OpenLayers. I tried to use map.getExtent() because it should be exactly what I need, but the returned values are "strange": For ...
8
votes
2answers
5k views

In OpenLayers zoom to extent of all overlays

In Openlayers I can zoom to the bounding box of all layers like this: map.zoomToExtent(); I can also zoom to the bounding box of a single layer: map.zoomToExtent(layer_name.getDataExtent()); Is ...
7
votes
3answers
1k views

Suggestion about the database to be used with OpenLayers

Can anyone suggest me which database to be used with OpenLayers? I have to store the values in a DB table and retrieve them (trivial tasks). which is better MySQL or PostGIS? Can anybody give benefits ...
6
votes
3answers
801 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
623 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
2answers
4k 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 ...
4
votes
1answer
467 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
3k 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
695 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
3answers
457 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
3answers
474 views

WFS Caching / Back button

I'm using WFS protocol on Vector layer / GeoServer / PostGIS Currently the map is refreshing and calling new requests whenever i do anything like searching or drawing and when i move back to a part ...
4
votes
1answer
6k 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
3k 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 ...