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

learn more… | top users | synonyms

1
vote
1answer
1k views

OpenLayers.Format.GML parser problem

I'm trying to parse WFS reponse using OpenLayers.Format.GML parser. However, an exception thrown in my try-catch block is TypeError: a is undefined. Any pointers as to what I may be doing wrong will ...
11
votes
1answer
2k 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 ...
0
votes
1answer
525 views

GeoServer: Cross Layer Filtering vs Layer Groups

To pull features using WFS from several layers in one request, I have two options: One, create a layer group, and then get features from the layer group, as opposed to individual layers. Two, use ...
1
vote
2answers
1k views

Problem with setting up proxy in Apache

I've downloaded sample proxy.cgi file from here. I've placed it in Apache's cgi-bin directory. However, whenever I try to access it, it throws the error Can't find string terminator '"' anywhere ...
3
votes
1answer
180 views

Setting Center Point of Pixmap Symbol for Mapserver

It seems like all the Mapserver documentation on changing the center-point of a symbol only deals with TYPE 'vector' symbols. I have pixmap symbol (the standard looking Google marker image thingy) ...
3
votes
1answer
2k views

Problems adding KML layer in OpenLayers

I'm stuggling to add a KML layer to a simple test OpenLayers map - no errors are shown, but the KML layer does not display on the map. I've tried multiple samples including the Sundials on a ...
3
votes
2answers
554 views

Problem with multiple feature selection

In an attempt to retrieve all features (point geometry) that fall in a selected polygon, I get the error this.layer.addFeatures is not a function. My code is as shown below: function ...
1
vote
2answers
519 views

OpenLayers GeoJSON: limit significant digits to 6 when using write()?

Is there a way that OpenLayers.Format.JSON write() method to serialize coordinates using 6 decimals only ? Example: instead of http://pastie.org/4200997 to have http://pastie.org/4200994
1
vote
1answer
946 views

How to draw a line with pop-up in OpenLayers?

How to draw a line with pop-up in OpenLayers? For markers with pop-up i do so: var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), ...
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 ...
0
votes
1answer
283 views

How to cluster kml features in OpenLayers

Is it possible to cluster KML features in OpenLayers, and are there any samples? I can find separate samples for clusters and KML but nothing which handles both together. Thanks
4
votes
2answers
460 views

Why isn't valid geometry not valid in NetTopologySuite when close to poles?

