This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const path = require('path') | |
function resolve(dir) { | |
return path.join(__dirname, '.', dir) | |
} | |
module.exports = { | |
context : path.resolve(__dirname, './'), | |
resolve : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iconstyle: function(feature, resolution) { | |
var style = new ol.style.Style({ | |
fill : new ol.style.Fill({ | |
color : 'rgba(241,242,236,0.8)', | |
}), | |
stroke : new ol.style.Stroke({ | |
color : 'red', | |
width : 2 | |
}), | |
image : new ol.style.Icon(({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
veclayer.getSource().getFeatures().forEach(function(item){ | |
if (showFeature) { | |
item.setStyle(style); | |
} else { | |
item.setStyle(null); | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map.once('postrender', function() { | |
map.once('moveend', function(evt) { | |
zoomend(evt) | |
}) | |
}) | |
function zoomend(evt) { | |
const zoom = evt.map.getView().getZoom() | |
} |
NewerOlder