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
2 votes
0 answers
97 views

building forms dynamically

I found this previous post How to edit feature attributes with openlayers? and wanted to make forms dynamically. I tried making a variable and using a getProperties function but that didn't make ...
GIS87's user avatar
  • 336
1 vote
1 answer
2k views

How to create openlayers3 Popup with OpenLayers.Popup.FramedCloud UI design

I want the look of popup in OpenLayers.Popup.FramedCloud to my openlayers3 popup , that makes my highlited feature more clearly and the information is shown in the popup as table form data.
user28536's user avatar
  • 421
1 vote
1 answer
40 views

Creating p:commandlink in Popups in OpenLayers?

How do I create p:commandlink in Popups can be called to a bean method like actionListener="#{offLineMapsTestBean.fetchInstList(variable)}"? I tried with this code: map.on('click', function(evt) { ...
Naresh babu's user avatar
3 votes
1 answer
2k views

OpenLayers3 how to limits the drag range of the map

I use OpenLayers3 to display a tile map, but there is a blank area on the top and bottom of the map, how to limit the drag range so that it does not display the blank area.
王炳乾's user avatar
2 votes
0 answers
441 views

Apply SLD to WMS Layer by OpenLayers 3 [closed]

I want to change SLD of WMS layer. I think everything is well but SLD does not apply to layer. Here is the code: var SLD = '<?xml version="1.0" encoding="UTF-8"?>'+ '<StyledLayerDescriptor ...
SaamTehraani's user avatar
3 votes
1 answer
4k views

Zoom-in to by coordinates of location in OpenLayers 3

I'm trying to zoom in to location by coordinates after click on one item from autocomplete list. $("#template-custom").easyAutocomplete({ url: "Toponimos-red.json", getValue: ...
Montse's user avatar
  • 71
1 vote
0 answers
970 views

504 Gateway Timeout only with 1 kind of mapserver request (TileWMS in OpenLayers 3) [closed]

I'm very new to GIS. With MapServer, I'm calling four kinds of data, but only with this one am I having some HTTP 504 error message randomly. The other three never have that error, but only with this ...
pmiranda's user avatar
  • 223
1 vote
0 answers
254 views

Calculate BBOX by latitude and longitude [closed]

How openlayers3 generate BBOX by latitude and longitude. I want to generate BBOX for GetFeatureInfo request by latitude and longitude in C#.
danial tehrani's user avatar
1 vote
0 answers
513 views

OpenLayers 3 editing properties in application through form

I have a web page built with the QGIS webappbuilder by Boundless and the WFS-T widget. Right now, the comments say that it only currently supports geometry updates. I wanted to know if it would be ...
GIS87's user avatar
  • 336
1 vote
0 answers
131 views

Clipping single tile layer with georeferenced polygon

I have very similar question to this one. The difference is I would like to clip only one layer that is not a base layer. I like the solution purposed in mentioned question, but unfortunately it clips ...
Jiri Kozel's user avatar
0 votes
1 answer
1k views

How to create GeoJSON constructor in openlayers 3?

I wan't to add several GeoJSON-overlay layers from a Postgis-database to an Openlayers 3 map. I want to define the source as well as the style, the layer is rendered in ol 3. Actually I'm using a ...
geom's user avatar
  • 1,286
1 vote
1 answer
653 views

Pass map to function in OpenLayers3

The code snippet below creates a map variable locally inside an init() function. I am getting errors such as this.map.getLayers and map.getLayers is not a function or cannot read property getLayers ...
jgm_GIS's user avatar
  • 640
1 vote
2 answers
264 views

Weight style on OL3

I'm approaching to OL3 and I need to see different size for each element of this geojson file: http://www.acuriousanimal.com/thebookofopenlayers3/data/world_cities.json by using his "POP_RANK" value. ...
freecma80's user avatar
  • 103
2 votes
2 answers
3k views

OpenLayers 3 - different style/marker for each point on a MultiPoint feature

I have a MultiPoint feature with the following GeoJSON: { "type": "Feature", "geometry": { "type": "MultiPoint", "coordinates": [ [ -123, ...
BiJ's user avatar
  • 133
1 vote
1 answer
1k views

Propagating mouse wheel event in OpenLayers 3 overlays

I'm implementing a mapping application with OpenLayers 3. When there are too many overlays on the map (say you had to add too many location pins - see picture below), certain parts of the view-port ...
Ulas's user avatar
  • 393
1 vote
1 answer
951 views

OpenLayers Vector layer projection

I use OpenLayers to display an OpenStreetMap map and on top of that I want to add a vector layer with features. But it seems that I have a problem with the projection of the vector layer or the ...
Benedikt's user avatar
1 vote
1 answer
1k views

Openlayers 3 reloading the map after updating features

I'm trying to add and move features on my map. These updates come through a form, so after the data has been updated I want to reload the map to see the changes. I've tried the old map.updateSize(); ...
Firenter's user avatar
  • 153
7 votes
2 answers
12k views

How to style a LineString feature to be red colored?

I try to add Features with LineString geometries in different colors to a ol.source.Vector. I tried to do this with the following code: var myFeature = new ol.Feature({ geometry : new ol.geom....
burghard's user avatar
5 votes
2 answers
3k views

Adding hyperlinks to pop-up data in qgis2web?

Does anyone know if it is possible to add hyperlinks to image fields etc. in the pop-up windows of Qgis2web? I've had a look in the layers javascript file, but the image source path isn't rendered ...
Andrew Abbott's user avatar
1 vote
0 answers
187 views

Adding tiles generated using gdal2tiles to OL3

I had generated tiles using gdal2tiles and had put up all my tile images here http://localhost/maps/. The XML generated from gdal2tiles <?xml version="1.0" encoding="utf-8"?> <TileMap ...
User123's user avatar
  • 2,986
1 vote
0 answers
935 views

OpenLayers 3 / LayerSwitcher: how to link each layer with its legend?

I can manage my layers by the LayerSwitcher panel. The legend is created by HTML, and I post it on the site by: Document.getElementById ("legend") style.display = "block"; What I want: When I check ...
Nora 27's user avatar
  • 81
1 vote
0 answers
227 views

Can't see the problem with this GeoJSON

I'm almost crazy with this. Why can this work: var featureStyle = new ol.style.Style({ stroke: new ol.style.Stroke({ color: 'green', width: 3 }) }); ...
Magno C's user avatar
  • 2,140
1 vote
0 answers
1k views

Using ArcGIS Server WMS with OpenLayers 3?

I have installed ArcGIS Server on my server, and have published a service called "background2". "background2" contains two layers: "passage3" (line layer) and "parcel_utm_rrr" (polygon). I have ...
user3313744's user avatar
3 votes
1 answer
280 views

Rendering polygons outside latitudes [85,-85] in OpenLayers 3

I have some polygons I am drawing on an OpenLayers 3 map. Some of these are above latitude 85, and used to be rendered fine with OpenLayers 3 v3.15.1: https://jsfiddle.net/adlerhn/98mn4w5z/ However,...
Jose Gómez's user avatar
1 vote
0 answers
1k views

Display different layer based on zoom level with OpenLayers 3

I am new to OpenLayers and I was making a demo application which displays administrative areas based on zoom level. I am getting an error Cannot read property 'register' of undefined in map.events....
Madan's user avatar
  • 11
2 votes
1 answer
2k views

OpenLayers 3: Center ScaleLine in target DIV

I am displaying a scale in a DIV: I would like to display the scale in the center of that DIV. There does not seem to be an option for that so I am trying to use CSS. The following, however, does ...
BritishSteel's user avatar
  • 6,647
1 vote
1 answer
839 views

Openlayers 3 - how to override handleUpEvent in PinchZoom interaction?

In Openlayers 3 I've been unable to get my attempts at overriding the ol.interation.PinchZoom's handleUpEvent to work. I've tried a few different ways, but but below is a basic example of what I've ...
Son of a Beach's user avatar
1 vote
1 answer
2k views

WFS layer not showing in openlayers

I am trying to show layer from Geoserver as WFS with OpenLayers, but when I open http://localhost:8080/geoserver/www/Geoinformatika2/index.html, it gives me only OSM map as a base, but there is no ...
Zoran Kokeza's user avatar
1 vote
0 answers
606 views

How to generate all the WMS layers getGetFeatureInfoUrl details into iframe?

With this code I am able to generate only the last layer GetFeatureInfo response only, I am able to display all the layer URLs but how am I able to show all the layers details in the iframes (number ...
user28536's user avatar
  • 421
2 votes
1 answer
2k views

Error Adding GeoJSON in Openlayers 3

I try to add GeoJSON layer to my openlayers 3 by the following code. new ol.layer.Vector({ title: 'added Layer', source: new ol.source.GeoJSON({ ...
Senthil S's user avatar
  • 125
2 votes
1 answer
353 views

Splitting data from GeoServer layer into multiple layers with OpenLayers

I have a GeoServer layer that contains all buildings (houses, schools, library, museums) with their locations, data is stored in PostGIS database, and now creating a geoportal for showing that online ...
Miroslav Vujasinovic's user avatar
4 votes
1 answer
369 views

Problem with showing WFS layer with OpenLayers

I'm using OpenLayers and GeoServer in combination with Apache for creating GIS-based WEB application. I have created layers and styled them in GeoServer, but when I try to load those layers with ...
Zoran Kokeza's user avatar
-1 votes
1 answer
439 views

OpenLayers 3: get EPSG code of defined vector

The following code adds a GeoJSON from a string to my map. As long as the coordinate system of the added layer and the one of the map coincide this works fine. var s = '{"type": "FeatureCollection","...
BritishSteel's user avatar
  • 6,647
3 votes
2 answers
3k views

OpenLayers3 + Cesium add 3D Models

I created an Openlayers3 Bing map and then I converted to 3D view with Cesium. Is there a way to add a 3D Model on my 3D map?
Apostolis Marios Trampas's user avatar
3 votes
3 answers
9k views

OpenLayers 3 Style - text label with size not depending on scale

I try to label polygons from a WFS-Source with an attribute. This works fine, but my problem is that the size of this label is scale depending. It has the same size on every scale. But i want it to ...
Astrid's user avatar
  • 139
0 votes
2 answers
5k views

OpenLayers ECQL BBOX and INTERSECTS: Can I set SRS name?

I am using GeoServer and am trying to understand one problem: Using this statement returns successfully the polygon intersecting with my BBOX. The layer is EPSG:2193 http://myserver/fwsys/wms?service=...
Uwe's user avatar
  • 111
0 votes
1 answer
512 views

Openlayers3 - reproject a point from EPSG:4326 to EPSG:2193

I need to reproject a point from EPSG:4326 to EPSG:2193.I tried to achieve that doing the following: Updated: Here is the little Angular2 service that I wrote: It takes a coordinate and and tries to ...
Uwe's user avatar
  • 111
1 vote
1 answer
1k views

OpenLayers 3: Digitizing holes (donut polygons)

I am working on an OpenLayers 3 digitizing tool, which works very fine at this point. I would like to add a functionality that lets me add holes to existing polygons. I know this is doable in ...
BritishSteel's user avatar
  • 6,647
2 votes
1 answer
418 views

ol.interaction.Draw deleteCondition not working with Point feature

I'm not able to delete a point no matter which condition I write in deleteCondition. It works with LineString and Polygon but not with Point features. My version of OpenLayers is 3.19.1 Here is an ...
Shimrod's user avatar
  • 171
3 votes
0 answers
1k views

Heatmaps with local maxima, weight, API functionalities

I am looking for a heatmap vizualization on a map, which shows: local maxima: that means that you always see some "red spots" regardless the zoom. See the picture below. enables to set a weight to ...
Adam's user avatar
  • 31
1 vote
3 answers
1k views

find XY values of Great Britain and Northen Ireland

I'm using Openlayers 3 to show the map of Great Britain and Northern Ireland. For that I need to provide the extent values of GB and Northern Ireland. I tried in google and couldn't find a proper ...
Lalinda Sampath's user avatar
1 vote
1 answer
620 views

OpenLayers 3, drag to scroll page

I have a website where an OpenLayers 3 map fills part of a page. The site is intended for mobile viewing, and my problem is that I'm not able to scroll the page by pushing and dragging on the map. I'...
Øyvind Nordsted Wedøe's user avatar
2 votes
1 answer
194 views

How to get the previously added layer information for getGetFeatureInfoUrl?

I am able to fetch the getGetFeatureInfoUrl for the currently selected layer, is it possible to fetch the last added layer FeatureInfo on the map? My code currently is: <!DOCTYPE html> <...
user28536's user avatar
  • 421
1 vote
1 answer
1k views

How to create a custom Tile-Map with its own extent in OpenLayers 3?

I am a newbie to Openlayers and currently dealing with a problem in setting up a custom tile-map. I have a base tile at zoom = 0 as png which has an extent of 56 by 56 kilometres and a resolution of ...
F. Schoenian's user avatar
5 votes
1 answer
6k views

OpenLayers 3: Change drawing style, but keep style of previously drawn features

I created a vector and a drawing interaction: // Create feature collection and vector var featureCollection = new ol.Collection(); var vectorSource = new ol.source.Vector({ features: ...
BritishSteel's user avatar
  • 6,647
1 vote
1 answer
917 views

OpenLayers3 - Add a source.vector from String, not url (for Layers)

The current way to add layer from KML file is: var urlToKml = someUrl; var vector = new ol.layer.Vector({ source: new ol.source.Vector({ url: urlToKml, ...
F3L1X79's user avatar
  • 147
1 vote
1 answer
958 views

OpenLayers 3: keep sketch after measuring

I followed the official OpenLayers 3 Measure example to implement measuring in an application. It works fine, but when I finish my sketch by double-clicking it dissappears. In the following ...
BritishSteel's user avatar
  • 6,647
0 votes
1 answer
611 views

Changing opacity of map outside feature in OpenLayers 3?

I want to change opacity of map outside feature (which is closed polygon) in OpenLayers 3. Is it possible?
manza's user avatar
  • 103
10 votes
1 answer
3k views

OpenLayers 3: getting rid of 'blue dot' selection icon

I am working on a digitizing tool. There are four buttons as of now: add point add line add polygon remove geometry The user always starts by first drawing some geometries. I am using the Draw ...
BritishSteel's user avatar
  • 6,647
1 vote
0 answers
271 views

CORS issue with OpenLayers3 getGetFeatureInfoUrl [duplicate]

In an Angular directive I'm trying to create an Information tool with OpenLayers 3 using the getGetFeatureInfoUrl method. I've set up a function which is using $http to return the info as JSON: //...
Robert's user avatar
  • 125

1
47 48
49
50 51
73