Mysql
 SQL >> Database >  >> RDS >> Mysql

Identificare marker Leaflet

Aggiungi un attributo personalizzato al marker e leggilo nell’evento click.

var marker = L.marker([36.83711, -2.464459], {
  myCustomId: "abc123"
});

marker.on('click', function(e) {
  alert(this.options.myCustomId);
});