Tagged Questions
0
votes
1answer
43 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
2answers
30 views
add a vector point on OSM map
I have managed to show Lat and Lon
function init() {
navigator.geolocation.getCurrentPosition(function(position) {
document.getElementById('myloc').innerHTML="Latitude: " + ...
1
vote
1answer
33 views
Display list of OpenLayers Features which are currently visible on screen
I have an OpenLayers map a few thousand Points of Interest. These POIs are Vector Features rendered in a Vector Layer.
We are loading the POIs once in order to minimize load on the server.
Next to ...
0
votes
0answers
30 views
OpenLayers Vector Line Feature hard to select
I have a measurement control on an OpenLayers map which allows the user to (unsurprisingly) measure lines and areas on the map. They draw the line/area they want, OpenLayers does the measurements ...
0
votes
1answer
46 views
render kml 10mb KML file cordinates data on OSM map throws stop running script error in OpenLayer.js file
I am trying to render the kml file having 18000 line string data on OSM map using openlayer HTTP strategy.
To render OSM map i am using GeoExt.MapPanel and ExtJS 3.4 viewport.
The problem is I am ...
0
votes
1answer
75 views
Openlayers Linestring over edge of map
im trying to create a route displayer for ships. But im struggling with the edges of the map. When going from ie. 179* to 2* it displays a line across the entire map, instead of displaying it on the ...
0
votes
1answer
82 views
Drawing pie charts with vectors on OpenLayers?
Is anyone got any examples of drawing pie charts with vectors as markers on OpenLayers ?
Cheers,
2
votes
2answers
353 views
How to connect OpenLayers to PostGIS data?
I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly ...
0
votes
0answers
77 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 ...
1
vote
2answers
299 views
Openlayers remove previously drawn polygon on starting to draw next one
Objective:
At any point of time there SHOULD only be zero/one polygon(s) on a vector layer with a polygon control. I need the previous polygon to be removed as soon as user starts drawing the first ...
1
vote
1answer
52 views
How to abort a layer event in Openlayers
I have a problem ( How to stop features to redraw unwillingly in OpenLayers ) that might be solved by aborting the beforefeatureremoved or beforefeaturesremoved event.
What I would like to to is to ...
2
votes
1answer
50 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
0answers
62 views
OpenLayers move each vector feature of layer by constant pixels away from center
I am stuffing a lot of features, each from a different layer, onto exactly the same point, so the visual result is somewhat confusing and it is necessary that some graphics have some offset of ...
2
votes
1answer
249 views
How to use a sld file with Openlayers using OSM data?
My app, made with openlayers, displays building data called from overpass api.
var data_url = "http://overpass-api.de/api/interpreter?data=(way[building](bbox);node(w););out body;"; //main working ...
2
votes
0answers
191 views
how to search a vector/wfs layer
I'm using Geoserver/PostGIS/openLayers
I've succesfully set a vector layer. And now I'm trying to create a search functionality.
But something goes wrong.
First I set up the layer and add some basic ...
1
vote
1answer
74 views
Vector title attribute can't display?
var vectormap = new OpenLayers.Layer.Vector('Overlay',
{
styleMap: new OpenLayers.StyleMap(
{
"default": new OpenLayers.Style({
...
2
votes
2answers
85 views
restrict quantity of features displayed with OpenLayers
I have 14000 point vector features in the map. Displaying them all is very slow (renders at like 1 fps in chrome).
How can I tell Openlayers to only display a subset of them, for example features ...
6
votes
1answer
112 views
Fast data representation on the vector layers
I have found an interesting article about how HTML5 supports representation on large datasets.
Article can be found here. In the article it is said that HTML5 and feature simplification can ...
4
votes
2answers
392 views
OpenLayers - Get features inside a polygon
In my OpenLayers map I allow users to draw an ad-hoc polygon vector. Then I need to get all the features from a WFS vector layer that fall within the ad-hoc polygon.
Here is the code I have that ...
2
votes
1answer
249 views
GML and GeoJSON vector layer can not display in Firefox and Chrome
I have following codes. It works perfectly in IE (GML and GeoJSON vector layer was loaded), but not in Firefox and Chrome without any errors noticed. Please help me to fix this problem.
Here is the ...
2
votes
1answer
176 views
How to get all Vector layers from OpenLayers map?
OpenLayers.Map object exposes a method call getLayersByClass. How do I use this method to retrieve all of the Vector layers from the map?
I tried map.getLayersByClass("Vector") but this returned an ...
5
votes
3answers
265 views
How to update feature positions with clustering in OpenLayers?
I have an OpenLayers 2.12 map with a vector layer with a cluster strategy. All the static behavior is how I want it. Now I'd like to add the possibility to update the features' position. I do this ...
0
votes
1answer
103 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 = {
...
3
votes
1answer
313 views
adding polygon to database in openlayers
I want to add a polygon to the database. I used the following code. The problem is that I am to able to save in database. Whatever polygon I draw on map it gets save temporary and as soon as I reload ...
2
votes
1answer
226 views
LoadingPanel - Waiting for Vector & WFS loading
I have vector layer with WFS protocol. and because I have a huge amount of data, there is a while before features loaded on the map.
So i need to tell user to wait a moment until they load by ...
1
vote
1answer
189 views
Openlayers - Vector Layer - Combining hide/show features using style property
I am trying to filter vector layer features according to their attributes. I have 4 check boxes: type_1, type_2, shape_1 and shape_2 Note that I am using Extjs for interface.
at beginning I could ...
1
vote
1answer
98 views
BBOX strategy to load all features?
Since I have no way, other than using BBOX strategy with my vector layer + wfs protocol
Is it required to use BBOX strategy with WFS protocol in OpenLayers?
I'm wondering if there is a way to force ...
1
vote
2answers
365 views
Is it required to use BBOX strategy with WFS protocol in OpenLayers?
is it a must to use BBOX strategy with WFS protocol in Vector layers ?
I cannot display this layer without BBOX strategy:
vLayer = new OpenLayers.Layer.Vector("Test", {
styleMap: new ...
0
votes
0answers
23 views
I cannot remove BBOX strategy from vector layer [duplicate]
Possible Duplicate:
Is it required to use BBOX strategy with WFS protocol in OpenLayers?
I used to apply a BBOX strategy on my vector layer (WFS protocol) :
vLayer = new ...
1
vote
2answers
373 views
How to show vector features in OpenLayers after hiding it?
I did change some vector features style (through check-boxes) using style property :
var features = layer.features;
for( var i = 0; i < features.length; i++ ) {
//features[i].style = { ...
2
votes
1answer
961 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', {
...
3
votes
1answer
338 views
OpenLayers 2.12 + click handler + get the name of the vector
Basically,
I add several vector layers (KML content got from jQuery GET) in this way:
var layer1Vector= new OpenLayers.Layer.Vector('activeInfo');
layer1Vector.addFeatures(featuresLayer1Vector);
...
1
vote
2answers
199 views
How to print a vector layer over Google map? “Physical Printing”
I use Geoserver, Openlayers, Extjs and GeoExt to build an app.
I am trying to get vector layer on Google map printed with pop up a Print dialog, I tried :
var targetElement = Ext.getCmp('mapPanel');
...
1
vote
0answers
241 views
Vector layer shifted on OSM map: why?
I've defined the following map:
Proj4js.defs["EPSG:31258"] = "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel ...
7
votes
2answers
244 views
OpenLayers how to maintain layer ordering while using SelectFeature control
I'd like my map to display a few layers in a particular order. Some of these layers are Vectors, others are XYZs, and some of my Vector layers display attribution.
Initial layer ordering works fine ...
4
votes
3answers
3k views
Customizing Popups in Openlayers
Is it possible to customize the shape of popups in OpenLayers? For example, I am creating a pop-up using the following approach:
var popup = new OpenLayers.Popup.FramedCloud(
"popup",
...
9
votes
2answers
489 views
What's the best way to display thousands of polygons in Openlayers?
I am trying to create an Openlayers map that will display thousands of polygons. And when the user clicks on each, I want some of the metadata to display. Working with this large of a dataset seems ...
0
votes
0answers
115 views
OpenLayers allOverlays with Vector Layers only
In OpenLayers I want to create a map from Vector data only like in the example http://openlayers.org/dev/examples/all-overlays.html .
My code is the following:
var map
function init() {
...
2
votes
2answers
415 views
How to render a multi-layered (raster + vector) map to a file (PDF, SVG or JPEG, PNG)?
When using OpenLayers I can compose a map with several layers which is displayed nicely by my browser, but I need to do the same server side (no browser composing the layers), and I'm waiting a image ...
4
votes
1answer
1k views
OpenLayers, zoom to vector layer extent
It seems quite simple thing to me, but I get an error.
map declaration
map = new OpenLayers.Map('map_element', {...
projection : _projObj.mercator,
displayProjection : _projObj.wgs84
}
layer ...
6
votes
3answers
609 views
30,000 data points… can this be reasonably served using openlayers?
I'm trying to tackle a web GIS problem and need to figure out the best strategy. I have a map with 30,000 cells on it forming a grid for the province of Alberta. I have a list of data points for ...
1
vote
1answer
591 views
OpenLayers : How to make a marker fixed [duplicate]
Possible Duplicate:
How to skip drag event to stop a feature being dragged
I've created a map and added markers to baselayer on click by using this code :
vectorLayer = new ...
0
votes
1answer
451 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,
...
3
votes
1answer
161 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
195 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
3answers
746 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
304 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
2answers
193 views
Its possible to catch ServiceException in Openlayers?
Im trying to catch exception in OpenLayers using vector layers in conjunction with http protocol, its possible to intercept an ServiceException from geoserver ... it will be great to display some ...
3
votes
1answer
756 views
OpenLayers - Vector Layer and Google Maps - vector layer and google layers don't seem to be in sync when zooming on Chrome
I am working with a Google Layer and a vector layer in OpenLayers. I was wondering if anyone else noticed any problems with Chrome displaying Google Maps layers on OpenLayers? It seems that when I ...
2
votes
1answer
285 views
Vector layer feature destroys after geometry transform
I want to get drawn polygon coordinates.
var myLatLonSquare = vectorLayer.features[0].geometry.transform(map.getProjectionObject(),
new OpenLayers.Projection("EPSG:4326"));
...




