use > 8,000 places in demos/listmap2
This commit is contained in:
parent
0e835cc116
commit
6229b16a59
2 changed files with 168274 additions and 12 deletions
|
@ -5,22 +5,22 @@ Ox.load('UI', {
|
|||
|
||||
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 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]} :
|
||||
city.population > 5000000 ? {size: 20, color: [255, 64, 0]} :
|
||||
city.population > 2000000 ? {size: 18, color: [255, 96, 0]} :
|
||||
city.population > 1000000 ? {size: 16, color: [255, 128, 0]} :
|
||||
city.population > 500000 ? {size: 14, color: [255, 160, 0]} :
|
||||
city.population > 200000 ? {size: 12, color: [255, 192, 0]} :
|
||||
city.population > 100000 ? {size: 10, color: [255, 224, 0]} :
|
||||
marker = city.population > 10000000 ? {size: 24, color: [255, 0, 0]} :
|
||||
city.population > 5000000 ? {size: 22, color: [255, 32, 0]} :
|
||||
city.population > 2000000 ? {size: 20, color: [255, 64, 0]} :
|
||||
city.population > 1000000 ? {size: 18, color: [255, 96, 0]} :
|
||||
city.population > 500000 ? {size: 16, color: [255, 128, 0]} :
|
||||
city.population > 200000 ? {size: 14, color: [255, 160, 0]} :
|
||||
city.population > 100000 ? {size: 12, color: [255, 192, 0]} :
|
||||
city.population > 50000 ? {size: 10, color: [255, 224, 0]} :
|
||||
{size: 8, color: [255, 255, 0]},
|
||||
area = Math.sqrt(Math.max(city.population, 1) * 100),
|
||||
latSize = area / Ox.EARTH_CIRCUMFERENCE * 360,
|
||||
lngSize = area * Ox.getDegreesPerMeter(city.latitude);
|
||||
area = Math.max(city.population, 1) * 100,
|
||||
latSize = Math.sqrt(area) / Ox.EARTH_CIRCUMFERENCE * 360,
|
||||
lngSize = Math.sqrt(area) * Ox.getDegreesPerMeter(city.latitude);
|
||||
return {
|
||||
alternativeNames: [],
|
||||
area: area,
|
||||
|
|
168262
demos/listmap2/json/cities50000.json
Normal file
168262
demos/listmap2/json/cities50000.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue