Package Exports
- googlemap
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (googlemap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
googlemap
Simple class which makes Google Maps out of HTML attributes.
Documentation
Sample data and HTML markup (latitude
and longitude
are required for each item):
[
{
"latitude": 55.944083,
"longitude": -3.161833,
"title": "Arthurs Seat"
},
{
"latitude": 51.507752,
"longitude": -0.12793,
"title": "Nelsons Column"
}
]
<div id="map" data-markers='{{ markers }}'></div>
Simple example:
new GoogleMap(document.getElementById('map'));
Marker click event callbacks:
new GoogleMap(document.getElementById('map'), {
markerClickCallback: function (marker, data) {
return window.location = 'http://www.google.co.uk?q=' + data.title;
}
});