I have a GEOJson such as
{
"type": "Feature",
"geometry": {
"type": "MultiPoint",
"coordinates": [
[
-123.77252789,
44.37857221
],
[
-123.77317087,
44.37864694
],
[
-123.77383407,
44.37875853
],
[
-123.7744676,
44.37886305
]
]
},
"properties": {
"time": [
1369786338000,
1369786340000,
1369786342000,
1369786344000
],
"Temp":[70F,60F,72F,80F],
"Title": "Car1"
}
}
Using Leaflet Playback, I am able to make the marker moving, but I want each marker has there own popup showing Time and Temp while it is moving. I have tried to do something like :
var playbackOptions = {
marker: function (featureData) {
return {
getPopup: function (feature) {
return "Temp: " + feature.properties.Temp + "at " + feature.properties.time;
}
};
}
};
var playback = new L.Playback(map, demoTracks, null, playbackOptions);
but it keeps giving me the all the time and temp array for each marker instead of different time and temp for each marker. I am wondering how can I make each popup shows its information.