Questions tagged [openlayers-2]

Use this tag when you are using the DEPRECATED version 2.x of the OpenLayers JavaScript client toolkit.

Filter by
Sorted by
Tagged with
7
votes
1answer
2k views

How to select WFS features by polygon in OpenLayers?

I need to be able to select features on a wfs layer using a polygon instead of a box. I was hoping this would be a standard option in the SelectFeature class. Too bad this isn't the case. Any ...
7
votes
1answer
1k views

Looking for free / open source Lidar web viewer?

I have lidar data which I want deploy my users using web viewer. I will probably hold the data in PostGIS (not sure yet). Is there good open source/free lidar viewer that I can integrate with ...
7
votes
2answers
4k views

How do I parse getStyle request?

I am having problem parsing http://localhost:8080/geoserver/wms?request=GetStyles&layers=topp%3Astates&service=wms&version=1.1.1 getStyle response from geoserver of layer topp:states. ...
7
votes
1answer
3k views

how to display polygons as points until certain zoom level?

can somebody tell me how to display polygons as points until you zoom to some level. I'm speaking about OpenLayers. So, for example, if the zoom level is less then 10 than it should display feature as ...
7
votes
3answers
8k views

How to access an wms layer that requires authorization via OpenLayers?

Is there a way to send username and password parameter to a wms layer that needs authorization? If not, I guess it's perhaps a non-spatial thing to solve so that you before the javascript sends a ...
7
votes
1answer
1k views

Is dynamically generating Choropleth maps a solved problem?

I am trying to work out what mapping tools I would need to use to dynamically create Choropleth maps from our data. I am working on a project where the back-end is a big database of statistics, and ...
7
votes
1answer
9k views

Openlayers2 and Geoserver: OSM/Google Maps and WMS Overlay

I am experiencing projection problems with the following set up: GeoServer with ESPG:4326 based shapefiles (*.shp) OpenJump to edit my shapefiles Openlayers with EPSG:900913 base layers GeoServer ...
7
votes
2answers
6k views

OpenLayers - Get features inside a polygon

In my OpenLayers map I allow users to draw an ad-hoc polygon vector. Then I need to get all the features from a WFS vector layer that fall within the ad-hoc polygon. Here is the code I have that ...
7
votes
2answers
377 views

Load third-party APIs only when the corresponding map layer is requested?

OpenLayers allows multiple map layers to be hosted on a common platform. If the map application supports a wide variety of maps, say from Google, Yahoo and Microsoft, I find that upon initialization, ...
7
votes
1answer
561 views

How To Do OpenLayers.Mobile Popup

It seems that the OpenLayers.mobile.js library (v 2.12) doesn't have a popup class. Does anyone know how to do a popup with the mobile version? I'm using some code that i ported over form normal OL ...
7
votes
5answers
3k views

Deactivating Openlayers Cluster after a certain zoom level

I want to deactivate the cluster strategy after zoom level 16. The Cluster strategy gets deactivated and I also change the style of the original features and redraw the layer. But still it takes the ...
7
votes
2answers
1k views

OpenLayers how to maintain layer ordering while using SelectFeature control

I'd like my map to display a few layers in a particular order. Some of these layers are Vectors, others are XYZs, and some of my Vector layers display attribution. Initial layer ordering works fine ...
7
votes
1answer
1k views

Adding Panoramio Photos To An OpenLayers Map

I have a pretty well integrated OpenLayers map that I want to add photos from the Panoramio API to. Unfortunately, it seems both API's are under documented on this subject. I found one great tutorial ...
6
votes
4answers
5k views

How to limit zoom level in OpenLayers 2.x

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...', ...
6
votes
1answer
3k views

Why does Geoserver not serve my primary key/ id?

I have a postgres/postgis table with the columns: gid [PK] serial NOT NULL, geom geometry(MultiPolygon,900913), crop text My layer in Geoserver however only shows me the feature types "geom" and "...
6
votes
3answers
1k views

Is it necessary to master openlayers to use geoserver?

Is it necessary to learn openlayers to use geoserver? Can i completely ignore OpenLayers so long as i master using geoserver to publish data on my website because i understand openlayers is contained ...
6
votes
5answers
814 views

Is it possible to redesign OpenStreetMap tiles?

We have an application working with OpenLayers and are using OpenStreetmap for the map tiles, however they don't look great. Is there anyway to style these maps? I read something about Mapbox but it ...
6
votes
3answers
12k views

OpenLayers: Possible to show zoom level?

Been researching this for a while and nothing has come to fruition. Best I could find was: OpenLayers.Control.ZoomStatus = OpenLayers.Class(OpenLayers.Control, { autoActivate: true, element: null ...
6
votes
3answers
6k views

OpenLayers on mobile device: possible to use local map tiles?

Is that possible for an OpenLayers app (running on mobile device) to load the map tiles that are deployed in the device, if the app is able to access these files (e.g., using PhoneGap)? from this ...
6
votes
4answers
13k views

Dragging a feature in OpenLayers 3

I'm trying to replicate something that was fairly easy in OpenLayers 2 in OpenLayers 3, which is: dragging an existing feature to a new location on the map. In OpenLayers 2 I just added a DragFeature ...
6
votes
4answers
2k views

Caching / Preloading data for use with WMS queries

Hoping someone can help me with this issue. I've got a map implemented in my web application using OpenLayers that makes WMS queries to GeoServer that in turn queries a Postgres (PostGIS) database to ...
6
votes
2answers
9k views

How to draw lines with different colors in Openlayers 2?

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 ...
6
votes
3answers
10k views

OpenLayers load WFS vector layer: how to check whether all features are returned from server?

My app takes several seconds to return all features of a WFS layer from server, I am wondering whether there is a way to check whether all features are returned in coding, so that we can add a loading-...
6
votes
2answers
3k views

How to disable polygon Label on the vertices (OpenLayers) in Edit Mode

I added the style on the polygon layer like so. var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']); // get a copy of the default style style.label = "1233456 ha" style....
6
votes
2answers
8k views

OpenLayers canvas renderer - redraws all features on selecting a single feature

I am currently trying to learn more about OpenLayers, and I'm coming up against performance / behaviour issues that I wouldn't expect to see. To elaborate... I have combined this example for ...
6
votes
3answers
8k views

How to create 3D globe view with OpenLayers?

I want to create 3D view. and I am using OpenLayers. Is it Possible?
6
votes
2answers
4k views

How can several vector layers have different controls, using Openlayers?

Using openlayers I have two vector layers. One layer is called lineLayer consisting of vector lines, and the other is called pointLayer consisting of points. When I hover on the lines I want to be ...
6
votes
2answers
5k 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 to ...
6
votes
2answers
1k 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"> <title>GeoRSS</...
6
votes
4answers
6k views

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 ...
6
votes
3answers
19k views

Change Icon of Single Vector Feature in Layer

Currently I am trying to change the icon of a particular feature of a vector layer that the user is focusing on. I add each feature to the map like so: var point = new OpenLayers.Geometry.Point(pt....
6
votes
2answers
3k views

OpenLayers filter: OGC (xml) or CQL?

While having not used filtering that much in OpenLayers, we are discussing which type of filtering we should use: The OGC XML filter or the more simple CQL filter? Are one of them more appropriate ...
6
votes
1answer
2k views

Real time positioning of vector features using database

I am a newbie in GIS and want to implement something like a vehicle tracker wherein I will get a series of coordinates in a database. I have no idea how to go about it, I mean what should my process ...
6
votes
1answer
5k views

How to get the intersecting polygon of two polygons? (using JSTS intersection)

I want to intersect two polygons within an OpenLayers layer. I found the JSTS library, which should be able to intersect two polygons, and return the new created polygon of the intersection. The ...
6
votes
1answer
12k views

Access-Control-Allow-Origin Openlayers WFS

I try to use a WFS service with OpenStreetMap to request GeoServer GeoJSON file. First I had a error message on the Firefox Cross-Origin Request Blocked: The Same Origin Policy disallows reading the ...
6
votes
3answers
5k views

Dealing with thousands of features of vector layer in OpenLayers?

I am building a webgis portal too show a big number of polylines (road network) and points (villages, cities etc.). All my data are stored in a POSTGIS and throuh geoserver and Openlayers I display ...
6
votes
2answers
8k views

openlayers bootstrap3 examples?

I was wondering if there is any good example of openlayers used in the HTML page with bootstrap3? I searched around, and can only find bootstrap 2 examples, like this one: http://dev.openlayers.org/...
6
votes
3answers
698 views

GIN/GiST Full Text searches through openlayers, geoserver and postgres

I have a a web app that automatically maps recent tweets and allows you to search for certain keywords. it uses Postgres for the database, geoserver as the server, and openlayers as the cartographic ...
6
votes
4answers
29k views

How to add WMS layer in OpenLayers from GeoServer?

How to overlay a WMS layer from GeoServer (localhost)in OpenLayers? What is the basic syntax of a GeoServer WMS layer? Details are as follows: workspace name: india layer name:hospitals <...
6
votes
2answers
3k views

OpenLayers XYZ Unable to Load Local Tiles

I have some local tiles that were generated from OpenStreetMaps using Maperitive. I've tried going through the docs and tests but the map is not loading. I'm not getting any errors in chrome's js ...
6
votes
1answer
3k 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: ...
6
votes
1answer
3k views

Can't 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 ...
6
votes
3answers
12k views

custom Layer Switcher style in openlayers

I use this example to customized my layer switcher in openlayers.But I want to change the position,width and height of layer switcher.I know it relates to CSS.I change some numbers to get some idea....
6
votes
1answer
873 views

How does OpenLayers determine a layer's projection?

Could anyone explain the strategy OpenLayers take to determine the layer's projection? For example, if I didn't explicitly specify any projection for a marker layer, what projection would the layer ...
6
votes
3answers
2k views

Checking whether layer is vector or not in OpenLayers 2?

How do I dynamically check whether a layer object belongs to the OpenLayers.Layer.Vector class?
6
votes
1answer
2k views

Maximum number of Tiled Layers in OpenLayers

I'm developing an OpenLayers site where the client wants a dozen layers that can be individually turned on and off, which is a bit of a bummer in terms of performance. The data is PostGIS and static ...
6
votes
2answers
4k views

OpenLayers/proj4js and the EPSG:27700 (UK) Projection

I'm trying to use OpenLayers to transform projections, which in turn uses the http://proj4js.org/ library. var ll = new OpenLayers.Projection('EPSG:4326'); var a = new OpenLayers.LonLat(3,53)....
6
votes
1answer
4k views

Cesium 3D - Determining the Map Scale of the viewed Globe

I am working withe Cesium 3D at the moment and want to determine what the equivalent map scale the globe is being viewed at. I am able to get the viewing altitude in Meters that he Camera is at, but ...
6
votes
4answers
3k views

How did OpenLayers 3 managed to export map from other domain?

As far as I know, you cannot use canvas.toDataURL() on a tainted canvas (i.e. cross-origin). Looking at this example it seems the tiles are coming from different origin (tile.openstreetmap.org). How ...
6
votes
3answers
5k views

How to collect data via WFS and Popup

I have a map with a WFS-Layer and I am able to add Polygons to my data stored in a PostGIS-database, served with GeoServer (OpenLayers, GeoServer 2.1.4, PostGIS 2.0 for PostgreSQL 9.1).) How can I ...

1 2 3
4
5
66