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

learn more… | top users | synonyms

3
votes
3answers
6k views

OpenLayers change feature's style

Working with OpenLayers 2.11, I'm desperately trying to change my feature style as the user selects it (fairly simple I agree!). Indeed, It seems easy but I can't see where It fails, perhaps someone ...
5
votes
2answers
3k views

Animate feature in openlayers

In my map web app, I have a play pause button that show vehicle route history.I get lat lon from database and create route that vehicle traverse. At below site go to history tab after and choose ...
1
vote
2answers
2k views

Label in the middle of linestring in OpenLayers

Is there anyone can put label in the middle of the linestring dynamically? I've used labelAlign option. I've changed this value from bc, cc, cm, etc. But it doesn't work at all. There's also option ...
0
votes
0answers
368 views

How to draw features with openlayers?

i have a DrawFeature tool. create= new OpenLayers.Control.DrawFeature(myVecLayer, OpenLayers.Handler.Polygon); app.mapPanel.map.addControl(create); i have a store. st = ...
1
vote
2answers
1k views

OpenLayers WMS disappears when including OpenStreetMap

Setup: ArcSDE 9.3.2 Oracle 11g GeoServer 2.1.4 OpenLayers (latest build) OpenStreetMap InternetExplorer 7.0/ Google Chrome EDIT: I have updated information just below the screen shots ...
1
vote
2answers
458 views

Popup is stationary does not move with the location

I am using the GeoExt example and used the same code in my application. This is my code The problem I am facing is that the Popup box in my application on http://128.196.142.94/geo/test/test.html is ...
1
vote
1answer
425 views

Loading features incrementally in a vector layer

