1
0
Fork 0
forked from 0x2620/oxjs

update cities example; fix zero population entries; don't include city data twice

This commit is contained in:
rolux 2012-06-20 16:37:46 +02:00
commit 770c0c9653
5 changed files with 4785 additions and 137806 deletions

View file

@ -172,20 +172,19 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
{
/*
We use the format function to display the region as
a colored icon with a tooltip. The OxTypeIcon class
makes the icon themed (its border color will depend
on the current theme), the region class is added to
apply our own custom CSS, and Ox.getGeoColor returns
a color for the region. Note that the actual value
is 'Continent, Region, Country', which results in a
nicer sort order than just 'Region'.
a colored icon with a tooltip. The region class is
added to apply our own custom CSS, and
Ox.getGeoColor returns a color for the region. Note
that the actual value is 'Continent, Region,
Country', which results in a nicer sort order than
just 'Region'.
*/
format: function(value) {
var region = value.split(', ')[1];
return Ox.Element({
tooltip: region
})
.addClass('OxTypeIcon region')
.addClass('region')
.css({
background: 'rgb('
+ Ox.getGeoColor(region).join(', ')
@ -237,7 +236,10 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
{
format: function(value) {
return value
? $('<img>')
? Ox.Element({
element: '<img>',
tooltip: 'Capital'
})
.addClass('capital')
.attr({
src: Ox.UI.getImageURL('symbolStar')