Questions tagged [openlayers]

Use when the version you are using of the OpenLayers JavaScript client toolkit is 3 or later

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Map with OpenLayers 3 from GeoServer not showing but no error

References to localhost changed to mydomain.com otherwise Stack Exchange doesn't allow me to post. I am using OpenLayers 3 to show a map. I can successfully show vectors on the map by using a GeoJSON ...
2
votes
2answers
3k views

ArcGIS93Rest for Openlayers 3

In Openlayers v2 I could get a map from an ESRI server that was not a cached service using code similar to below var arcims = new OpenLayers.Layer.ArcGIS93Rest("MyName", "http://sampleserver1....
3
votes
1answer
369 views

ol.style.Rule is implemented in v3.0.0-beta.1 and not in v3.0.0

Can we use ol.style.Rule and ol.expr.parse in OpenLayers-v3.0.0? I cannot find them but they are implemented in OpenLayers-v3.0.0-beta.1.
7
votes
1answer
8k views

OpenLayers 3 get current center

Is it possible to get the current position (lat/lng/zoom) in OpenLayers 3 (Like map.getCenter() in Leaflet)? I couldn't find anything in the docs.
3
votes
2answers
629 views

Alternatives to the Vincenty geodesic functions in OpenLayers 3?

I'm migrating an application from OpenLayers 2 which uses OpenLayers.Util.destinationVincenty() to compute the projected latitude and longitude of a point from an origin given an angle and distance in ...
1
vote
1answer
527 views

Trying to overlay Ordnance Survey Tiles onto a different OpenLayers TileLayer

I am trying to add two layers to a Map using OpenLayers 3, one is the information from Bing Maps, and the other is data from the Ordnance Survey data. I have both maps displaying correctly in ...
1
vote
1answer
4k views

Openlayers 3 draw set name

I have following simple draw interaction: draw = new ol.interaction.Draw({ features: featureOverlay.getFeatures(), type: (type) }); Now I would like to add attributes like a name and id to ...
1
vote
2answers
2k views

Modify interaction using Icon image in OpenLayers3

I have vector features represented by icon images in a map using OpenLayers 3 (3.0.0). These features can be modified by the Modify interaction only if the user place the mouse cursor close their ...
1
vote
0answers
58 views

My map looks wierd and “pixly” in OL3

I'm trying to present a mapserver with OL3, it doesnt work well. The documentation of the mapserver is non-existent and the GetCapabilities to the mapserver responds with a very short (not so good or ...
13
votes
5answers
18k views

Z-index in OpenLayers 3: layer ordering in OL3

Is there a method to change Z-indexes of layers in OpenLayers3 like it was in old version? map.setLayerIndex(markers, 99); //set the marker layer to an arbitrarily high layer index I need to change ...
10
votes
1answer
19k views

OpenLayers 3 - draw multiple lines/paths based on coordinates

I am trying to draw a line(s) based on give coordinates (starting and ending point). Googled , found few examples but non of them seem to work probably because they are for OL2, so this is my last ...
1
vote
0answers
66 views

How to display two WFS layers at the same time from MapServer?

I'm using OpenLayers, I have two WFS vector layers. When I show only one layer, it works. But doesn't work when I'm trying to show two WFS layers at the same time. How to show two WFS layers ...
0
votes
1answer
1k views

QGIS web client mobile/tablet viewer tutorial?

I have been looking at OL3-mobile-viewer as an option to make my maps more accessible. Unfortunately I cannot figure out what I need to change to hook it up with my existing QGIS server and qgis-web-...
2
votes
1answer
734 views

Geoserver 2.5.2 CQL BBOX filter

Trying to use CQL bounding-box filter, but get a strange result like this: loadFeatures({"type":"FeatureCollection","totalFeatures":15640,"features":[]}) It showing a total 15640 features in that ...
3
votes
1answer
914 views

How to do OpenLayers.Request in OpenLayers3?

I have been searching for solutions to call GeoServer REST api from OpenLayers 3 for a long time. I found that for OpenLayers 2, there is a OpenLayers class OpenLayers.Request for doing this: http://...
2
votes
1answer
2k views

how to get Extent or BoundingBox from geoserver in openlayers3

I use wms layer from geoserver on my map and i use openlayers3 api. I want to zoom to my selected layer but for this i have too use extent of my selected layer. mySelectedLayer=map.getLayers()....
13
votes
4answers
17k views

Missing LayerSwitcher in OpenLayers3?

I was wondering if there is a LayerSwitcher control in OpenLayers 3? I read that ol3 is a complete rewrite. But I can't seem to find the equivalent of LayerSwitcher from http://openlayers.org/en/...
0
votes
2answers
1k views

Openlayers 3 Vector Layer error

Getting error from Firebug on running this code: TypeError: f is null (ol.js 409) The map is showing up properly. After adding the line : this.map.addLayer(vectorLayer); I get the mentioned ...
2
votes
1answer
2k views

How to get wms layer's extent OpenLayers3?

Here is a part of my code: var wms = new ol.layer.Tile({ source: new ol.source.TileWMS({ url: 'localhost:8080/geoserver/BEIS_WS/wms', params: { ...
0
votes
1answer
319 views

How to move WMS layers independently using OpenLayers 3 (with GeoServer)

I have two GeoServer WMS layers on OpenLayers 3 map. What I need to do is to make a button that will move one layer, let's say 10m to the East. Other layers should not move. Moved layer should keep ...
1
vote
1answer
901 views

animated marker in openlayers3

i want to add a marker on may map but i have to add pulsate class my marker like google map jsfiddle can anyone help me? this is my code var vectorSource = new ol.source.Vector({ //...
1
vote
1answer
8k views

Get layer name by click on features OpenLayers3

I want to add selec interactions to my OL3 map. Adding two different select interactions like this is not working. Only the second one works. Like this: var select = new ol.interaction....
1
vote
2answers
2k views

OpenLayers 3 and Three.js

I have asked this question in StackOverflow, but got no useful answer - So perhaps I could get some help here. I would like to generate a 3d Terrain using THREE.js, and I would like to overlay ...
2
votes
1answer
519 views

Comparing two maps with two different libraries

I'm currently making a demonstration to compare the two OpenLayers libraries (2 and 3). For doing this, I have made two div elements and put the different maps on each other. The goal is to make a map ...
1
vote
1answer
113 views

GeoServer 2.5.2 + OpenLayers 3 not working

I have installed GeoServer 2.5 and by default it had OpenLayers 2.8, now I have replaced the OpenLayers folder with OpenLayers 3 (ol3) contents and it is not working. The examples in the ol3 folder ...
1
vote
2answers
6k views

Using OpenLayers 3 or 2 to add layers from Google Maps and Mapserver?

I am beginner in OpenLayers and am starting with the www.openlayers.org documents, which use OpenLayers 3 to teach the basics of OpenLayers. Now, I would like to add layers from Google Maps and ...
0
votes
1answer
1k views

OpenLayers 3 drag and drop interaction with custom projection?

I am trying to add layers by using drag and drop interaction. Here is jsfiddle.http://jsfiddle.net/anuket/umdwzn10/ It almost works, I mean new layer is added, but for Geometry it gives "NaN". Geojson ...
5
votes
2answers
9k views

Reproject GeoJSON in OpenLayers 3

I'm basically trying (and failing) to replicate this in OpenLayers 3. I've set up a fiddle here: http://jsfiddle.net/vu8ecy8v/5/ I'm under the impression that OpenLayers will reproject a GeoJSON ...
4
votes
2answers
3k views

How to get coordinates of Drag Box using OpenLayers 3?

I'm pretty new to From Openlayers and I have a problem. I can draw a rectangle using DragBox on my OpenLayers 3 map. How can I get its coordinates? I tried getGeometry() but it returns 'null'. I think ...
15
votes
4answers
16k views

Openlayers 3 Max Extent

I want to restrict where the user can pan on the map, but I can't seem to find any resources that tell how to set the max extent of a map view in OpenLayers 3. I know there was a solution in ...
1
vote
2answers
1k 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 separate the layer ...
2
votes
2answers
1k views

Overlaying Raster image with Google Maps in OpenLayers3

I am trying to overlay Google Maps with a raster image layer in Openlayers3 and am new to this. Can anyone help by providing the steps involved in performing this task?
2
votes
1answer
699 views

The 'suite-sdk debug' command failed. - Boundless SDK and OpenLayers 3

I have a few questions about the creation of an application with Boundless SDK and OpenLayers 3. I'm trying to create an application with the templates ol3view and ol3edit, using the command suite-...
4
votes
1answer
2k views

OpenLayers Full Screen control not working [closed]

I have a problem with OpenLayers controls. I have two controls which are perfectly working, var mousePositionControl = new ol.control.MousePosition({ coordinateFormat: ol.coordinate....
2
votes
1answer
6k views

OpenLayers HeatMap add customized data

I want to add HeatMap customized data based in a vector (longitude, latitude, temperature). Currently I have this code: data = new ol.source.Vector(); map = new ol.Map({ target: 'map_canvas'...
2
votes
3answers
8k views

Applying multiple CQL_FILTER to single GeoServer LayerGroup?

I've created a page with OpenLayers 3 that adds a WMS Tile layer to the map served up by a local GeoServer (v2.6) instance. As it stands adding layer by layer things work just fine: var dynamicMap = ...
3
votes
1answer
3k views

OpenLayers 3 measure example

Here is my fiddle, which is exact copy of Openlayers 3 measure example. What am I doing wrong when my fiddle isn't working? I can't see the blue dot to start measuring my path or area (same problem ...
7
votes
2answers
5k views

Can't get WFS working in Openlayers 3

I try to get my WFS working but with no success. Actually I use nearly the same Code like in the OL3-Examples. In Firebug I can see a lot of WFS-Requests and a GML-Response which looks fine to me. ...
1
vote
0answers
15 views

Error Using OpenLayers 3 Web mapping applications [duplicate]

As being new to web site development, I have been able to display map on my website, but I want that I should only zoom to some specific places of India on loading of web pages. Can somebody please ...
2
votes
1answer
4k views

Setting Base Layer in OpenLayers 3

I know there is a setBaseLayer function in OpenLayers 2. Is there a way I can accomplish that in OpenLayers 3?
3
votes
1answer
1k views

OpenLayers 3 OSM layers in ExtJS 5 looks stretched

I've created OL3 OSM layer in ExtJS 5 (previously did it with OL2). On my desktop everything looks fine , but on the mobile phone the map looks stretched (This is denver for example). This is the ...
3
votes
1answer
2k views

How do I pull tiles from a local pouchdb in Openlayers 3?

End goal is to be able to access a pouchdb of map tiles on phone off-line that has been synced from remote couchdb of map tiles. This will all be wrapped in Cordova. Using ol3, I currently can pull ...
13
votes
6answers
21k views

Equivalent of layer.redraw(true) in OpenLayers 3?

I have a geojson layer in my OL3 app which I want to redraw every 5 seconds (to show movement on map) . How do I do it ? Couldn't find the equivalent of Layer.redraw().
1
vote
1answer
1k views

How to load Geowebcache tiles into OpenLayers 3 ?

I have geotiff image that I want to show on a site locally (when there is no internet connection and browsing to localhost). I've seen that OL3 has XYZ layer but the format doesn't match the ...
2
votes
1answer
1k views

How to use symbolizer in openlayers3

How to use symbolizer in openlyers3? I need to display my line with double dashed. We have option in 2 like symbolizer : {strokeDashstyle:"dash"} Please help me..
7
votes
2answers
7k views

How to get layer type in OpenLayers 3?

I would like to iterate through all of the added layers in an ol.Map instance and only select the vector layers. So far I could get the individual layers with the a property of the resulting object of ...
1
vote
1answer
870 views

How can I change layers visibility while I zoom in GeoServer?

I want to change layers visibility while I zoom , here are my screenshots. where is my error ?
0
votes
1answer
422 views

Geoserver security and application security separation [closed]

I am using geoserver that publises WMS, WFS services to clients. I am using geoserver services in an OpenLayers application. My application will requiere username and password authentication. 1 - ...
5
votes
1answer
4k views

How to find markers in selected dragbox openlayers 3?

Here is a part of code, draw = new ol.interaction.DragBox({ /* dragbox interaction is active only if alt key is pressed */ condition: ol.events.condition.altKeyOnly, ...
1
vote
0answers
65 views

how to finds draw extents includes my point extent in openlayers3

i draw a DragBox on openlayers map and when i use drawend event, i can see thats extent. and i have some point on my map. my point is selected in EXTENT want to check whether with using openlayers3 ...