diff --git a/examples/maps/map_editor/js/example.js b/examples/maps/map_editor/js/example.js index e9e9e10d..317c05b3 100644 --- a/examples/maps/map_editor/js/example.js +++ b/examples/maps/map_editor/js/example.js @@ -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({