0
votes
1answer
13 views

Add Marker on the polygons' centre using Openlayers?

I have written a code to draw polygon from the WKT format.Now I need to add the marker at its centre. In the following code I have passed the centre and shape in WKT format(extracted from database). ...
1
vote
2answers
45 views

Openlayers 3 detect the layer by mouse move

I wanna do something like this ; Openlayers 3 Vector Layer Example But I don't want to one layer, 3 or more layer on the map and get feature like the example. How can I seperate the layer ...
0
votes
0answers
11 views

How to get feature on vector layer in Openlayers 3?

I'm try to get feature of a vector layer, but I'll have 3 or more Vector layer. When I click the map, I didn't get the feature. My vector layer definition; var vectorAltAlan = new ol.layer.Vector({ ...
2
votes
1answer
63 views

Openlayers creating RegularPolygon that is too small then return false

sorry my English very pool and just can type few word... My project has to use imagelayer to show map , it can create box on map, box will be a area to put device marker on top , but when the box ...
2
votes
1answer
43 views

Non-default icon of OpenLayers Vector Feature

thats propably some minor problem, but i have deadline above my head and i can't get any clue whats wrong with my code, so I decided to come here for help. Im changing from markers to vector layer and ...
1
vote
0answers
32 views

Help embedding Openlayers map in Eclipse BIRT report

i have this code, it displays the zoom buttons only but it doesnt display my map. what could be the problem? <html> <head> <script ...
1
vote
1answer
40 views

Adding vector layer over WMS using OpenLayers?

I am trying to add vector layer to my map from a GeoJSON file stored in the same directory as my maps index.html. However It wont work. Is there something wrong with my syntax? My code: ...
1
vote
1answer
61 views

In OpenLayers 3, how do I draw an extent as a LinearRect?

In OpenLayers 2, this was an easy feat. I was able to simply instantiate a LinearRect given the coordinates of my BoundingBox, and then add the LinearRect as a feature to a vector layer I had added to ...
1
vote
0answers
19 views

Zoom to a vector feature in a vector layer

I am using OpenLayers+GeoServer and I have a vector layer in a map with some features I would like to make a zoom and show the map centered in one of these features that I can get by ID. How can I do ...
1
vote
0answers
63 views

OpenLayers - Add points at vertices of line while drawing line

I would like to create points while I draw a line on my map in OpenLayers. That is, at each vertices of a line and at the end points there is a shape like a square, circle, or diamond. I have this ...
1
vote
0answers
22 views

Openlayers text symbology is not being shown

I have a Vector Layer in a .json file: { "type" : "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Station_Id":107, "NAME":"ARDEBIL(F)","ELEVATION":"1314.3"}, ...
2
votes
0answers
39 views

Adding feature to GeoServer vector layer using WFS-T in absence of fid index?

I want to add a feature to GeoServer vector layer with WFS-T. When I use saveStrategy.save(), an error returned that said: java.io.IOException: current fid index is null, next must be called ...
1
vote
0answers
38 views

Create vector layer from feature collection in OpenLayers

I have used a WPS process gs:UnionFeatureCollection to compute the geographical union of two collections of WFS vector features. The process returns a collection of features which I intend to display ...
2
votes
1answer
31 views

OpenLayers - cannot set layer opacity

I have the following problem: by default, you can simply change the opacity of layer by writing for example: layer.setOpacity(0.3); But when I add it to my map SelectFeature controls, my layer is ...
0
votes
0answers
57 views

OpenLayers DrawFeature Vector parameters

"Dear all, in my map application I am using a Vector/DrawFeature approach like this: var refresh = new OpenLayers.Strategy.Refresh({force: true, active: true}); var proj = "EPSG:900913"; var ...
0
votes
0answers
50 views

OpenLayers.Layer.Vector and BBOX

