fix id collision in listmap demo

This commit is contained in:
rolux 2011-05-29 18:14:08 +02:00
parent 7b2a0cfef5
commit 940968a3e4

View file

@ -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) {