use themed map marker colors
This commit is contained in:
parent
21d6eec580
commit
77905dc4ea
1 changed files with 12 additions and 10 deletions
|
|
@ -18,15 +18,6 @@ Ox.MapMarker = function(options) {
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
var that = this,
|
var that = this,
|
||||||
typeColor = {
|
|
||||||
country: [64, 64, 255],
|
|
||||||
region: [0, 192, 192],
|
|
||||||
city: [255, 0, 0],
|
|
||||||
borough: [255, 128, 0],
|
|
||||||
street: [255, 255, 0],
|
|
||||||
building: [255, 64, 128],
|
|
||||||
feature: [0, 192, 0]
|
|
||||||
},
|
|
||||||
areaSize = {
|
areaSize = {
|
||||||
100: 10, // 10 x 10 m
|
100: 10, // 10 x 10 m
|
||||||
10000: 12, // 100 x 100 m
|
10000: 12, // 100 x 100 m
|
||||||
|
|
@ -35,7 +26,18 @@ Ox.MapMarker = function(options) {
|
||||||
10000000000: 18, // 100 x 100 km
|
10000000000: 18, // 100 x 100 km
|
||||||
1000000000000: 20, // 1,000 x 1,000 km
|
1000000000000: 20, // 1,000 x 1,000 km
|
||||||
100000000000000: 22 // 10,000 x 10,000 km
|
100000000000000: 22 // 10,000 x 10,000 km
|
||||||
};
|
},
|
||||||
|
themeData = Ox.Theme.getThemeData(),
|
||||||
|
typeColor = {};
|
||||||
|
|
||||||
|
[
|
||||||
|
'country', 'region', 'city', 'borough',
|
||||||
|
'street', 'building', 'feature'
|
||||||
|
].forEach(function(type) {
|
||||||
|
typeColor[type] = themeData[
|
||||||
|
'mapPlace' + Ox.toTitleCase(type) + 'Color'
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
Ox.forEach(options, function(val, key) {
|
Ox.forEach(options, function(val, key) {
|
||||||
that[key] = val;
|
that[key] = val;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue