fix id collision in listmap demo
This commit is contained in:
parent
7b2a0cfef5
commit
940968a3e4
1 changed files with 4 additions and 3 deletions
|
@ -31,7 +31,7 @@ Ox.load('Geo', function() {
|
||||||
flag: countryCode,
|
flag: countryCode,
|
||||||
geoname: city.name + ', ' + Ox.getCountryByCode(countryCode).name,
|
geoname: city.name + ', ' + Ox.getCountryByCode(countryCode).name,
|
||||||
geonameSort: getGeonameSort(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,
|
markerColor: marker.color,
|
||||||
markerSize: marker.size,
|
markerSize: marker.size,
|
||||||
name: city.name,
|
name: city.name,
|
||||||
|
@ -138,9 +138,10 @@ Ox.load('Geo', function() {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
addplace: function(data) {
|
addplace: function(data) {
|
||||||
Ox.print('addplace', data);
|
Ox.print('addplace', getGeonameSort(data.place.geoname));
|
||||||
places.push(Ox.extend(data.place, {
|
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) {
|
geocode: function(event, data) {
|
||||||
|
|
Loading…
Reference in a new issue