From 940968a3e42b24f9469a3f9bab58ec7078bab633 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 29 May 2011 18:14:08 +0200 Subject: [PATCH] fix id collision in listmap demo --- demos/listmap2/js/listmap.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demos/listmap2/js/listmap.js b/demos/listmap2/js/listmap.js index 9ab5e4ab..4645e73b 100644 --- a/demos/listmap2/js/listmap.js +++ b/demos/listmap2/js/listmap.js @@ -31,7 +31,7 @@ Ox.load('Geo', function() { flag: countryCode, geoname: city.name + ', ' + Ox.getCountryByCode(countryCode).name, geonameSort: getGeonameSort(city.name + ', ' + Ox.getCountryByCode(countryCode).name), - id: Ox.encodeBase32(i), + id: Ox.encodeBase32(Ox.uid()), markerColor: marker.color, markerSize: marker.size, name: city.name, @@ -138,9 +138,10 @@ Ox.load('Geo', function() { }) .bindEvent({ addplace: function(data) { - Ox.print('addplace', data); + Ox.print('addplace', getGeonameSort(data.place.geoname)); places.push(Ox.extend(data.place, { - geonameSort: getGeonameSort(data.place.geoname) + geonameSort: getGeonameSort(data.place.geoname), + id: Ox.encodeBase32(Ox.uid()) })); }, geocode: function(event, data) {