javascript - Leaflet popup on each marker using Leaflet playback -
i have geojson such
{ "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, able make marker moving, want each marker has there own popup showing time , temp while moving. have tried :
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 keeps giving me time , temp array each marker instead of different time , temp each marker. wondering how can make each popup shows information.
Comments
Post a Comment