diff --git a/demos/map/index.html b/demos/map/index.html index fecc26ac..61c7e21d 100644 --- a/demos/map/index.html +++ b/demos/map/index.html @@ -3,11 +3,7 @@ ox.js map demo - - - - - + diff --git a/demos/map/js/map.js b/demos/map/js/map.js index ecda2d1b..9e2020c1 100644 --- a/demos/map/js/map.js +++ b/demos/map/js/map.js @@ -1,4 +1,4 @@ -$(function() { +Ox.load('UI', {debug: true}, function() { $.getJSON('json/countries.json', function(data) { diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index 4068eca0..2b84601f 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -194,13 +194,13 @@ Ox.Map = function(options, self) { size: 24 }) .appendTo(that); - self.$labelsButton = new Ox.Button({ - title: 'Show Labels', - width: 96 + self.$labelsButton = new Ox.Checkbox({ + title: 'Labels', + width: 64 }) .css({float: 'left', margin: '4px'}) .bindEvent({ - click: toggleLabels + change: toggleLabels }) .appendTo(self.$toolbar) self.$findInput = new Ox.Input({ @@ -893,11 +893,14 @@ Ox.Map = function(options, self) { function toggleLabels() { self.options.labels = !self.options.labels + Ox.print('toggle', getMapType()) self.map.setMapTypeId(google.maps.MapTypeId[getMapType()]); + /* self.$labelsButton.options({ title: self.$labelsButton.options('title') == 'Show Labels' ? 'Hide Labels' : 'Show Labels' }); + */ } function triggerGeocodeEvent(data) {