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

learn more… | top users | synonyms

1
vote
1answer
854 views

GetFeature Request with Polygon Intersecting Polygons

My task is very straightforward: a user draws a polygon and query all parcel polygons. The query string extends the URL limit. So I am posting XML to WFS. However, GeoServer always returned 0 feature, ...
1
vote
1answer
207 views

How to make popups on polygon using openlayers?

I want to make popups that contain information of a polygon when in hover using OpenLayers. information displayed in popups obtained from the database. Can you give reference code to make it. ...
2
votes
2answers
1k views

Calculate dynamic radius based on population and map resolution

Background Create a radius around the centre of a city that corresponds to the city's population, taking into consideration the map's current resolution. The populations range from 39 to 1090936, ...
3
votes
1answer
221 views

Halo in OpenLayers (Line, Vector)

How to make a halo around the line of one pixel? For example, line (vector) hase blue color and its frame (one pixel) the black color. Thanks!
3
votes
1answer
441 views

How to handle a geotiff map together with points with openlayers (or other libraries)?

I create a lot of printed maps using various applications (ArcGIS, QGIS, Microstation, Illustrator etc). Sometimes I'd like to turn this map somewhat interactive on the web. What I'm looking for is a ...
5
votes
2answers
5k views

OpenLayers custom request for WMS GetFeatureInfo

In OpenLayers, there is a WMSGetFeatureInfo control that can be attached to a layer and listen to click or hover events on the map, requesting info on the feature being currently clicked (or pointed) ...
3
votes
1answer
1k views

Call GeoExt action by click ExtJs button

I have a problem. I have a ExtJs button and want to call anyone GeoExt action. For example this {xtype:'tbbutton', cls: 'x-btn-icon', id: 'testbutton', ...
3
votes
2answers
6k views

Click a marker icon to open a pop-up, using OpenLayers

Background Looking to create a pop-up that performs an Ajax request when the user clicks a marker on an OpenLayers map. The markers, however, have different icons. The following is working code that ...
1
vote
1answer
579 views

Having difficult time to implement a Rule using OpenLayers.Filter.Function

I'm trying to set up a Rule using the Function Filter. But it does not work: the lines on that layer are just black. And more importantly, the filtering function is never executed. Can someone please ...
2
votes
1answer
2k views

OpenLayers: Feature edit handles not appearing when addUniqueValueRules applied

I have been pulling my hair out over this issue and am now wondering if it is a bug rather than something I am doing wrong. The Problem: I have a vector layer that users can edit. Each feature on the ...
0
votes
0answers
632 views

WFS layer seems not work with Geoserver 2.2 RC1 and openlayers - updated

I have a Openlayers+Geoserver application. Now I'm trying to move the application on a new server with the new GEOSERVER 2.2 RC1. With the Geoserver ver. 2.1.0 i was able to show the WFS-T layer, ...
2
votes
0answers
205 views

How do you emulate a right click on a tablet/mobile device using OpenLayers?

I'm trying to make my OpenLayers mapping application work for mobile devices and one feature I haven't figured out how to emulate is the 'handleRightClicks' Control Click option. Anyone know how to ...
1
vote
0answers
101 views

Remake gxp class

I want to remake gxp.editFeature class. In standart class to edit object need to choose it on map. I want choose abject in list of objects and edit it. So To do this i need make a new gxp.editFeature ...
1
vote
1answer
453 views

Tips for improving GeoServer WPS Performance

I have the following filter: function getFilter(polygon) { var filter = '<ogc:Filter>' + '<ogc:Intersects>' + '<ogc:PropertyName>the_geom</ogc:PropertyName>' + ...
-1
votes
1answer
123 views

load base layer from database

I have svg maps of floor plans which I am using OpenLayers to project and display interactive features on. I would like to load the files from my database, (where they are stored as blobs) instead of ...
1
vote
2answers
1k views

Passing selected polygon to INTERSECTS filter in a WFS request

In the code below, <ogc:Filter> <ogc:Intersects> <ogc:PropertyName>the_geom</ogc:PropertyName> <ogc:Function name="querySingle"> ...
4
votes
2answers
3k views

Clickable points with openlayers

I'm trying to have some very basic functionality with vector points with Openlayers 2.12 and I can't figure out how to track a click event on a point. I create a map using the following code and add ...
3
votes
3answers
1k views

openlayers attribute substitution failing on kml file

I'm trying to read in mile markers for a marathon from a .kml file and use the MILE attribute to set the label. My layer code looks like this: // add layer mile_markers_layer = new ...
3
votes
2answers
1k views

Getting json feature id on OpenLayers

I'm projecting some features using json format on OpenLayers. I need to get the id from the feature (not the OpenLayers' id but the one in the json file). The file looks something like this. ...
0
votes
2answers
764 views

How can I convert Polygon to LinearRing Geometry?

How can one convert a Polygon to LinearRing geometry using OpenLayers? I'm thinking that I can do this by getting bounds of the polygon, then use this to construct a Points array. Finally, use ...
0
votes
1answer
420 views

ArcGIS Server tiled layer doesn't update on pan in OpenLayers

I'm trying to add an ArcGIS Server tiled/cached layer to OpenLayers. This is working using code modified from these samples. The only problem is that when panning the map, the layer does not update ...
3
votes
1answer
402 views

How to access the icon of a feature retrieved from text in a vector-layer?

I`m using OpenLayers to show POIs on a map. These POIs are loaded from a textfile and I`m using a Vector Layer to get it onto the map - works great. Now I want to use the cluster strategy to have ...
2
votes
1answer
1k views

Unable to see whole world map by decreasing panzoom bar?

I am seeing one weird thing in Openlayers today. I am unable to see whole map by using panzoombar, previously i used to. <html> <head> <title>OpenLayers Example</title> ...
3
votes
1answer
1k views

How to send WPS request using OpenLayers

I have generated the WPS request below using GeoServer's WPS Request Builder. I wish to append more parameters to this request (geometry selection), and then send it either using GET or POST from ...
1
vote
2answers
383 views

Openlayers controls outside the map

I want put OpenLayers controls outside a map but dont know how. I find this example http://openlayers.org/dev/examples/editingtoolbar-outside.html but its not what i want. I have a button and want ...
2
votes
3answers
2k views

Change zIndex of Vectors in openlayers

I have a bunch of linestring features on a vector layer. Some of them overlap. If I trigger the hover event on those features, I want them be in front. I did find some functions to set the z-index of ...
1
vote
1answer
512 views

openlayers trigger hover event

I have a bunch of tracks on screen in a vector layer. I used some hover and select styles in the layer styleMap and these styles are properly triggered by: var highlightCtrl = new ...
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
489 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
991 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
175 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
539 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
494 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
880 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
1k 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
271 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
425 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
265 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
503 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
220 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
663 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
346 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
353 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
84 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
728 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
178 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
368 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 ...