Created
May 10, 2012 20:40
-
-
Save jueyang/2655748 to your computer and use it in GitHub Desktop.
multiple layer switchers?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div><a id="now" href="#">now</div> | |
<div id="nav-1"></div> | |
<div id="nav-2"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new MB.layers('none', 'map', [ | |
{ | |
name: '', | |
id: 'jue.map-9izw3s28', | |
el: 'now', | |
layer: 1, | |
center: { | |
lat: -2, | |
lon: 17, | |
zoom: 3, | |
ease: 1000 | |
} | |
} | |
]); | |
new MB.layers('nav-1', 'map', [ | |
{ | |
name: 'International Tribunals', | |
id: 'jue.map-9izw3s28', | |
el: 'tribunals', | |
layer: 1, | |
center: { | |
lat: -2, | |
lon: 19, | |
zoom: 3, | |
ease: 1000 | |
} | |
} | |
]); | |
new MB.layers('nav-2', 'map', [ | |
{ | |
name: 'TFV', | |
id: 'jue.map-9izw3s28', | |
el: 'TFV', | |
layer: 1, | |
center: { | |
lat: -2, | |
lon: 19, | |
zoom: 3, | |
ease: 1000 | |
} | |
} | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am trying to create three switchers in the site. | |
The problem with this approach is that the same layer id is attributed to both nav-1 and nav-2. Is there a way to resolve this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment