This package has been deprecated

Author message:

new version available which will contain support for other maptypes

@dtcmedia/dtcmedia-gmaps

1.1.4 • Public • Published

dtcmedia-gmaps

A custom web component for Google Maps build with Vuejs.

Features include:

  1. Single or multiple markers
  2. Custom markers
  3. Information windows
  4. Disabling/enabling the interface
  5. Disabling/enabling scrolling
  6. Lazy loading when in viewport

Usage in production

Include the custom web component by including the following scripts in your website:

<script src="./dist/dtcmedia-gmaps.js"></script>

or load it directly from unpkg

<script src="https://unpkg.com/@dtcmedia/dtcmedia-gmaps/dist/dtcmedia-gmaps.js"></script>

After that you can use the custom web component in your website like this

<dtcmedia-gmaps 
  api-key="xxx...xxx"
  places='[{}, {}]'
  zoom="14"
  height="400px"
  marker="http://maps.google.com/mapfiles/kml/paddle/red-circle.png"
  disable-interface="false"
  enable-scroll="true">
</dtcmedia-gmaps>

Properties

api-key | string = null

Your Google Maps Javascript API key. To obtain an API key, see https://developers.google.com/maps/documentation/javascript/get-api-key.

places | string = '[{"title": "DTC Media", "info": "Text shown in info window", "lat": 51.9482098, "lng": 6.2780542}]',

A string that can be parsed to JSON containing all the places information

Possible options
{
  "title": string,
  "info": string,
  "lat": number,
  "lng": number
}
zoom | number = 14

A zoom level to set the map to. Only works with a single marker.

height | string = "400px"

A height in pixels to render the map at.

marker | string = null

Image url with a custom marker icon

disable-interface | boolean = false

Enable/disable the user interface

enable-scroll | boolean = true

Enable/disable the use of the scroll wheel

Package Sidebar

Install

npm i @dtcmedia/dtcmedia-gmaps

Weekly Downloads

0

Version

1.1.4

License

ISC

Unpacked Size

687 kB

Total Files

17

Last publish

Collaborators