0
votes
1answer
60 views

get and change style property openlayers

i need to change the property of some style after its created, and i need to change it with knowing only the string of the property name. i am getting string like "fillColor" and value like "blue", ...
0
votes
1answer
36 views

Select all features close to clicked

I have an openlayers map with more then 20000 features not in wms, only in vector layer. I have a control to select features, but sometimes it's really hard to select, specially the lines, and also ...
1
vote
1answer
59 views

cannot click on points in openlayers

I use openlayers 2.13.1 along with Geoserver and PostgreSQL I have a code for a vector layer , in my openlayers like so //style for layer var style_d = new OpenLayers.Style({ 'fillColor': ...
1
vote
1answer
187 views

Openlayers Vector Layers eventListeners: how to specify different data without defining multiple layers

I have a map. It has two origins, and two destinations. The code for one origin is here: vectors_origin = new OpenLayers.Layer.Vector("Origin", { eventListeners:{ ...
1
vote
2answers
571 views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
0
votes
2answers
102 views

How to drag a point and then use savestrategy in OpenLayers

Im trying to use the wfs-t in openayers using the savestrategy. I have created a savestrategy and it works when I for example uses the DrawFeature Control to add a point. A new point is added to the ...
0
votes
1answer
151 views

Different Styles Within Vector Layer

Is there any way to configure OpenLayers styling method? I have a vector layer and I would like to style the features depending on a value of a flag variables, so I can't use rules. Lets say I have ...
0
votes
0answers
168 views

Display a single country with OpenLayers

Can I display a single country using Openlayers? I'm not trying to restrict zoom levels or . I want only one single country to be displayed. The rest of the world cannot be displayed. My reasearch ...
2
votes
1answer
112 views

How to stop features to redraw unwillingly in OpenLayers

I have a problem where when editing features from a wfs vector layer. After some changes are made to the geometry, the feature redraws itself and the changes are lost. Usually the problem occurs more ...
0
votes
1answer
230 views

Vector data(point) is drawn in wrong place on map (OpenLayers)

I need to show a map (world map, used default OpenLayers WMS) and one point on it (with events like onhover, etc). Here is my code: var options = { ...
2
votes
1answer
2k views

How to change an OpenLayers vector layer from automatic to manual get request?

I have a web server that returns a FeatureCollection in JSON. I was getting this using the code below, which works perfectly: var vectorLayer = new OpenLayers.Layer.Vector('geoJSON', { ...
0
votes
1answer
2k views

How to change events in the Oncomplete Drag function in Openlayers

below is code that works for Openlayers drag function: drag = new OpenLayers.Control.DragFeature(polygonLayer, { autoActivate: true, onComplete: function() {alert('Are you sure this is the ...
2
votes
3answers
2k views

Openlayers get coordinates from polygon

please could someone help me and bless me with an example of how to get coordinates from a polygon in OpenLayers?
0
votes
1answer
709 views

How to highlight track in KML on hover with OpenLayers

I have KML layer with multiple tracks and I would like to highlight them individually on mouse hover. I tried to implement this like in the example found in OpenLayers examples, but couldn't get it ...
3
votes
1answer
823 views

Why is Openlayers KML-layer undefined when using permalink

I am working on Openlayers to dynamically load KML tracks on map. I want it to load filtered KML everytime map is moved or zoomed based on viewport and zoom level. I got it working with code below, ...