2011-05-23 19:38:52 +00:00
|
|
|
Ox.load('UI', {
|
|
|
|
debug: true,
|
|
|
|
theme: 'modern'
|
|
|
|
}, function() {
|
|
|
|
|
|
|
|
Ox.load('Geo', function() {
|
2011-03-05 08:53:34 +00:00
|
|
|
|
2011-03-05 15:34:16 +00:00
|
|
|
var listmap = new Ox.ListMap({
|
|
|
|
height: window.innerHeight,
|
2011-05-23 19:38:52 +00:00
|
|
|
places: Ox.map(Ox.COUNTRIES, function(place) {
|
|
|
|
return {
|
|
|
|
area: place.area,
|
2011-03-05 15:34:16 +00:00
|
|
|
countryCode: place.code,
|
|
|
|
editable: true,
|
|
|
|
flag: place.code,
|
|
|
|
geoname: place.name,
|
|
|
|
name: place.name,
|
2011-05-23 19:38:52 +00:00
|
|
|
type: 'Country',
|
2011-03-05 15:34:16 +00:00
|
|
|
lat: place.lat,
|
|
|
|
lng: place.lng,
|
|
|
|
south: place.south,
|
|
|
|
west: place.west,
|
|
|
|
north: place.north,
|
|
|
|
east: place.east
|
2011-05-23 19:38:52 +00:00
|
|
|
};
|
2011-03-05 15:34:16 +00:00
|
|
|
}),
|
|
|
|
width: window.innerWidth
|
|
|
|
})
|
2011-05-23 19:38:52 +00:00
|
|
|
.bindEvent({
|
|
|
|
geocode: function(event, data) {
|
|
|
|
Ox.print(event)
|
|
|
|
Ox.print(JSON.stringify(data))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.appendTo(Ox.UI.$body);
|
|
|
|
|
2011-03-05 15:34:16 +00:00
|
|
|
$(window).resize(function() {
|
|
|
|
Ox.print('RESIZE', window.innerHeight)
|
|
|
|
listmap.options({
|
|
|
|
height: window.innerHeight,
|
|
|
|
width: window.innerWidth
|
|
|
|
});
|
2011-03-05 08:53:34 +00:00
|
|
|
});
|
|
|
|
|
2011-03-05 15:34:16 +00:00
|
|
|
window.listmap = listmap;
|
2011-05-23 19:38:52 +00:00
|
|
|
|
2011-03-05 15:34:16 +00:00
|
|
|
});
|
2011-05-23 19:38:52 +00:00
|
|
|
|
2011-03-05 08:53:34 +00:00
|
|
|
});
|