1.1.4 • Published 5 years ago

@dtcmedia/dtcmedia-gmaps v1.1.4

Weekly downloads
1
License
ISC
Repository
bitbucket
Last release
5 years ago

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

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.17

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago