fix place id generation in example
This commit is contained in:
parent
a0b1e0eab4
commit
d737817528
1 changed files with 2 additions and 2 deletions
|
|
@ -9,8 +9,8 @@ Ox.load(['UI', 'Geo'], function() {
|
|||
var places = $storage('places') || []
|
||||
var $map = Ox.MapEditor({
|
||||
addPlace: function(place, callback) {
|
||||
console.log("addPlace", place)
|
||||
place.id = Ox.encodeBase26(Ox.uid())
|
||||
place.id = Ox.encodeBase26((places.length ? Ox.max(places.map(p => Ox.decodeBase26(p.id))) : 0) + 1)
|
||||
console.log("addPlace", place.id, place)
|
||||
places.push(place)
|
||||
$storage("places", places)
|
||||
$map.options({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue