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
110
votes
8answers
86k views

Choosing OpenLayers or Leaflet? [closed]

I was debating with one of my collegues on OpenLayers v/s Leaflet. I made a point that OpenLayers is much better API if we wish to build a project, where you need direct connectivity to the Geoserver ...
58
votes
3answers
25k views

Openlayers Animation Examples and Algorithms

i wonder for a long time if people in this community uses openlayers for animation needs. we have know this that animating on browser is a little bit exhausting for it but when a map meets with ...
44
votes
3answers
17k views

What is the current Web Mercator projection code?

The web mercator projection, popularised by Google Maps, seems to be given a new EPSG code every couple of years. EPSG:900913 (Google in calculator text) was an unofficial code EPSG:3785 - is the ...
31
votes
8answers
68k views

OpenLayers - redrawing map after container resize

In my web application, I want to enable users to set the size of the map container. Everything worked fine when the container was expanded slightly (apparently this is because the tiles that were ...
30
votes
4answers
36k views

How to define layer order in Openlayers?

I have a marker layer, two vector layers and two raster layers. The marker layer gets covered by the two raster layers. Is there a way to move the marker layer always on top? Edited: The order of Z-...
30
votes
5answers
12k views

How to put GeoServer layers behind authentication?

I want to publish map layers using OpenLayers and GeoServer. While this is easy enough to set up, I'm a bit lost when it comes to authentication possibilities. What I want is to create different users ...
24
votes
4answers
5k views

Offline tiled map web app

I'm not sure whether to post this here or on Stackoverflow, as it's sort of a crossover. Let me give it a try. In the proposed HTML5 standard, there's the option of storing web application data in a ...
22
votes
5answers
18k views

Map projection in OpenLayers

I want to overlay some data whose projection is WGS-84 on Google map layer in OpenLayers. But I just can't make them in the right place. I did as follows: map = new OpenLayers.Map('map', { ...
20
votes
7answers
39k views

How do I get the coordinates of a click on vector feature/layer in OpenLayers2?

I need to get the coordinate of the click when the user clicks on a vector feature on the OpenLayers map. The SelectControl only gives the feature that was clicked and not the coordinates of the click....
19
votes
3answers
55k views

Change OpenLayers 3 view center

I'm using OpenLayers 3 to interact with some maps. I first declare my map: map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ ...
19
votes
6answers
20k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
19
votes
5answers
46k 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 ...
18
votes
6answers
23k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
17
votes
2answers
3k views

Understanding web mapping tools [duplicate]

Before I start, this is going to be a general question but with specific cases. I've been trying to understand GIS tools and applications to achieve the following: Build my own basemap Publish the ...
17
votes
4answers
1k views

Seeking advice on generic open-source package roadmap? [closed]

I just wanted to ask for advice from the open source GIS gurus on a recommended stack to use for my envisioned project, as I do not fully understand the limits of the possible with most packages. I ...
16
votes
1answer
38k views

Programmatically creating a vector feature in OpenLayers2

I want to create a vector feature, programmatically, on my map. It's supposed to be in the A4-paperformat, for showing a sort of print preview. I've created a control for handling this, but now I'm ...
16
votes
2answers
39k views

Remove/Delete a feature from OpenLayers vector layer

I have an OpenLayers layer with several vectors on it. I know the OpenLayers Feature ID (e.g. OpenLayers.Feature.Vector_241) and I would like to know how to remove this feature and only this feature? ...
16
votes
7answers
5k views

Comparing two maps with nice web interface?

Is it possible in Leaflet or OpenLayers to compare two maps with a bar to slide between the two? Examples include: http://www.esri.com/services/disaster-response/hurricanes/hurricane-sandy-the-...
16
votes
4answers
3k views

What are some high-profile websites that use OpenLayers and PostGIS?

I think there are many convincing arguments for using PostGIS but I am interested in showing people examples of websites that use PostGIS and OpenLayers. Some examples that I have seen are: ...
15
votes
2answers
8k views

OpenLayers alternatives supporting more client-side features [closed]

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 ...
15
votes
4answers
9k views

Seeking Open Source alternatives to Google's StreetView engine? [closed]

I am looking to create an open source javascript app using either Leaflet or OpenLayers. Is there any way to implement panoramic views (similar to Google's StreetView) into either of these, or any ...
14
votes
4answers
29k views

Get Center of Geometry in OpenLayers 3

Given a Geometry object in OpenLayers 3. How would one go about getting its center? Older versions of OpenLayers provided a getCentroid method. There was also a getBounds workaround. But these appear ...
14
votes
4answers
15k views

OpenLayers: how to style WFS layer with SLD file?

I'm experimenting with a simple web mapping service build on PostGIS/GeoServer/OpenLayers stack on Win 2008 Server. I overlay vector layer from PostGIS using: var Index1v = new OpenLayers.Layer....
14
votes
2answers
6k views

Using Geodesic Measurements for Circle Radii?

I am currently developing an OpenLayers mapping site. Measurements can be made using a line tool, and an area tool. Both of these are currently set to calculate geodesic measurements as outlined in ...
14
votes
1answer
5k views

Dealing with overlapping features in OpenLayers

If users create a polygon feature that completely overlaps another one, like this … … then there's no way you can select the inner feature, i.e. the one that's overlapped by the other. I'm currently ...
13
votes
6answers
9k views

Free map service for private web applications

Background Looking to display a map (for internal use only) on a web page. The application must be able to add custom layers (without sending the data to the map service host): Municipal zones (...
13
votes
9answers
10k views

The International Date Line wrap around

Using OpenLayers, I added a WFS layer (on GeoServer) with a filter that returns all features (black) that intersect my polygon (yellow) placed over some Latin American countries within certain dates. ...
13
votes
2answers
7k views

Switching baselayers as user zooms in to map in OpenLayers?

I have a map which overlays Open Street Map data on imagery for Pennsylvania. As a baselayer to the roads (and eventually other layers) I have two baselayers - Blue Marble NG and USGS EROS 1ft imagery....
13
votes
4answers
20k views

How to overlay lat/lon points on a Google layer in OpenLayers 2?

I'm stuck adding a vector point in lat/lon on top of a Google layer in OpenLayers. The point is moving when I pan the map. This doesn't happen if I replace the Google layer with a layer in WGS84. How ...
13
votes
4answers
10k views

Is it a good idea to migrate to OpenLayers 3 now [closed]

I wonder if OpenLayers 3 is trustable enough to start migrate application to it now. Is the difference between versions 2 and 3 are too much important that the old code wont works? Are the major ...
13
votes
2answers
11k views

OpenLayers 2.12 and http basic authentication woes

I am trying to use OpenLayers 2.12 to display WMS layers from a server which has HTTP Basic Authentication enabled. I have tried to handle the authentication by putting the username and password in ...
12
votes
5answers
8k views

Tutorial for OpenLayers? [closed]

I need to create a web map showing many raster layers. I am using mapserver and want to use Openlayers, however I can't find any good tutorial about it. I see a couple of old questions (1 and 2) ...
12
votes
2answers
19k views

Enabling CORS in OpenLayers

Is it possible to enable Cross-Origin Resource Sharing (CORS) in OpenLayers? If so, how? I have a web map in OpenLayers, and I'm using an HTML canvas to render it as a PNG image. My script works ...
12
votes
3answers
3k views

Options for displaying PostGIS rasters in OpenLayers

This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in ...
12
votes
2answers
3k views

Technical and usability differences between OpenLayers and Google Maps API V3 [closed]

I know this is supposed to be a wiki question, but the feature has been taken of the site What are the main differences between OpenLayers and Google Maps api? What are the strengths and weaknesses ...
12
votes
3answers
11k views

How to merge two Polygons in OpenLayers?

I have two polygons. polygon1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing1])) polygon2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing2])) ...
12
votes
3answers
14k views

