Variable renaming in examples

This commit is contained in:
Éric Lemoine
2014-02-04 16:41:40 +01:00
parent 169bdbc16f
commit ff11ed2e1e
2 changed files with 6 additions and 6 deletions

View File

@@ -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;
} }

View File

@@ -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;
} }