Google Maps

View code





var tags = riot.mount('rg-map', {
  map: {
    center: { lat: 37.7577, lng: -122.4376 },
    zoom: 8

tags[0].on('loaded', function (map) { ... })

Everything that is available via standard Google Maps options is available through this tag.

For information on what is available head over Google Maps API docs

If you specify no options the map will still generate, but will default to predefined settings.

Be sure to style your map to that it appears on the page, give some height and width.

To gain access to the map object created on initialize use the loaded event. Useful for adding markers etc.