Using OpenLayers maps with SSL

I am using OpenLayers map by using the hosted JavaScript: <script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script> But my client has SSL installed and when I try to run ...
12
votes
3answers
2k 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 ...
12
votes
4answers
3k 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 ...
12
votes
1answer
743 views

Understanding OpenLayers documentation

Within the openlayers documentation I’ve noticed that “options” is many times used to show that the constructor takes parameters. But where can I get the details for this parameter {object}? How does ...
12
votes
4answers
5k views

Is it possible to put Geoserver behind a proxy and access the WMS/WFS using OpenLayers

I just start to work with Geoserver and Openlayers and one of the main concerns of the project now is do not expose the geoserver web interface outside of the internal network. No access to www....
11
votes
3answers
2k views

In what coordinate systems do true circles appear round?

I have been developing in Google Maps for awhile and am switching to OpenLayers but am stuck on one point: I am drawing vectors that are mostly circular but also involve some custom geometry so I can'...
11
votes
9answers
3k views

What is a good Javascript web API (preferably open) for building web maps that require little/no maintenance?

I have recently volunteered to make a web map for a local non-profit. The map will be pretty basic. It needs to display Lane county, Oregon split into multiple districts, with a "central office" ...
11
votes
2answers
18k views

Google Maps not Showing in QGIS 2.12

The Google Maps in my OpenLayers plugin in QGIS 2.12 does not show anymore. The other maps do show, that is: OSM Bing MapQuest Stamen Apple Maps I tried in QGIS 2.8 and Google Maps does not show ...
11
votes
3answers
3k views

Rendering images in OpenLayers?

My organization has a web application for displaying global and regional climate data and we're considering improvements to it. Our leading idea is to create an OpenLayers-based application to ...
11
votes
3answers
7k views

Google Maps layer copyright popup every time map updated / user input

I have used a Google Maps hybrid layer in Openlayers in my HTML5 iOS app for months now and it worked perfectly. Just recently they changed something because the 'Map data...' line at the bottom looks ...
11
votes
3answers
21k views

How to change color of a feature in openlayers?

I'm loading a geojson file into openlayers to show some polygons. From this file I also create a list of all names of these polygons. Now I want to change the color of a polygon when selected from ...
11
votes
3answers
4k views

Stack - Mapnik, TileMill, OpenLayers, GeoExt

Would this work as a stack for serving web maps with the basic GIS viewer functionality (pan, zoom, layer switching, info popups)? Apache Web Server Mapnik to serve the geo-data (TileMill to Style ...
11
votes
2answers
2k views

What does vector tiled map mean?

I'm working on an application that renders GeoJSON into OpenLayers map. The idea is about not having PNG images downloaded from external services (OSM or Bing) but having geo-information in GeoJSON ...
10
votes
3answers
24k views

How to connect OpenLayers to PostGIS data?

I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly ...

1
2 3 4 5
66