1
0
Fork 0
forked from 0x2620/oxjs

improving listmap

This commit is contained in:
rolux 2011-05-22 14:39:57 +02:00
commit 5915acd72c
12 changed files with 152 additions and 39 deletions

View file

@ -9,7 +9,7 @@ Ox.load('Geo', function() {
var listmap = new Ox.ListMap({
height: window.innerHeight,
places: data.map(function(city) {
places: data.map(function(city, id) {
var countryCode = city.country_code == 'XK' ? 'RS-KO' : city.country_code,
marker = city.population > 20000000 ? {size: 24, color: [255, 0, 0]} :
city.population > 10000000 ? {size: 22, color: [255, 32, 0]} :
@ -28,6 +28,7 @@ Ox.load('Geo', function() {
editable: true,
flag: countryCode,
geoname: city.name + ', ' + Ox.getCountryByCode(countryCode).name,
id: id,
markerColor: marker.color,
markerSize: marker.size,
name: city.name,