I am new to OpenLayers. In one experiment I am doing I want to load, incrementally, features in a vector layer. In my setting, these features should be loaded from distinct OSM files (generated ...
0
votes
1answer
127 views

removing multiple additions to popup

I am using the GeoExt example and this is the js code and trying to get rid of the multiple lat and lon that get added into the PopUp on multiple clicks. Not sure which is the code that I need to ...
1
vote
0answers
265 views

How to get feature geometry?

I want to have a gridPanel with feature geometry. But i cant image how to do this. I have a FeatureStore st = new GeoExt.data.FeatureStore({ ...
2
votes
1answer
1k views

OpenLayers Vector KML draw black when change the style

I am trying to change the style of an OpenLayers.Vector using radio buttons and redraw it, but the result is a black vector. I tried own build OpenLayers11 and 12, beside api openlayers hosted. ...
3
votes
1answer
140 views

How to determine layers affected by a user-drawn polygon

Scenario: I have a set of layers, each covering one country. In my OpenLayers client, I enable users to randomly draw a polygon. A user is then able to perform analysis based on the drawn polygon. ...
0
votes
1answer
3k views

OpenLayers not refresh a layer

i have a problem with refreshing layers. I have WMS and WFS layers from one source. I edit WFS and after do wms_layer.redraw(true) but layer redraw only after zoom in or zoom out. Same with WFS. i ...
2
votes
1answer
1k views

'undefined' is not a constructor (evaluating 'new > OpenLayers.Layer.GML'

My OpenLayers map was working fine before, showing a KML overlay. Suddenly it broke. Now I see this error in my browser error console. TypeError: 'undefined' is not a constructor (evaluating 'new ...
2
votes
0answers
226 views

OpenLayers ArcGIS93Rest layer not showing up

So this seems like it should be super obvious, but I can't for the life of me figure out why I can't get any ESRI layers to show up on my map. I've tried different layers and messing around with the ...
1
vote
0answers
278 views

Does OpenLayers mergenewparams repeatedly hit a WMS server when you change the layer name?

Does mergenewparams repeatedly hit a WMS server if you change the layer name? For example, you call the server with layer 'a' then you use mergewnewparams and call layer 'b', then you use ...
6
votes
3answers
886 views

OpenLayers WFS flip coordinates

I have a problem integrating WMS and WFS. Basically what i want is when user clicks on WMS then a clicked polygon is added to vector (and selected). The problem is that the WMS is in version 1.3.0 and ...
3
votes
3answers
2k views

How to zoom to object on WMS layer with OpenLayers?

I have a map with WMS layer. And want to zoom to selected object. Now i use GetCapabilities from Geoserver and zoom to bbox of whole layer. So how to do what i want? Or can u tell me how to get ...
1
vote
1answer
287 views

Inner shadow of a OpenLayers map container?

Not sure if this question should be here in the GIS section or if I should move over to a more common html/css place, but here we go: I'd like to have an inner shadow of my OpenLayers map canvas so ...
1
vote
1answer
1k views

OpenLayers ModifyFeature and styling

In OpenLayers, I have a Vector layer with a StyleMap and SelectFeature and ModifyFeature controls, like this: vector_layer = new OpenLayers.Layer.Vector('My Vector Layer', {extractAttributes: true, ...
0
votes
1answer
1k views

Add labels above the lines in OpenLayers

How to add labels above the lines? Labels are added as follows: var styleMarkersLabels = new OpenLayers.Style( // стили для надписей узлов { strokeWidth: 2, ...
2
votes
0answers
239 views

WPSExecute Format Issue

I have: function createWPSExecuteRequest(namespace, layerName, popFilter) { var request = OpenLayers.Format.XML.prototype.write(new OpenLayers.Format.WPSExecute().writeNode('wps:Execute', { ...
1
vote
1answer
529 views

Can't display overlay

I am trying to add a WMS radar overlay to my map but it won't seem to gather it. noaaRdr = new OpenLayers.Layer.WMS("Latest Radar", "http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?", { ...
3
votes
1answer
1k views

How to display a control (zoom bar) outside map container in openlayers?

Since I'm new to OpenLayers this question might be the simplest of them all but after a quick search on the subject I couldn't find anything useful, so: Is it possible to put a OpenLayers zoom ...
0
votes
2answers
477 views

how to create gis like Uster?

I downloaded qgis, geoserver, openlayers, ext, geoext, qgis-web-client and osgeo. And i have map shape files. i would like create website like this site. i need help. can you send tutorial links thank ...
1
vote
1answer
358 views

I want to convert openlayers interface code to dojox code for pie chart use.So can we use same controls of openlayers map in dojox.If yes, how?

Is their any way to add same openlayers map control to dojox map like navigation,panel,panzoom
1
vote
0answers
859 views

How to fire a query from OpenLayers to GeoServer to fetch 'the_geom' column in PostGIS table?

I am coloring the polygon shapes of world_country. I have OpenLayers in my UI, GeoServer as server and PostGIS as db. All I want is fire this query: select the_geom from world_country where ...
1
vote
0answers
297 views

Problems with labels halo in OpenLayers

Draw label as follows: var styleMarkersLabels = new OpenLayers.Style( { strokeWidth: 2, labelYOffset: 14, label: ...
0
votes
1answer
305 views
1
vote
1answer
427 views

OpenLayers ModifyFeature for multiple layers

Is it possible to configure the ModifyFeature control to edit features in multiple layers?
2
votes
1answer
2k views

How to edit feature attributes with openlayers?

I want to edit object's attributes on WFS layer. I see this example http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group_wfs.html but popup is horrible. I want to use ...
2
votes
0answers
267 views

Anyone have success with OpenLayers and ArcGISCache?

OPENLAYERS Has anyone had success using OpenLayers and the ArcGISCache layer beyond the examples? I'd like to mix tiles with different resolutions and although they seem to scale correctly they do ...
1
vote
2answers
605 views

Is it possible to have a customized zoom level?

I am setting up my own Map Tile Server according to this guide and it is working well now: http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/ The map currently has 19 zoom ...
0
votes
3answers
2k views

How to get names of all layers in a store in GeoServer using OpenLayers

I have strict requirement to retrieve names of all layers in a GeoServer store using OpenLayers. I've gone through the post here, but it doesn't answer my question. I've also gone through GeoServer's ...
1
vote
1answer
1k views

Modify WFS with OpenLayers

I want to edit object on WFS layer but have one problem. I use OpenLayers.Control.ModifyFeature(myVecLayer) to editing.By the logic i do this. Press button and create WFS layer with chosen object ...
2
votes
2answers
905 views

Map resize displays google layer at incorrect zoom level

This is a screenshot of the icons in the wrong position due to the google layer showing the wrong zoom level. This is how it should look, and how it does look after the user pans the map. How does ...
0
votes
1answer
809 views

Getting OpenLayers Vector features vs clusters

I am using OpenLayers Vector with a cluster strategy. When I use Vector.features to get the features returned as a list, it returns an array of clusters and not the array of features. This makes the ...
1
vote
1answer
814 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
193 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
218 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
424 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
988 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
556 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
1k 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
617 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
204 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
100 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
441 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>' + ...