2011-03-05 08:53:34 +00:00
|
|
|
$(function() {
|
2011-03-05 15:34:16 +00:00
|
|
|
$.getJSON('../map/json/countries.json', function(data) {
|
2011-03-05 08:53:34 +00:00
|
|
|
|
2011-03-05 15:34:16 +00:00
|
|
|
Ox.theme('modern');
|
|
|
|
var listmap = new Ox.ListMap({
|
|
|
|
height: window.innerHeight,
|
|
|
|
places: data.map(function(place) {
|
|
|
|
return Ox.extend({
|
|
|
|
countryCode: place.code,
|
|
|
|
editable: true,
|
|
|
|
flag: place.code,
|
|
|
|
geoname: place.name,
|
|
|
|
name: place.name,
|
|
|
|
size: place.size,
|
|
|
|
type: 'country',
|
|
|
|
lat: place.lat,
|
|
|
|
lng: place.lng,
|
|
|
|
south: place.south,
|
|
|
|
west: place.west,
|
|
|
|
north: place.north,
|
|
|
|
east: place.east
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
width: window.innerWidth
|
|
|
|
})
|
|
|
|
.appendTo($('body'));
|
|
|
|
$(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-03-05 08:53:34 +00:00
|
|
|
});
|