update cities example
This commit is contained in:
parent
499f16d9ee
commit
d95d13f13d
1 changed files with 4 additions and 8 deletions
|
@ -15,7 +15,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
Ox.getJSON('json/cities.json', function(cities) {
|
||||
|
||||
/*
|
||||
The JSON data originally comes from
|
||||
The data originally comes from
|
||||
<a href="http://download.geonames.org/export/dump"
|
||||
target="_blank">geonames.org</a>. It's an array of 10,000 city objects,
|
||||
each of which has the following properties:
|
||||
|
@ -546,9 +546,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
will cause a deselect, which is what we want here.)
|
||||
*/
|
||||
select: function(data) {
|
||||
$list.options({
|
||||
selected: data.place ? [data.place.id] : []
|
||||
});
|
||||
$list.options({selected: data.id ? [data.id] : []});
|
||||
}
|
||||
}),
|
||||
/*
|
||||
|
@ -569,7 +567,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
elements: [
|
||||
{
|
||||
/*
|
||||
Elements of a split panel trigger `resize` and
|
||||
Elements of a split panel fire `resize` and
|
||||
`resizeend` events when they are resized. Here, we
|
||||
make sure that the find element shrinks accordingly.
|
||||
*/
|
||||
|
@ -600,9 +598,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
notification when the map size changes. The map's
|
||||
`resizeMap` method takes care of that.
|
||||
*/
|
||||
element: $map.bindEvent({
|
||||
resizeend: $map.resizeMap
|
||||
})
|
||||
element: $map.bindEvent({resizeend: $map.resizeMap})
|
||||
}
|
||||
],
|
||||
orientation: 'horizontal'
|
||||
|
|
Loading…
Reference in a new issue