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

learn more… | top users | synonyms

2
votes
1answer
331 views

OpenLayers deploy: what libs does selectFeature rely on?

I am trying to minimize my code by modifying OpenLayers deploy configuration file in order to reduce its load time. However, It seems that I can't include all necessary libs that ...
4
votes
0answers
669 views

OpenLayers: WFS request to GeoServer to retrieve “name” & “featureNS”

Using WFSGetCapabilities I sent a GetCapabilities request to GeoServer. From the result of WFSGetCapabilities().read(), I can loop each featureType and retrieve some basic info(e.g., name, title, ...
3
votes
1answer
2k views

How to draw a line in OpenLayers?

I would like to draw a line between few GPS coordination. I tried to use OpenLayers.Geometry.LineString for that, but it uses a OpenLayers.Geometry.Point. Is there any function in OpenLayers that ...
3
votes
2answers
1k views

OpenLayers + Geoserver: how to dynamically retrieve the “geometryName” of a feature layer in GeoServer

I am trying to get the list of feature layers on GeoServer and then user can add layers into map at anytime they want. my question is: when using OpenLayers.Protocol.WFS loading a layer, is ...
2
votes
4answers
2k views

Retrieving tiles in EPSG:4326 format. Is there a service for that like CloudMade?

Is there a service that can provide custom tiles in the EPSG:4326 projection? I've looked at Cloudmade and it would be the ideal solution but their tiles are using Spherical Mercator. Basically the ...
2
votes
1answer
358 views

OpenLayers: failed to create a Ext.list that wraps a Openlayers.request.Get function

I am using Sencha Touch + OpenLayers to develop a demo app. One feature is to get the catalog of feature data in GeoServer. I want to use Ext.List to display the name of feature layers. I tried ...
3
votes
2answers
2k views

Printing maps from OpenLayers with a Google Maps base layer

I need to implement an automatic pdf report generator on a web site. In the generated pdf file I need to insert images from maps extracted from OpenLayers with a Google Map base layer. On top of ...
5
votes
1answer
693 views

How to create a balloon for a dynamic KML file?

I want to create a balloon for a KML file that dynamically moves. The example that I am working on is sundials.html. Let's say that the KML is moving. How we would get the balloon to move as well? ...
1
vote
1answer
892 views

Toggling feature visibility in Openlayers + GeoExt

I'm setting up a small web mapping application using PostGIS + mod_tile + FeatureServer + OpenLayers + GeoExt, each of which I'm learning as I go. In addition to the base layer, I've pulled in a few ...
2
votes
1answer
998 views

What's wrong with OpenLayers code?

I've just tried some simple code from example: $(document).ready(function() { var map = OpenLayers.Map('map-content', {}); var wms_serever_map = OpenLayers.Layer.WMS('Base l', ...
6
votes
1answer
3k views

How to select multiple Features from multiple Layers in OpenLayers?

Is there a way to select multiple features from multiple vector layers by using clickTolerance in click? I checked the documents of getFeature control and selectFeature control, seems not work in ...
2
votes
2answers
3k views

WFS via Geoserver - Proxy or MapDocument Issues?

I struggle getting a WFS overlay from geoserver to work. I think I meet all the requirements for the WFS to be displayed in my map, but the request seems to get stuck somewhere... FireBug gives the ...
5
votes
2answers
694 views

OpenLayers for Android: why does a popup panel show up twice?

I use Moto Xoom (Android V3.0 touch pad) browse the example "OpenLayers with Sencha Touch", when I click button "LayerList", the associated popup panel doesn't show up smoothly. it will show once, ...
3
votes
2answers
1k views

Is there a Web app for building GeoExt tree configurations?

I have a GeoExt application and looking for approaches for building tree configuration (in JSON format). Now tree configuration is made manually and looks like: var treeConfig = new ...
5
votes
2answers
553 views

How to check whether a layer is vector or not in OpenLayers?

am not sure whether this is a stupid question or not.. but I am wondering how to dynamically check whether a layer object belongs to OpenLayers.Layer.Vector class. Thanks for any replies!
2
votes
1answer
403 views

How to generate a grid of horizontal equal-area rectangles in a Mercator projection?

I'm new to GIS so pardon my ignorance and bear with me. I'm generating a grid relative to a LonLat point. To make the cells all equal area, I'm creating it in 2163 projection. The problem is that when ...
3
votes
3answers
4k views

How do I include proj4js in openlayers?

in my Openlayers app, since the base map projection is not epsg900913 or 4326, I need to include proj4js in order to use geolocation feature. but i got such a error notice: GET ...
4
votes
1answer
2k views

How to use geoserver to display data on hosted website

I am using geoserver to display GIS data on my hosted website when geoserver is running I can see my data on my website in both firefox and Internet explorer but only on my laptop where I have ...
0
votes
1answer
1k views

openlayers- WFS- Cross-domain problem

I got the typical cross-domain problem when access to WFS layer by using openlayers, XMLHttpRequest cannot load http://XXXX/geoserver/ows?service=WFS. Origin http://XXXX is not allowed by ...
3
votes
1answer
466 views

How to solve Projection Problem at client side

I want to discuss a scenario here to all. I have developed a Web mapping application in OpenLayers and GeoServer. The customer give us shapefiles with native projection SWREFF99_1330 (EPSG:3008). ...
3
votes
2answers
2k views

How to label a dynamic KML file in OpenLayers?

How can I display labels for features in a KML file on an OpenLayers map. I was thinking of using popup messages, but labels are more attractive and eye-catching. I want to replicate the labeling ...
2
votes
1answer
177 views

Dynamic ArcServer Layer

I have the following setup: ArcGIS Server + ArcSDE on top of Oracle RAC. I created a view merging some data that is in Oracle and ArcSDE. In ArcMap it all works just fine. Whenever a new location is ...
6
votes
4answers
6k views

How to reproject base layers in OpenLayers?

The issue is: I have vector/topo/image tiled maps for some places in north america which were published as ArcGIS Server REST service. These maps (A) are based in EPSG26912 projection. Now I wanna ...
9
votes
3answers
490 views

In what coordinate systems do true circles appear round?

Please excuse what is probably an obvious question from a relative newB to GIS -- this seems like it should be a snap. I've been developing in Gmaps for awhile and am switching to OpenLayers but am ...
1
vote
2answers
643 views

How to work with Geoserver and OpenLayers?

I am new to Geoserver and am a bit lost at the moment. I have added shapefiles to Geoserver and created a layer containing all the shapefiles that I would like to display on my externally hosted ...
3
votes
1answer
2k views

How to toggle a control in OpenLayers

I have a added Graticule control in my OpenLayers map. Now I want to toggle this using a control button. This what I have written: function init() { graticuleCtl = new ...
8
votes
2answers
871 views

How to preserve topology while editing polygons in OpenLayers?

I’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine. ...
2
votes
1answer
357 views

Is it possible to add custom SQL-based layers in GeoServer?

I would like to add a layer to GeoServer that builds its features from an SQL query executed against a PostGIS database (something like a PostGIS layer in QGIS, but customized with additional SQL ...
5
votes
2answers
1k views

Why does GeoServer/OpenLayers show only points from my PostGIS?

I am reading the PostGIS in Action book now and I have a problem with one example: I have created a table: CREATE TABLE my_geometries (id serial NOT NULL PRIMARY KEY, name varchar(20)); I have ...
1
vote
1answer
544 views

How to segmentize/sample a LineString using geodjango (postgis/geos) and/or openlayers?

I'm trying to sample points along a linestring. The goal is to have the distance between 2 consecutive points to be at most X (eg. 50m). I'm drawing linestring in openlayers and sending it to a ...
0
votes
1answer
1k views

Problem with the layernode.js, GeoExt Application

Attached is the code i have written on the html file. When i run it on the mozilla firefox browser i get the following error from firebug: Most of the code has been taken from an existing ...
8
votes
2answers
1k views

Whats better for selecting? WMS or WFS

I need to select from a layer(s) and I am wondering what way I should serve the layer. The requirements are that I need to be able to select multiple features at a time by drawing a box or polygon. ...
3
votes
2answers
2k views

Open Layers Zoom On map single-click

I am trying to zoom into a location on a single click. How can I zoom towards the point on single click? I have tried using OpenLayers.Control.ZoomIn and adding a click handler, but for some reason ...
3
votes
2answers
3k views

OpenLayers: Combine multiple OGC filters

I have two OGC filters client side: <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyIsEqualTo matchCase="true"> ...
3
votes
3answers
6k views

How to dynamically update a KML layer in OpenLayers 2.10?

Arguably, this is a easy question for you guys GIS expert. Here is the question, how to outsource a dynamic KML file using JavaScript in OpenLayers. I want to refresh every 7 seconds. Below are ...
1
vote
1answer
2k views

WMS Request Returns nothing with Geoserver

I'm having trouble with a select feature example in Geoserver and open layers. For some reason the request returns nothing. Here's the stripped down version that produces this: I have a small wms ...
6
votes
1answer
4k views

Trying to place a Point geometry on OSM map, unsuccessfully

I have a piece of code that takes a map layer and places a vector layer on top of that. Currently, I'm just trying to place a few points on top of the map, unsuccessfully. I managed to place 1 point ...
13
votes
6answers
6k 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 ...
2
votes
1answer
233 views

LinearRing getVertices implementation

I'm fairly new to OpenLayers so please excuse me if this is an ignorant question. I'm curious why the LinearRing getVertices implementation getVertices: function(nodes) { return (nodes === true) ...
6
votes
1answer
3k views

Changing the geometry of polygon in OpenLayers

i would like to programatically change the geometry of a polygon. feature.geometry.move() works ok, but i rather need supply a whole new geometry. When i try feature.geometry = newGeometry, the ...
0
votes
1answer
2k views

Feature geometry attributes to KML

I'm using the OpenLayers.Format.KML class to export the features in MyLayer to KML. However my features have attributes attached to the geometry object i would also like to have exported to the KML ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
3
votes
1answer
2k views

OpenLayers WFS protocol query after vector layer creation

I want to be able to create a layer on init, then load features from a WFS protocol afterward. I'm having trouble doing this. Using WFS protocol in vector constructor works fine and is not my ...
-2
votes
2answers
2k views

Why is my JSON not appearing on my webpage?

Greetings lovers of GIS, I came across this error whilst doing my JSON file. "Error in loading GML file" Everything works fine in localhost but dramatically wrong in my server. Any helping hands? ...
5
votes
3answers
1k views

How can I display with OpenLayers the geometry returned from a ST_Buffer in POSTGIS?

Im using PostGIS, GeoServer and OpenLayers, and the thing is that i want to display the geometry result from a query like this: SELECT ST_Buffer(ST_GeomFromText('POINT(100 100)'), 500); To perform ...
3
votes
2answers
3k views

OpenLayers PanZoom control customization

I try to customize PanZoom control and have some questions. 1) What are OpenLayers.Control.PanZoom.X and OpenLayers.Control.PanZoom.Y constants? 2) Method "draw" takes "px" argument as input. I can ...
6
votes
1answer
4k views

Openlayers wfs vector layer

I'm trying to add a vector layer with a wfs layer and it's not working.Can anyone point a solution? Openlayers code: var wfs = new OpenLayers.Layer.Vector( "Stavros Features", ...
6
votes
2answers
2k views

OpenLayers tooltips

Please point me to examples of combining OpenLayers and any external tooltip libraries like this. I try to use native OL tools for building tooltips here, but they not flexible and customizable. ...
2
votes
1answer
543 views

Getting/downloading shapefile from OpenLayers/Web page and saving to local disk

I have developed a web application where i am using GeoServer and OpenLayers. I have displayed some Layers over Google map in a ASP.Net Web Page. I want to know is there any Method or Script available ...
1
vote
2answers
816 views

OpenLayers layer text popup override code not work

I have some problem with the popup code in OpenLayers, using Text layer (yes i know there already GML layer out there with text format, but i need to modify existing code), the problem was popup not ...