forked from 0x2620/oxjs
more compact label switch for map
This commit is contained in:
parent
007e525162
commit
ce3bdb46d6
3 changed files with 9 additions and 10 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue