[Vuejs]-Rotate google map with vue2-google-maps

0👍

According to documentation :

Once your map is displaying 45° imagery, you can orient the imagery
towards one of its cardinal directions by calling setHeading() on the
Map object, passing a number value expressed as degrees from North.

So, orient the imagery ( heading property) could be specified once 45° imagery is set, here is an example for vue-google-maps

<template>
  <div>
    <GmapMap 
       :center="center" 
      :zoom="zoom" 
      :mapTypeId="'satellite'"
      :tilt="titl"
      :heading="heading"
       ref="map">

    </GmapMap>
  </div>
</template>

<script>
export default {
  data() {
    return {
      zoom: 18,
      center: { lat: 45.518, lng: -122.672 },
      titl: 45,
      heading: 90
    };
  },
  methods: {}
};
</script>

Leave a comment