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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -