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) {
|
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"
|
<a href="http://download.geonames.org/export/dump"
|
||||||
target="_blank">geonames.org</a>. It's an array of 10,000 city objects,
|
target="_blank">geonames.org</a>. It's an array of 10,000 city objects,
|
||||||
each of which has the following properties:
|
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.)
|
will cause a deselect, which is what we want here.)
|
||||||
*/
|
*/
|
||||||
select: function(data) {
|
select: function(data) {
|
||||||
$list.options({
|
$list.options({selected: data.id ? [data.id] : []});
|
||||||
selected: data.place ? [data.place.id] : []
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
/*
|
/*
|
||||||
|
@ -569,7 +567,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
||||||
elements: [
|
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
|
`resizeend` events when they are resized. Here, we
|
||||||
make sure that the find element shrinks accordingly.
|
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
|
notification when the map size changes. The map's
|
||||||
`resizeMap` method takes care of that.
|
`resizeMap` method takes care of that.
|
||||||
*/
|
*/
|
||||||
element: $map.bindEvent({
|
element: $map.bindEvent({resizeend: $map.resizeMap})
|
||||||
resizeend: $map.resizeMap
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
|
|
Loading…
Reference in a new issue