Skip to content

Instantly share code, notes, and snippets.

@hanislovingit
Created April 20, 2015 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanislovingit/1d25192d86d0dd02f7d5 to your computer and use it in GitHub Desktop.
Save hanislovingit/1d25192d86d0dd02f7d5 to your computer and use it in GitHub Desktop.
Bing-map-switch-map-view-type
var MM = Microsoft.Maps;
function (val) {
switch (val) {
case '0':
map.setView({ mapTypeId: MM.MapTypeId.road });
break;
case '1':
map.setView({ mapTypeId: MM.MapTypeId.aerial, labelOverlay: MM.LabelOverlay.hidden });
break;
case '2':
map.setView({ mapTypeId: MM.MapTypeId.aerial, labelOverlay: MM.LabelOverlay.visible });
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment