use themed map marker colors

This commit is contained in:
rolux 2012-12-28 18:01:13 +01:00
parent 21d6eec580
commit 77905dc4ea

View file

@ -18,15 +18,6 @@ Ox.MapMarker = function(options) {
}, options);
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 = {
100: 10, // 10 x 10 m
10000: 12, // 100 x 100 m
@ -35,7 +26,18 @@ Ox.MapMarker = function(options) {
10000000000: 18, // 100 x 100 km
1000000000000: 20, // 1,000 x 1,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) {
that[key] = val;