Socket
Socket
Sign inDemoInstall

vue-google-heatmap

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-google-heatmap

Vue Heatmap component that uses Google Maps


Version published
Weekly downloads
92
decreased by-7.07%
Maintainers
1
Install size
5.63 kB
Created
Weekly downloads
 

Readme

Source

Installation

yarn add vue-google-heatmap

You will need an Google Maps Javascript API Key. You can get one here: Google Cloud Console

import VueGoogleHeatmap from 'vue-google-heatmap';

Vue.use(VueGoogleHeatmap, {
  apiKey: API_KEY_HERE
});

Example

<template>
  <vue-google-heatmap :points="points"
                      :width="400"
                      :height="350" />
</template>

<script>
export default {
  data() {
    return {
      points: [
        {lat: 37.786117, lng:-122.440119},
        {lat: 37.786564, lng:-122.440209},
        {lat: 37.786905, lng:-122.440270},
        {lat: 37.786956, lng:-122.440279},
        {lat: 37.800224, lng:-122.433520},
        {lat: 37.800155, lng:-122.434101},
        {lat: 37.800160, lng:-122.434430},
        {lat: 37.800378, lng:-122.434527},
        {lat: 37.800738, lng:-122.434598},
        {lat: 37.800938, lng:-122.434650},
        {lat: 37.801024, lng:-122.434889},
        {lat: 37.800955, lng:-122.435392},
        {lat: 37.800886, lng:-122.435959}
      ]
    }
  }
}
</script>

heatmap example

Available Props

NameTypeDefaultDescription
width[String, Number]100%Specify map width with a number (200), or with a string percentage (100%)
height[String, Number]100%Specify map height with a number (200), or with a string percentage (100%)
initial-zoomNumber13Initial Map Zoom
map-typeStringroadmapType of map, options: ['roadmap', 'satellite']
latNumber37.775Map center latitude
lngNumber-122.434Map center longitude
pointsArray[]Points to generate Heatmap with, array of objects [{lat: 37.775, lng: -122.434}]
optionsObject{}Heatmap layer options (See available options here)

FAQs

Last updated on 10 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc