vuestic-admin icon indicating copy to clipboard operation
vuestic-admin copied to clipboard

Google maps integration

Open peterennis opened this issue 3 years ago • 6 comments

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...

    • [x] bug report
    • [ ] feature request
    • [ ] support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?

  • What is the current behavior?

error message

  • If the current behavior is a bug, please provide the steps to reproduce, ideally also a screenshot or gif if it's a style issue

  • What is the expected behavior?

  • What is the motivation / use case for changing the behavior?

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

2020-12-06 20_08_39-

peterennis avatar Dec 07 '20 04:12 peterennis

Thanks! We'll take a look.

asvae avatar Dec 09 '20 02:12 asvae

Hi @asvae! I guess this is the problem Screen Shot 2020-12-14 at 4 32 13 PM

damirJa avatar Dec 14 '20 11:12 damirJa

i think this is not a bug just because of don't have paid google map api key

sarathak avatar Mar 21 '21 16:03 sarathak

Update:

Currently it does not open completely and throws these errors:

vuesticAdmingoogleMapsAndYandexMapsAreNotWorking

Derranion avatar Dec 23 '21 23:12 Derranion

Currently, the load functionality fails completely: grafik

saschnet avatar Apr 09 '22 19:04 saschnet

I fixed the current bug which resides in /src/pages/admin/maps/google-maps/GoogleMap.vue by installing the official google maps loader https://www.npmjs.com/package/@googlemaps/js-api-loader with

npm i @googlemaps/js-api-loader

and modified the <script>[...]</script> content to:

import { Loader } from '@googlemaps/js-api-loader';

export default {
  name: 'google-map',

  mounted () {
    if (!process.env.VUE_APP_GOOGLE_MAPS_API_KEY) {
      throw new Error('Please provide google maps api key from env (VUE_APP_GOOGLE_MAPS_API_KEY)')
    }

    const loader = new Loader({
      apiKey: process.env.VUE_APP_GOOGLE_MAPS_API_KEY,
      version: "weekly",
      libraries: ["places"]
    });

    const mapOptions = {
      center: {
        lat: 0,
        lng: 0
      },
      zoom: 6,
    };

    loader
      .load()
      .then((google) => {
        new google.maps.Map(this.$el, mapOptions);
      })
      .catch(e => {
        console.log(e)
        // do something
      });
  },
}

saschnet avatar Apr 10 '22 12:04 saschnet

We removed google map from new version.

asvae avatar Jan 26 '24 11:01 asvae