Download whq-google-map without NPM

Scroll down to download

WHQ Google Map

Wrapper for embedding a Google Map more easily.

Installation

npm install whq-google-map

Usage

import GoogleMap from 'whq-google-map'

// new GoogleMap(options)

const mapCanvas = document.querySelector('.map-canvas')
const contactMapStyles = [...]

const myMap = new GoogleMap({
    apiKey: [YOUR API KEY],
    coords: { lat: 100, lng: -100 },
    element: mapCanvas,
    markerIcon: 'img/map-marker.png',
    zoom: 16,
    styles: contactMapStyles
})

myMap.init()

Options

Option Type Description
apiKey String Your Google Maps API key.
coords String Object with lat and long properties.
element Node The map canvas element.
markerIcon String Optional.
Path to a custom marker icon. PNGs work the best cross-browser.
zoom Integer Optional.
Custom zoom level.
Default: 4
styles Array Optional.
Array of custom styles.

All versions of whq-google-map with dependencies

No informations.
No informations.
No informations.
No informations.
No informations.
No informations.
No informations.
No informations.