use > 8,000 places in demos/listmap2

This commit is contained in:
rolux 2011-05-29 15:33:10 +02:00
parent 0e835cc116
commit 6229b16a59
2 changed files with 168274 additions and 12 deletions

View file

@ -5,22 +5,22 @@ Ox.load('UI', {
Ox.load('Geo', function() { Ox.load('Geo', function() {
Ox.getJSON('json/cities100000.json', function(cities) { Ox.getJSON('json/cities50000.json', function(cities) {
var places = cities.map(function(city, i) { var places = cities.map(function(city, i) {
var countryCode = city.country_code == 'XK' ? 'RS-KO' : city.country_code, var countryCode = city.country_code == 'XK' ? 'RS-KO' : city.country_code,
marker = city.population > 20000000 ? {size: 24, color: [255, 0, 0]} : marker = city.population > 10000000 ? {size: 24, color: [255, 0, 0]} :
city.population > 10000000 ? {size: 22, color: [255, 32, 0]} : city.population > 5000000 ? {size: 22, color: [255, 32, 0]} :
city.population > 5000000 ? {size: 20, color: [255, 64, 0]} : city.population > 2000000 ? {size: 20, color: [255, 64, 0]} :
city.population > 2000000 ? {size: 18, color: [255, 96, 0]} : city.population > 1000000 ? {size: 18, color: [255, 96, 0]} :
city.population > 1000000 ? {size: 16, color: [255, 128, 0]} : city.population > 500000 ? {size: 16, color: [255, 128, 0]} :
city.population > 500000 ? {size: 14, color: [255, 160, 0]} : city.population > 200000 ? {size: 14, color: [255, 160, 0]} :
city.population > 200000 ? {size: 12, color: [255, 192, 0]} : city.population > 100000 ? {size: 12, color: [255, 192, 0]} :
city.population > 100000 ? {size: 10, color: [255, 224, 0]} : city.population > 50000 ? {size: 10, color: [255, 224, 0]} :
{size: 8, color: [255, 255, 0]}, {size: 8, color: [255, 255, 0]},
area = Math.sqrt(Math.max(city.population, 1) * 100), area = Math.max(city.population, 1) * 100,
latSize = area / Ox.EARTH_CIRCUMFERENCE * 360, latSize = Math.sqrt(area) / Ox.EARTH_CIRCUMFERENCE * 360,
lngSize = area * Ox.getDegreesPerMeter(city.latitude); lngSize = Math.sqrt(area) * Ox.getDegreesPerMeter(city.latitude);
return { return {
alternativeNames: [], alternativeNames: [],
area: area, area: area,

File diff suppressed because it is too large Load diff