Map

Example


Installation

$ npm i -S storm-google-map

Usage

HTML

JS

Either import and initialise using a named import:

import GoogleMap from 'storm-google-map';
            
GoogleMap.init('.js-map', [
    {
        id: 'Storm',
        title: 'Storm Id',
        location : { 
            lat: 55.9749013,
            lng: -3.1669848
        }
    },
    {
        id: 'Waverley',
        title: 'Waverley Station',
        location : {
            lat: 55.9519979,
            lng: -3.1899702
        }
    }], {
    key: 'Your key'
});

Or async using storm-load.js, add the .standalone file to your project, then initialise using the global name:

Load('/content/js/async/storm-google-map.standalone.js')
    .then(() => {
        StormGoogleMap.init('.js-map', [
                {
                    id: 'Storm',
                    title: 'Storm Id',
                    location : { 
                        lat: 55.9749013,
                        lng: -3.1669848
                    }
                },
                {
                    id: 'Waverley',
                    title: 'Waverley Station',
                    location : {
                        lat: 55.9519979,
                        lng: -3.1899702
                    }
                }], {
                key: 'Your key'
            });
        });