i configured this on my client page var kmlLayer = new OpenLayers.Layer.Vector("KML" ,{ strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.BBOX()], protocol: new ...
1
vote
1answer
28 views

Load a vector only for a specific zoom

I have a map with 4-5 vectors. At the beginning, the loading of the web application is very very slow, but was fine before I've added a new one vector, which is used only for little zooms. Is it ...
1
vote
2answers
297 views

Openlayers: Get Start and End Points of Line Vector Features

I'm trying hard to get start and end of lines from a vector. The line vector is loaded from a kml-file. For now, I tried to iterate over features in the vector and grab the start point and put it in a ...
0
votes
1answer
84 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
46 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 ...
0
votes
0answers
56 views

how to easily serve vector layer with extra attributes for openlayers

On a website I'd like to show an openstreetmap with buildings colored by a certain feature (tag). So far I was able to extract the buildings for a bounding box, save them as an osm file and load it ...
1
vote
1answer
153 views

CartoDB map in openlayers

Is there a way that i can upload my CartoDB map in Openlayers as a WMS layer or Vector layer. Here is the my CartoDB map link. http://cdb.io/1nxdrpf
0
votes
0answers
73 views

How to achieve labeling in openlayers as Google did?

I am tried to find a solution for my question. Please look the images below. Google Google are awesome!!.. They are doing fantastic technique in labeling part. Please look the marked labels, the ...
1
vote
1answer
131 views

How to automatically transform between base layer and vector layer in OpenLayers

I have a simple example on http://jsfiddle.net/29bsw/ I have a map with an OSM layer as base layer and an additional vector layer. The projection of the map is defined as EPSG:900913 and the ...
0
votes
1answer
120 views

Geomedia WebMap WFS to vector marker layer in Openlayers

Looking for minimal example/advice on getting a WFS service to show up as a vector layer with markers/icons in Openlayers map. I have created the WFS service in Geomedia WebMap 6.01.11.19 and the ...
1
vote
3answers
147 views

How to prepare a multi-colored vector layer?

I need to present a multi-colored vector layer and something similar to below: I need to prepare the vector layer by making use with the data set available in my database. Inside my database, I ...
2
votes
1answer
93 views

Handle a great amount of Markers with OpenLayers

My general Problem is to maintain a lot of markers. For the beginning I want to display all Bus Stops of Berlin, Germany and surroundings as Markers. I already got that I have to use a strategy like ...
1
vote
1answer
68 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': ...
0
votes
1answer
497 views

Draw order (zIndex) of OpenLayers polygons and points in the same layer

My question is similar but slightly different from this one: http://stackoverflow.com/questions/5003349/openlayers-vector-features-z-indexing I have an OpenLayers Vector layer which contains polygons ...
1
vote
0answers
271 views

Updated: Openlayers Vector Layers with Google Map Base Layer (via Grid): Vectors Stick but can't get correct resolution/projection

Revamping this question instead of opening a new one. Previous issue: vector layers were not "sticking" to the map, so when you would zoom in or out the vector layers would "come out" at you. Note ...
3
votes
1answer
336 views

Openlayers vector layer don't draw well on chrome (single tile)

I have singleTiled layer in OL (using chrome). The layer don't draw completely unless I pan the map slowly to the south (here is example how the layer keep drawing itself each time I pan) : ...
1
vote
1answer
92 views

OpenLayers, Get clustered point's val

I'm working on a map with WMS overlays and a lot of markers, my problem is when I try to calculate the average of points clustered, I've found how to differentiate the behaviour and the label text ...
2
votes
1answer
2k views

OpenLayers Vector Layers: adding and removing features VS. redraw/refresh

I am currently using addFeatures and removeAllFeatures in my code to get the desired results and this is working OK. However, I have been asked to ensure that the vector layers are not being ...
0
votes
2answers
364 views

How to Resolve Inconsistent OpenLayers vector position Over Google map [duplicate]

I have an OpenLayers map with a Google base layer and an OpenLayers vector layer on which people can draw their own bounding boxes using the DrawFeature control. I have found that, as you zoom in, ...
1
vote
1answer
148 views

Openlayers Vector Event Popup with Textbox

The Openlayers map here: http://www.dassh.ac.uk/demonstrations/valmer/demo5.html has an event to add a vector layer, plus creates a textbox on the page below. Ideally I'd like the click event to add ...
-1
votes
1answer
754 views

Retrive data from database in openlayer GIS

i am using this code but it shows nothing, whats wrong with this code. <!DOCTYPE html> <html lang='en'> <?php $conn_string = "host=localhost dbname=postgis_21 user=postgres ...
1
vote
1answer
291 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:{ ...
7
votes
3answers
404 views

Create interactive map with no server

I have managed to build a great web mapping application using tiles created from GeoWebCache and a custom gridset, but I now need to add an overlay to the base maps. The only interactivity I need is a ...
1
vote
1answer
80 views

map can only have one feature, after user click

I'm using openLayers 2.13.1. I have a map wih a vector layer and Editing tools. I want the map to have only one feature even if the user keeps adding. So I want the new feature to automatically ...
7
votes
2answers
423 views

What does vector tiled map mean?

I'm working on an application that renders geoJSON into OpenLayers map. The idea is about not having PNG images downloaded from external services (OSM or Bing) but having geo information in geoJSON ...
1
vote
1answer
415 views

Check if feature is selected (Openlayers)

I wonder if there is a way to check whether a pointfeature (OpenLayers.Feature.Vector) is selected. I read the API, but didn't find any solution. Any idea?
1
vote
0answers
98 views

OpenLayers - Features in cloned layer changes style with original feature

Please help! My situation is that, I clone() a "newLayer" from an "oldLayer" with its features. Both of them seems correct at first. But then when I tried to change the style of "featureA" in the ...
1
vote
2answers
383 views

OpenLayers: WMS layer above select-controlled vector layer?

Is it possible to display an image layer (WMS or Image) above a vector layer with activated SelectFeature control in OpenLayers? The image layer (radar returns) contains only sparse, semi-transparent ...
1
vote
2answers
657 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($) { // ...
3
votes
0answers
145 views

Cross-browser marker animation in OpenLayers

Currently I'm trying to implement animated markers in OpenLayers. I'm using PNGs for the markers, set by the externalGraphic style property on an OpenLayers.Layer.Vector. I need to be able to make ...
0
votes
1answer
684 views

provide an alternative “label” when styling vector layer with openlayers

I'm using openlayers 2.12 and I am styling a vector layer using your typical new OpenLayers.Style({ Now, this layer does two things. First , renders polygons from Geoserver, so in the style I have ...
1
vote
2answers
342 views

Custom filters (server side) for Openlayers Vector Layer

I have a vector layer in openlayers with source in GEOJSON (custom php server, which I have in complete control) and BBOX strategy. Vector points contain point sources which have different ...
0
votes
1answer
136 views

OpenLayers Strategies

Can we use the strategies OpenLayers.Strategy.Fixed and OpenLayers.Strategy.BBOX simulataneously on same vector layer?
1
vote
0answers
46 views

Align OpenLayer raster with OS Mapping Vector

I have an OS Vector map of a town in Ireland. When I load the Google Satellite Raster from the Open Layers plugin, the results are slightly off, by about 2m, probably due to ariel persepective. I'm ...
1
vote
1answer
355 views

Add a popup to a Vector LineString in OpenLayers?

Is it possible to add a popup (without a marker icon) to a Vector (LineString)? This is my code, if possible, how to change it to add the popup? I need the popup to display some additional ...