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

learn more… | top users | synonyms

3
votes
1answer
162 views
+50

Misplaced Google Maps with OpenLayers plugin in QGIS?

I was using Google Maps with OpenLayers plugin in QGIS with my vector layer with projection EPSG:4326 with google map projection EPSG:3857 and "on the fly" transformation enabled. It was matching ...
3
votes
1answer
1k views

Using local tiles created in Geowebcache with OpenLayers

I am trying to setup an Openlayers page that uses a local tile cache that I have created using Geowebcache. But the HTML page and the tiles will be stored in an Amazon S3 bucket So far I have setup ...
3
votes
3answers
5k 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 ...
3
votes
1answer
840 views

Is there a map-level event to signal the start/end of drawing?

In OpenLayers, is there an event which fires when the map starts drawing any layer, and another for when the map has finished drawing all layers? I wish to display a "waiting" animation while any ...
3
votes
1answer
736 views

Waiting for Vector & WFS loading

user borrowed from friend since i use vector layer with wfs protocol, there is a little while before features loaded on the map. So i need to tell user to wait a moment until they load. what best ...
3
votes
2answers
4k views

How to get routes and download them from OpenLayers?

I am trying to generate a route in openlayers with a start and end points and some points during track. I read about openroute: http://wiki.openstreetmap.org/wiki/OpenRouteService#RouteLink But I ...
3
votes
1answer
945 views

OpenLayers GeoJSON Data Store

Background: I have a single geoJSON data object that backs multiple Vector Layers of its features. I do this because the feature data has many attributes and can be presented in many different ways, ...
3
votes
1answer
880 views

OL+Geoserver+PostGIS(postgreSQL)

My task is to store the values in the database(postgreSQL) when the user inputs the lat-lon values in the form. and after submitting the form, the map should be displayed with markers at corresponding ...
3
votes
2answers
1k views

Zoom after apply CQL_FILTER in OpenLayers

I apply a filter to one layer and works nice. I want to maximize the bounds where I applied the filter, like this: // mapbounds = array(minx,miny,maxx,maxy) activeLayer = new OpenLayers.Layer.WMS( ...
2
votes
2answers
946 views

How to use Google Maps geocoding with Openlayers?

I'm making a Openlayers map with some shapefile and I have Google Maps base layer. I want to create a text area and a button. When I input a address and click the button, the map should show me the ...
2
votes
1answer
2k views

How to get Openlayers cluster strategy work for large data?

The map Layer has around 1500 points. I am able to display all the points in the map without any problem but adding the cluster strategy to the layer does not work. The Cluster strategy functions when ...
1
vote
2answers
2k views

How to get names of all layers in a store in GeoServer using OpenLayers

I have strict requirement to retrieve names of all layers in a GeoServer store using OpenLayers. I've gone through the post here, but it doesn't answer my question. I've also gone through GeoServer's ...
1
vote
2answers
4k views

Show pop-up where user clicked in OpenLayers

How to change this example ( http://openlayers.org/dev/examples/select-feature-openpopup.html ) so that when the user clicks on a line (feature) pop-up display where the user clicked? A few days ...
1
vote
2answers
3k views

How to initialize a WFS Layer?

Here is the code block (the layers are stored in Oracle database): var saveStrategy = new OpenLayers.Strategy.Save(); var adresspt_wfs = new OpenLayers.Layer.Vector("Address points WFS", ...
7
votes
4answers
937 views

Splitting Linestrings on the dateline with OpenLayers

A couple of years ago I posted a questions titled "The International Date Line wrap around" @jdeolive suggested I split the features at the dateLine. So I tried. So when I try to split my satellite ...
7
votes
4answers
1k views

Simplify GeoServer WFS output

I am dealing with some large datasets and would like to minimise the amount of data sent over the network. I am using OpenLayers' BBox strategy to only transfer the data that is needed but I am ...
7
votes
2answers
4k views

displaying feature info in a popup

Thanks to Nicklas' anwer to my previous question... I was able to "combine my shapefile and CSV data have made a lot of progress on my project. Now I want to display the attribute data in a popup ...
6
votes
3answers
843 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
3answers
1k 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
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
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 ...
5
votes
1answer
1k views

MGRS in OpenLayers

I am trying to view the Military Grid Reference System coordinates in Openlayers through the MousePosition control. Is there an easy way to accomplish this just through Javascript? I am looking at the ...
5
votes
3answers
3k views

Different level of detail(layers) on different zoom level at OpenLayers map

I want display different detail(layers) on different zoom level on OpenLayers map. I mean when zoom in should display lot of layers and when zoom out those unsuitable layers should hide automatically. ...
5
votes
4answers
4k views

How do I use base layer of two different projection Spherical Mercator and WGS84?

How do I add baselayer with two different projection? I have added overlayer with a different projection(EPSG:4326), but I need to add base layer with various projection Google Map My vector layer ...
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 ...
5
votes
2answers
3k views

Is it possible to display the length of each segment with the Openlayers measure control?

I am trying to make a OpenLayers measure tool that displays the length of each segment on top of each segment and the total length of the measurement as shown below: I have used this example ...
4
votes
1answer
276 views

How to create a vector feature drop target?

I would like to create, inside an openLayers map, a drop target for my features. The user should be able to drag a vector feature, drop on the target so that some further action can be triggered (in ...
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
1k views

How to integrate OpenLayers and ArcGIS Server?

I am using the OpenLayers JavaScript API within a web application. I am displaying non-base layers hosted on an ArcGIS server. When I load the ArcGIS layers, I load them using ...
4
votes
1answer
5k 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 ...
4
votes
3answers
568 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
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
1k 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
1k 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
3k 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
1k 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
2k 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
3answers
3k 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
163 views

how to limit zoom level in OpenLayers

I would like to have only 3 levels of zoom available (from level 6 to level 8). demolayer2 = new OpenLayers.Layer.WMS( "abc...","http://localhost:8080/geoserver/gwc/service/wms", {layers: 'def...', ...
2
votes
1answer
52 views

How would I get number of tiles loaded, and total number loading?

So new to OpenLayers 3, and I'm trying to create a "loading bar" to indicate how much of a layer has loaded. I'm thinking of making it based on the number of tiles loaded so far divided by the total ...
2
votes
2answers
962 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
760 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
2answers
546 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
822 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
2k 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 ...