Created
October 20, 2017 18:49
-
-
Save dfrho/eeeaefea0f6334200942e12713af8c5e to your computer and use it in GitHub Desktop.
getting the ideal map view for each boro
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
var boroView = {}; | |
function getBoroView(boroID) { | |
switch (boroID) { | |
case 'mh': | |
boroView = { | |
boro: 'Manhattan', | |
coordinates: [-73.952403, 40.793146], | |
zoom: 10.89 | |
} | |
break; | |
case 'si': | |
boroView = { | |
boro: 'Staten Island', | |
coordinates: [-74.142089, 40.574220], | |
zoom: 11.25 | |
} | |
break; | |
case 'xb': | |
boroView = { | |
boro: 'Bronx', | |
coordinates: [-73.898973, 40.852577], | |
zoom: 11.6 | |
} | |
break; | |
case 'qs': | |
boroView = { | |
boro: 'Queens', | |
coordinates: [-73.816968, 40.685367], | |
zoom: 10.63, | |
} | |
break; | |
case 'bk': | |
boroView = { | |
boro: 'Brooklyn', | |
coordinates: [-73.963618, 40.654864], | |
zoom: 10.9, | |
} | |
break; | |
case 'all': | |
boroView = { | |
boro: 'All', | |
coordinates: [-73.996, 40.71], | |
zoom: 9.76, | |
pitch: 6, | |
bearing: 0 | |
} | |
break; | |
default: | |
break; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment