Skip to content

Instantly share code, notes, and snippets.

@drecodeam
Last active December 18, 2018 03:23
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 drecodeam/4ce353d73fff1bcd8074ce6f12874b4f to your computer and use it in GitHub Desktop.
Save drecodeam/4ce353d73fff1bcd8074ce6f12874b4f to your computer and use it in GitHub Desktop.
map_style_dark = '<Add your map style here>'
origin = [37.784872, -122.389752]
addMap = () ->
window.mapLayer = new Layer
width: Screen.width
height: Screen.height
name: 'mapbox_layer'
window.mapLayer.ignoreEvents = false
window.mapboxInstance = new mapboxgl.Map
container: mapLayer._element
style: map_style_dark
center: [origin[1], origin[0]]
zoom: 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment