2011-11-24 18:38:10 +00:00
|
|
|
Ox.load({UI: {}, Geo: {}}, function() {
|
2011-05-23 19:38:52 +00:00
|
|
|
|
2011-11-24 18:38:10 +00:00
|
|
|
$listmap = new Ox.ListMap({
|
|
|
|
height: window.innerHeight,
|
|
|
|
places: Ox.COUNTRIES.map(function(place) {
|
|
|
|
return {
|
|
|
|
alternativeNames: Ox.compact([place.google, place.imdb, place.wikipedia]),
|
|
|
|
area: place.area,
|
|
|
|
countryCode: place.code,
|
|
|
|
editable: true,
|
|
|
|
flag: place.code,
|
|
|
|
geoname: place.name,
|
|
|
|
id: place.code,
|
2012-03-25 21:23:03 +00:00
|
|
|
markerColor: Ox.getGeoColor(place.region),
|
2011-11-24 18:38:10 +00:00
|
|
|
name: place.name,
|
|
|
|
type: 'country',
|
|
|
|
lat: place.lat,
|
|
|
|
lng: place.lng,
|
|
|
|
south: place.south,
|
|
|
|
west: place.west,
|
|
|
|
north: place.north,
|
|
|
|
east: place.east
|
|
|
|
};
|
|
|
|
}),
|
|
|
|
width: window.innerWidth
|
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
geocode: function(event, data) {
|
|
|
|
Ox.print(event)
|
|
|
|
Ox.print(JSON.stringify(data))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.appendTo(Ox.UI.$body);
|
2011-05-23 19:38:52 +00:00
|
|
|
|
2011-11-24 18:38:10 +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
|
|
|
});
|
2011-11-24 18:38:10 +00:00
|
|
|
|
|
|
|
window.$listmap = $listmap;
|
2011-05-23 19:38:52 +00:00
|
|
|
|
2011-03-05 08:53:34 +00:00
|
|
|
});
|