1
0
Fork 0
forked from 0x2620/oxjs

improved geodata and tools

This commit is contained in:
rolux 2011-05-23 21:38:52 +02:00
commit 912f2121a4
47 changed files with 682294 additions and 3535 deletions

View file

@ -1,29 +1,39 @@
$(function() {
$.getJSON('../map/json/countries.json', function(data) {
Ox.load('UI', {
debug: true,
theme: 'modern'
}, function() {
Ox.load('Geo', function() {
Ox.theme('modern');
var listmap = new Ox.ListMap({
height: window.innerHeight,
places: data.map(function(place) {
return Ox.extend({
places: Ox.map(Ox.COUNTRIES, function(place) {
return {
area: place.area,
countryCode: place.code,
editable: true,
flag: place.code,
geoname: place.name,
name: place.name,
size: place.size,
type: 'country',
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'));
.bindEvent({
geocode: function(event, data) {
Ox.print(event)
Ox.print(JSON.stringify(data))
}
})
.appendTo(Ox.UI.$body);
$(window).resize(function() {
Ox.print('RESIZE', window.innerHeight)
listmap.options({
@ -33,5 +43,7 @@ $(function() {
});
window.listmap = listmap;
});
});