37 lines
No EOL
1.2 KiB
JavaScript
37 lines
No EOL
1.2 KiB
JavaScript
$(function() {
|
|
$.getJSON('../map/json/countries.json', function(data) {
|
|
|
|
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
|
|
});
|
|
});
|
|
|
|
window.listmap = listmap;
|
|
});
|
|
}); |