I have a Polygon which crosses the south pole: Polygon in WKT: POLYGON((5.86826073458095 75.6638564054071,-16.5436836399021 63.2220742891438,-19.3664667294083 59.846221066959,-21.7009816876343 ...
0
votes
1answer
271 views

EPSG:3035 wms layer over google maps or OSM

Is it possible to put EPSG:3035 wms layer over google maps or OSM? I managed to do this, but my wms layer is placed differently then google maps or osm. I assume, google maps/osm uses different ...
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
0answers
525 views

openlayers wms loaderror event get response text of

1.How do I get the http response text & error code from OpenLayers 2.12 WMS loaderror event ? 2.The WMS request returns returns http error code 500 with some response text, however, as per image ...
0
votes
1answer
227 views

GeoServer + OpenLayers: How can I sum points in a selected polygon in my WMS layer

I have two layers: one representing admin boundaries (multipolygon), and the other representing population (multipoint). I've made it possible to select a polygon to display. For the displayed ...
2
votes
3answers
678 views

Can we request new OpenLayers WMS image for an extent without moving the map?

Can we request new OpenLayers WMS image for an extent without moving the map center ? Reading OpenLayers code, OpenLayers move map center to new extent, and THEN do HTTP request to get the image. Is ...
1
vote
0answers
350 views

Using Google Maps with OpenLayers for some zoom levels

I've had a search on here to see if this has come up but I've not found anything, sorry if this is a duplicate. I'm trying to use the Google Maps layers with an OpenLayers site, but not for all zoom ...
1
vote
0answers
361 views

add description to a new polygon and save -> postgres + geoserver + openlayers -> wfs-t insert

actually it is possible to draw a new polygon with openlayers and save it over WFS-T-insert (geoserver wfs-t 1.1.0) in my postgres-db: var save = new OpenLayers.Control.Button({ title: "Save ...
1
vote
0answers
86 views

How can we display an animated output for watershed management in openlayers

Here i'm using Tomcat(7.0)+GeoServer(2.1.3)+Openlayers(2.11). How can we display an output like Flow of water for the forest watershed management application. I have to show the water flow Based ...
1
vote
1answer
745 views

GeoServer WPS Aggregation Functions Example

The scenario: I want to present a user with names of polygons from a layer in GeoServer. I then display the polygon(s) whose name(s) the user selected. What I've done: I have a search box, which ...
1
vote
1answer
180 views

Openlayers zoomToExtent pause until image is retrieved

Problem: layer transition effect: resize Do programmatic map.zoomToExtent() to somewhere OUTSIDE of current wms map bounds OpenLayers setCenters to target bounds and zooms in. While new wms image is ...
1
vote
1answer
395 views

Set attributes for newly created features in OpenLayers

I have a vector layer and label: "${title}" is used as one of style property for its rendering. Is it possible to set feature.attribute.title property before feature will be drawn by DrawFeature ...
11
votes
5answers
3k 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 ...
6
votes
1answer
1k views

How import a shapefile on-the-fly and have GeoServer render it instantly?

I am tasked with adding one feature to an existing app. It was built with OpenLayers and GeoServer. The task is to import a shapefile on-the-fly and have GeoServer render it instantly. However, I ...
2
votes
1answer
558 views

How can i display markers from a database?

I'm an absolute GIS beginner and here is what i am trying to achieve. I am developing a web application that allows users to : type an address, and be displayed the corresponding slipping map select ...
1
vote
1answer
213 views

Is it possible to write a server to handle OpenLayers.Protocol.HTTP({url: “/cgi-bin/fs/workspace/” …}) which was done by FeatureServer

I am a newbie to geoserver and openlayers. Recently, I am stuck in saving changes(drawing polygons and points) of the feature vectors to a local(geoserver/www/...) .json file. The tutorial I ...
4
votes
3answers
1k views

Export Map to GeoPDF

I am using GeoServer/OpenLayers to build a map website. One of things I want to do is to export a map to GeoPDF. It's not an export from desktop software. More specifically, map tiles are added as ...
0
votes
1answer
988 views

getting “TypeError :bounds is null” in firebug

i've got something error when I run my code in firebug.. here this code : <script type="text/javascript" src="OpenLayers.js"></script> <?php ...
2
votes
0answers
718 views

OpenLayers.Popup.FramedCloud won't autosize

I don't see why this shouldn't work, but it doesn't.. :P var popuphtml=""; $.each(persons.persons,function(i,item){ if(item.in_loc == feature.attributes['locid'].substring(8)){ ...
3
votes
4answers
1k views

can't read attribute from map file (.kml) using openlayers

I want to create thematic maps using openlayer with kml map. but when i run the code, color and label thematic maps of the polygon can't show up. instead writing out undefined. what's the cause? are ...
5
votes
2answers
7k 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 ...
1
vote
1answer
199 views

How show some fields only when using WMSGetFeatureInfo?

How to show some important field only when using WMSGetFeatureInfo.I use this example. When I click on maps it show all the fields of attribute table.What part should I modify in above mentioned code. ...
2
votes
1answer
514 views

ArcGIS REST export map features as geoJSON

Is it possible to export the features from a map as geoJSON using an ArcGIS REST service? I'm trying to make a vector layer in OpenLayers based on the output from the map's present view based on a ...
1
vote
2answers
974 views

Prevent layer from WMSGetFeatureInfo request on openlayers web map

I use this example code get feature info from my openlayers web map.I add 4 layers to map including raster image as base map. But i don't need feature info from that raster layer.But when clicking on ...
0
votes
2answers
335 views

How to retrieve a single polygon from a multipolygon layer in GeoServer

I have a multipolygon layer in GeoServer. The layer represents states within a country. I want to enable a user to search for a specific state, and then only the selected state to be displayed on the ...
4
votes
2answers
966 views

Openlayers - Vector layer polygon doesn't move in-synch with Google V3 baselayers

When a polygon is drawn on the map and the map is dragged, the position of the polygon relative to the GM V3 base changes. function init() { var map = new OpenLayers.Map('map'); var gsat = ...
0
votes
1answer
547 views

How to save new drawing feature to my own WorldImage layer(only base layer)?

Recently, I have been learning geoserver and openlayers to construct my own indoor map. As I am going to build a indoor wifi location system so I need to create the map. I use Raster Data Sources -- ...
1
vote
2answers
2k views

how to create thematic map using OpenLayers and Geoserver?

I am still a beginner in learning GeoServer and OpenLayers. I tried to create thematic maps of the map that I publish in GeoServer. I used openlayer to show the map in web browser. When i want to ...
2
votes
2answers
4k views

openlayers change marker icon, size and offset after drawn

I'm having much trouble changing my (feature)marker icons 'on the fly'. The problem is that I use much different images and also need to change the offset. So I iterate over every marker and make a ...
1
vote
1answer
964 views

Displaying Feature Info for a user defined polygon

To retrieve feature info for a polygon selection, I have the OpenLayers code below: var featureTypes = ["nig_admin1", "nig_admin2", "nig_admin3", "nig_landscan"]; var populationCtrl ...
2
votes
2answers
1k views

How to have a popup anchored at the clicked position?

I have a vector layer overlaid above a base layer. Basically I want to have a popup anchored at the clicked position when clicking anywhere on the vector geometries. So I have the code: var ...
1
vote
1answer
3k views

show a Collection of LineStrings with labels

I use the following peace of code to show multiple LineStrings which have a point as the last one, along with a label: var strokeColors = [...];//"#FFAACC" kind-of elements var linesLayer = new ...
1
vote
0answers
675 views

Geoserver in LifeRay

Hi i want to use geoserver+openlayers in LifeRay portlet. My main question its how to do this? I mean how to include geoserver in liferay, how to open geoserver's admin panel in liferay. Next question ...
1
vote
2answers
765 views

Labels not visible at same zoom range

I am using geoserver and sld : I want to make all labels visible at all zoom levels. How can I do that with SLD? <?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor ...
2
votes
3answers
2k views

OpenLayers GetFeatureInfo for GeoServer Layer Groups

I've created a GeoServer layer group. I'm using OpenLayers.Layer.WMS to retrieve the layer group, and this works fine. In addition, I'd like to pull feature info for the layer. For this, I'm using ...
3
votes
1answer
300 views

How to draw line by scratching on map using OpenLayers?

Is it possible to draw line by scratching on the map using OpenLayers? I tried some examples, all the examples are drawing by clicking. I want to draw by scratching, just like drawing in normal life ...
1
vote
0answers
81 views

OpenLayers Google Closure externs file

Has someone written Google Closure Externs file for OpenLayers that I can use freely ? Externs file similar to those for jQuery, GoogleMaps, Underscore ? Have to ask this before I create my own if ...
2
votes
1answer
771 views

Filtering a loaded kml file in OpenLayers

I'm trying to create an interactive search engine (for finding event tickets) of which one of its features is a visual map that shows related venues using OpenLayers. I have a plethora of venues ...
1
vote
0answers
310 views

OpenLayers - Switching to Google Basemap causes a flicker as it zooms to extent

I created and example based off of the spherical-mercator example example and placed it here. I made the bing road layer the default. If you zoom in on a location and then switch to a google layer ...