Anders Finn Jørgensen
  • Member for 7 years, 10 months
  • Last seen more than a week ago
Line dash not working OL3 (Openlayers 3)
Accepted answer
10 votes

Try this: var iconStyle_line = new ol.style.Style({// My style definition fill: new ol.style.Fill({ color: 'rgba(221, 99, 0, 0.5)' }), stroke: new ol.style.Stroke({ ...

View answer
Retrieve attributes from a GeoJSON feature in openlayers 3
Accepted answer
5 votes

Have you tried: var id = feature.get('id'); As far as I know var id = feature.getId(); gives you an internal OL3 feature id, not the JSON id.

View answer
Select tolerance or snapping in OpenLayers 3?
Accepted answer
4 votes

I faced the same problem. I used another approach: First add a feature overlay to your selected feature: var avlFeatureOverlay = new ol.FeatureOverlay({ style: function(feature, resolution) { ...

View answer
Writing style function in OpenLayers?
3 votes

Try this change to your layer definition: var wellsLayer = new ol.layer.Vector({ source: new ol.source.GeoJSON({ projection: 'EPSG:3857', url: 'data/WELLS.geojson' }), style: ...

View answer
Setting fill style in polygon in OpenLayers?
Accepted answer
3 votes

You must define a ol.styleStyle object, which again consist of an ol.style.Fill and an ol.style.Stroke object. In the OL3 documentation you must unclick the "Stable only" field in the upper right ...

View answer
IE8 problem with proj4.js
2 votes

I have realised that proj4js doesn't work in IE below version 9

View answer
Layer visibility using maxscale minscale not working
2 votes

Visit maxScale or minScale don't work in vector (from WFS) layer for a similiar question. maxScale:50000, minScale:25000 should be changed to: maxScale: 1/25000, minScale: 1/50000

View answer
How to get an existing feature's rotation angle in OpenLayers 3
Accepted answer
1 votes

I don't if the reason that you couldn't find anything in the documentation, was because you didn't un-clicked the "Stable only" in the upper right corner of the API documentation. Try this: var ...

View answer
How can I zoom to featureset geometry item
1 votes

A late answer :-) Every feature has an ol.geometry object, and an ol.geometry has an ol.Extent object, which is an array of numbers representing an extent: [minx, miny, maxx, maxy]. You can use this ...

View answer
Using UTM in leaflet efficiently?
1 votes

You can use the transform set up in proj4leaflet. I expect that you have already crated a CRS in your map.options. var my_crs = map.options.crs; // get the CRS var my_proj = my_crs.projection; // get ...

View answer
UTM Grid as a Layer with Leaflet
1 votes

I can tell you the answer for the second question: How to show UTM-coordinates in the lower right corner. In leaflet the internal coordinate system is always longitude/latitude as far as I know, and ...

View answer
Sending and receiving gis data to map
1 votes

You can use standard .NET and JS for communication between openlayers and the server. To get the shape. On the serverside: [Webmethod, Scriptmethod] public sting GetShape(string id) { SqlCommand ...

View answer
Setting OpenLayers 3 Layer Visibility
0 votes

Below is a link to an add-on to OpenLayers 3, with an ol2 style layer switcher. https://github.com/walkermatt/ol3-layerswitcher

View answer
maxScale or minScale don't work in vector (from WFS) layer
0 votes

After you have created the map you can use this function to get the scales at different zoomlevels: map.events.register('zoomend', this, function (event) { var zLevel = map.getZoom(); var sc = ...

View answer