Commits

Ralph Bean  committed 7799059 Merge

Merge pull request #1 from gregjurman/master

Added properties_callback to PollingPolyMap

  • Participants
  • Parent commits a0ee985, d5f6c5e

Comments (0)

Files changed (2)

File tw2/polymaps/static/custom/js/tw2.polymaps.js

         }
 }
 
-function setupPolymapPollingData(map, data_url, interval, timeout)
+function setupPolymapPollingData(map, data_url, interval, timeout, properties_callback)
 {
         if ( data_url ) {
                 var layer = po.geoJson().url(data_url)
+                if ( properties_callback ) {
+                        layer = properties_callback(layer);
+                }
                 map.add(layer);
 
                 setTimeout( function () {

File tw2/polymaps/templates/polymap.mak

 	map = setupPolymapPollingData(map,
 				${w.j('data_url')},
 				${w.j('interval')},
-				${w.j('layer_lifetime')}
+				${w.j('layer_lifetime')},
+				${w.properties_callback}
 	);
 	% else:
 	map = setupPolymapData(map,