diff --git a/source/Ox.UI/js/Map/Ox.MapMarker.js b/source/Ox.UI/js/Map/Ox.MapMarker.js index ecd8f21b..6143cee5 100644 --- a/source/Ox.UI/js/Map/Ox.MapMarker.js +++ b/source/Ox.UI/js/Map/Ox.MapMarker.js @@ -21,18 +21,33 @@ Ox.MapMarker = function(options) { var that = this, typeColor = { - country: [0, 0, 255], + country: [64, 64, 255], region: [128, 0, 255], city: [255, 0, 0], borough: [255, 128, 0], street: [255, 255, 0], premise: [128, 255, 0], - feature: [0, 255, 0], + feature: [0, 192, 0], other: [128, 128, 128] + }, + areaSize = { + 100: 10, + 10000: 12, // 100 m + 1000000: 14, // 1 km + 100000000: 16, // 10 km + 10000000000: 18, // 100 km + 1000000000000: 20, // 1,000 km + 100000000000000: 22, // 10,000 km }; - Ox.print('TYPE:', options.place.type) - if (typeColor[options.place.type]) { + + if (options.map.options('showTypes')) { options.color = typeColor[options.place.type]; + options.size = 8; + Ox.forEach(areaSize, function(size, area) { + if (options.place.area > area) { + options.size = size; + } + }); } Ox.forEach(options, function(val, key) {