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

learn more… | top users | synonyms

2
votes
1answer
545 views

Problems using 2 maps with multiple layers and loadend event

I have 2 or more maps with one ore n layers on each map. Now I want zoom to extent for each map, but the getDataExtent returns only for the last layer in the last map a bounds. Can you help me? Here ...
1
vote
2answers
779 views

How to overlay points from MySQL served by Geoserver on an Openlayers map?

This might be a very basic question as I am new to GeoServer. What I am trying to do: I have a MySQL table that stores data attached to a spatial point and have latitude and longitude columns to ...
5
votes
1answer
2k views

How to check map tiles are loaded in OpenLayers?

How to check if the map tiles are loaded? I need to know whether all map tiles are loaded on to the OpenLayers map as html contents.... Is there any method to find out or function in openlayers to ...
3
votes
2answers
8k views

How to redraw / refresh map on canvas resize?

I've created a web page that contains a button to set the map full screen and back to its normal form, the problem map doesn't set to full screen until I resize the output window, how to overcome ...
2
votes
3answers
969 views

OpenLayers.Format.GeoJSON throws an exception “SyntaxError: JSON.parse: unexpected character” for valid JSON

In my GeoExt client, I have the following line that retrieves JSON data from a web service into a FeatureStore: var store = new GeoExt.data.FeatureStore({ layer: route_layer, fields: ...
1
vote
1answer
452 views

Geoserver and SRS

I have a very basic problem, and please bear with me since I'm new to GIS. I have geoserver installed in a Ubuntu Box and installed a few maps in shapefile. The maps were originally in ArcGIS format ...
1
vote
0answers
200 views

OpenLayers Icon e PopUp

Ciao, sto creando una pagina in php con una mappa ... in OpenLayers Examples ho trovato due interessanti esempi: esempio che mostra come usare diversi tipi di poupup ...
0
votes
1answer
229 views

PopUps for all the Feature layers

I am trying to create GeoExt action button to fetch the feature info from all the layers. I am still getting the info for my point features but I am getting nothing for the usa:states, that appears in ...
2
votes
2answers
2k views

How to read OpenLayers event object features?

This is part of an interface that uses a box to select features on a WMS Layer. This then writes the name of the features to a div as a list. var recycling = new OpenLayers.Layer.WMS( "Recycling ...
1
vote
0answers
268 views

ScaleLine shows NaN for LCC projection

I have used openlayers along with geoserver. My Map is having LCC projection by default, but SRS is EPSG:4042. The problem is that the scaleline shows NaN in meter as well as feet. How can I correct ...
7
votes
2answers
605 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 ...
1
vote
1answer
510 views

Creating a GeoExt Action from OpenLayers Function

I am trying to create a GeoExt function out of this OpenLayers function, which displays the getFeatureInfo. I was able to create this GeoExt.Action() but it does not give me any output. Any idea ...
0
votes
1answer
1k views

OpenLayers Control.WMSGetFeatureInfo does not send request to geoserver

I'm refactoring the code used to getfeatureinfo from geoserver running on port 8080 at http://www.edpp.cz/zul_mapa-povodnoveho-planu-mesta/. The old version uses OpenLayers.loadURL and successfully ...
1
vote
1answer
396 views

OpenLayers.Control.DragFeature, strange behavior

Hi GIS-Cracks, I've been reading in this forum for a while and it helps me lot of times. Now I think it is the time to help me again but maybe other people too. So I try to describe a problem I have ...
0
votes
1answer
182 views

How to get a handle on default MousePosition elements in OpenLayers?

I have an OpenLayers interface with two maps side-by-side. They are synced so that any pan or zoom action on either map affects both of them. I also have MousePosition controls on each map so that ...
3
votes
1answer
2k views

OpenLayers with a small, discrete set of XYZ tiles

I'm trying to set up a handy map of my Minecraft server to share with my fellow players; the specifics on that front aren't really necessary though -- suffice it to say that I have a tile set (each ...
2
votes
1answer
265 views

Wrong coordinates after resizing the map

I catch a click event on openlayers map and show a popup with featureinfo (if any) with position set as map.getLonLatFromPixel(new OpenLayers.Pixel(e.xy)). The user might set the map to show in ...
2
votes
1answer
783 views

How to make OpenLayers.Popup draggable?

I've used jquery-ui draggable option as following but the moving popup can not be ended once dragging has started. Is there any another method to make OpenLayers.Popup draggable? popup = new ...
2
votes
2answers
2k views

Google Maps/ OpenLayers only rendering top left tiles

I'm seeing a weird issue with Google Maps and OpenLayers. When loading a page as shown below, only the two top-left tiles render, leaving the rest of the map blank. I looked in the Network tab in ...
0
votes
1answer
2k views

How to check if wms layer is queryable in openlayers?

I'm running a map with lots of different wms layers published by geoserver. Some of them are queryable, some of them are not. How can I tell that with openlayers api? I'm requesting getfeatureinfo and ...
2
votes
1answer
248 views

Which OpenLayers.Protocol should I prefer which design patterns provided at?

At our scenario, there is a server which stores the feature info (coordinates, properties, etc) into a SQL database. Google Maps are used for a layer. The geoJSON data format are used for ...
3
votes
4answers
404 views

Is it possible to change the name of a Stamen basemap in OpenLayers?

I'm adding a Stamen basemap to OpenLayers using the syntax below. Is it possible to change the layer's name, so that it appears in the Layer Switcher using this name (rather than "toner")? The ...
2
votes
3answers
897 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 ...
6
votes
4answers
11k views

Customizing Popups in Openlayers

Is it possible to customize the shape of popups in OpenLayers? For example, I am creating a pop-up using the following approach: var popup = new OpenLayers.Popup.FramedCloud( "popup", ...
1
vote
1answer
1k views

Openlayers zoom limit with Google Maps

When using Openlayers I am unable to achieve the same zoom level that Google Maps allows. For example, if I embed a Google Map in my web-page I can zoom in to the building level in a city. When using ...
5
votes
4answers
791 views

How to use OpenLayers for CrowdSourcing/ collect data?

I'm currently making my first steps in OpenLayers, trying to build a page showing a map where people can add data, which is then saved back in our database. (Background: Mapping of the distribution ...
2
votes
2answers
64 views

How can I create a new function inside a existent class in OpenLayers?

I want to add some functions inside a existent class in OpenLayers. For example, I want to add function A() and B() and a variable C inside OpenLayers.Layer.Vector. var X = function() { A() = ...
2
votes
1answer
77 views

Which conditions does the geoJSON file read from the server in?

I've added an alert to the function myReadFunction in order to detect function calls. As according to my observations, the function readMyFunction is called sometimes while I have been navigating on ...
2
votes
1answer
528 views

How to validate whether the BBOX strategy works successfully?

I want to send requests to our feature server that asks only data within the viewable map extent. So I've used BBOX strategy and HTTP Protocol as following code. mVectorLayer = new ...
2
votes
1answer
1k views

Problem with layer order in OpenLayers and Google styled maps

I'm using OpenLayers with Google styled maps. My biggest problem is KML polygon layer which needs to be under roads layer but it isn't (see prtscr). What am I doing wrong? This is my coding: ...
3
votes
2answers
52 views

Which OpenLayers highlights should I present to a non-specialist audience?

Hello Openlayers Experts/Users There is an event in my University that interests in Open Source Software. I am supposed to give a short presentation about anything related so I thought about giving ...
1
vote
1answer
1k views

How to overlay roads layer on top of all layers in OpenLayers?

I want to put roads layer (from any source, please recommend some..) on top of my KML polygons and base layer: baseLayer = new OpenLayers.Layer.WMS("OpenLayers WMS", ...
2
votes
1answer
314 views

Giving properties to Zoomify layers in OpenLayers?

I am using OpenLayers.Layer.Zoomify to show large image files and this works like a charm. The only thing is that I would like to add some options to that layer ( opacity and transitionEffect) but it ...
2
votes
1answer
168 views

How to get the number of objects at a pixel position?

Is it possible to get the total number of objects (Lines,Points) at a given pixel position in the map?
8
votes
2answers
2k views

How to resize a point on zoom out?

I've added a point on map like this but it is static in size. How to resize that point on zooming? Map on zoom out Any guidance and help is appreciated.
15
votes
4answers
1k 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: ...
0
votes
1answer
437 views

How to insert non-spatial data through WFS-T insert?

When i perform wfs-t insert operation using postgis database only spatial data and primary key gets inserted. Can anyone point me to some examples in which attribute data are also inserted along ...
2
votes
2answers
965 views

How to search and zoom to result using WMS?

I am making a web gis application (openlayers/geoserver) to display a layer of properties, I need to add a functionality of search in it based on the name of the owner. A list of similar names ...
1
vote
1answer
389 views

error performing wfs-t insert in postgres 9.1.4

I am getting error performing insert exception while performing wfs-t insert operation when i use postgres 9.1.4 and postgis 2.0. but i get successful insert when using postgres 9.0.1 and postgis ...
0
votes
1answer
527 views

How to pan (rather than zoom) when using a 2-finger drag on a Mac

Using Mac OSX, dragging the trackpad with 2 fingers performs a scroll of the web page, equivalent to using the mouse wheel. However, if the cursor is located within an OpenLayers map, the 2-finger ...
3
votes
1answer
576 views

How to hide some parts of an image layer with OpenLayers?

My Problem I'm currently displaying a layer image above a Google Maps base layer. I would like, when the user check/uncheck some checkboxes, that some parts of this image layer disappear, and the ...
3
votes
1answer
526 views

How to show a point on mouse over a hidden polygon?

Any suggestions on how to show a point on mouse over a hidden polygon? A single kml file contains two polygons and two points as in the image, I've hidden these polygon and point by setting stylemap ...
-1
votes
2answers
847 views

How to add point with current mouse position while mouse over on line feature?

I have a line feature in a vector layer "A", while i mouse over on that line. A point should be added to vector layer "B" with current mouse position. OR how can get lat lon of mouse position while ...
3
votes
3answers
335 views

Use Esri PersonalGeodatabase layers in OpenLayers

I would like to Know if it is possible to open a Personal Geodatabase of Esri with Openlayer with FileGDB_API_VS2010_1_2 Thank in advance Juan
9
votes
2answers
1k views

What's the best way to display thousands of polygons in Openlayers?

I am trying to create an Openlayers map that will display thousands of polygons. And when the user clicks on each, I want some of the metadata to display. Working with this large of a dataset seems ...
3
votes
5answers
3k views

How do I make KML overlays appear in OpenLayers at all zoom levels?

I need to overlay KML polygons on basic map in OpenLayers. I need that KML is visible on every zoom level. I did some coding, but my KML is not showing up. What am I doing wrong? Thanks. <!DOCTYPE ...
0
votes
1answer
147 views

Syntax for wfs-t request

I am in need of the correct syntax for performing transaction on WFS layer using OpenLayers. I have gone through many examples on the OpenLayers site and other examples, but can't figure out how to ...
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 ...
2
votes
1answer
605 views

Connect JSON to GeoExt Application

I am returning a JSON to a GeoExt app and this is the code that is collecting the return, var control = new OpenLayers.Control.Click({ trigger: function(evt) { ...
1
vote
2answers
505 views

Distances and areas in Google projection

I have a mapping website used to capture polygons using OpenLayers in Google projection (900913) and storing them in sql server 2008 as geometry. The SRID on the sql geometry column is set to 900913. ...