diff --git a/source/Ox.UI/js/Map/MapMarker.js b/source/Ox.UI/js/Map/MapMarker.js index 17e28165..22ae0b38 100644 --- a/source/Ox.UI/js/Map/MapMarker.js +++ b/source/Ox.UI/js/Map/MapMarker.js @@ -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;