openlayers 3 - Adding feature with duplicate ID to Vector source -


right now, if add 2 features same id vector source, seems second 1 discarded. there anyway force openlayers replace features existing ids?

i don't think built in, best option:

var features=layer.getsource().getfeatures(); for(var i=0;i<features.length;i++){       if(features[i].get('id')==id){          layer.getsource().removefeature(features[i]);          break;       }    } } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -