forked from 0x2620/oxjs
improving listmap
This commit is contained in:
parent
c86c7d598d
commit
5915acd72c
12 changed files with 152 additions and 39 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue