Variable renaming in examples
This commit is contained in:
@@ -56,7 +56,7 @@ var highlightStyleArray = [new ol.style.Style({
|
|||||||
})
|
})
|
||||||
})];
|
})];
|
||||||
|
|
||||||
var featuresOverlay = new ol.FeatureOverlay({
|
var featureOverlay = new ol.FeatureOverlay({
|
||||||
map: map,
|
map: map,
|
||||||
styleFunction: function(feature, resolution) {
|
styleFunction: function(feature, resolution) {
|
||||||
return highlightStyleArray;
|
return highlightStyleArray;
|
||||||
@@ -79,10 +79,10 @@ var displayFeatureInfo = function(pixel) {
|
|||||||
|
|
||||||
if (feature !== highlight) {
|
if (feature !== highlight) {
|
||||||
if (highlight) {
|
if (highlight) {
|
||||||
featuresOverlay.removeFeature(highlight);
|
featureOverlay.removeFeature(highlight);
|
||||||
}
|
}
|
||||||
if (feature) {
|
if (feature) {
|
||||||
featuresOverlay.addFeature(feature);
|
featureOverlay.addFeature(feature);
|
||||||
}
|
}
|
||||||
highlight = feature;
|
highlight = feature;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ var map = new ol.Map({
|
|||||||
|
|
||||||
var highlightStyleCache = {};
|
var highlightStyleCache = {};
|
||||||
|
|
||||||
var featuresOverlay = new ol.FeatureOverlay({
|
var featureOverlay = new ol.FeatureOverlay({
|
||||||
map: map,
|
map: map,
|
||||||
styleFunction: function(feature, resolution) {
|
styleFunction: function(feature, resolution) {
|
||||||
var text = resolution < 5000 ? feature.get('name') : '';
|
var text = resolution < 5000 ? feature.get('name') : '';
|
||||||
@@ -108,10 +108,10 @@ var displayFeatureInfo = function(pixel) {
|
|||||||
|
|
||||||
if (feature !== highlight) {
|
if (feature !== highlight) {
|
||||||
if (highlight) {
|
if (highlight) {
|
||||||
featuresOverlay.removeFeature(highlight);
|
featureOverlay.removeFeature(highlight);
|
||||||
}
|
}
|
||||||
if (feature) {
|
if (feature) {
|
||||||
featuresOverlay.addFeature(feature);
|
featureOverlay.addFeature(feature);
|
||||||
}
|
}
|
||||||
highlight = feature;
|
highlight = feature;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user