1
0
Fork 0
forked from 0x2620/oxjs

more compact label switch for map

This commit is contained in:
rolux 2011-05-21 09:08:52 +02:00
commit ce3bdb46d6
3 changed files with 9 additions and 10 deletions

View file

@ -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) {