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

@ -3,12 +3,9 @@
<head>
<title>ox.js listmap demo</title
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script src="../../build/js/jquery-1.5.js"></script>
<script src="../../build/js/ox.js"></script>
<script src="../../build/js/ox.map.js"></script>
<script src="../../build/js/ox.ui.js"></script>
<script src="js/listmap.js"></script>
<script type="text/javascript" src="../../build/Ox.js"></script>
<script type="text/javascript" src="../../source/_/ox.map.js"></script>
<script type="text/javascript" src="js/listmap.js"></script>
</head>
<body>
</body>

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;
});
});