update cities example

This commit is contained in:
rolux 2012-07-02 13:36:37 +02:00
parent 499f16d9ee
commit d95d13f13d

View file

@ -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'