Store the feature's commonly used id
To not clobber the feature's attributes, this is a separate member property.
This commit is contained in:
@@ -48,7 +48,7 @@ map.on(['click', 'mousemove'], function(evt) {
|
||||
success: function(features) {
|
||||
var info = [];
|
||||
for (var i = 0, ii = features.length; i < ii; ++i) {
|
||||
info.push(features[i].get('name'));
|
||||
info.push(features[i].getFeatureId() + ': ' + features[i].get('name'));
|
||||
}
|
||||
document.getElementById('info').innerHTML = info.join(', ') || ' ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user