question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Map not displayed

See original GitHub issue

Hello, I am having a problem with your package, I am trying to reproduce the base map. First, I realized that I was assinging a bad style because the component raised an error when trying to make the http request. But now, it doesn’t raise any error, and still like that, the map isn’t displayed. Here is the component:

<template>
  <q-page id="map" class="row items-center justify-evenly">
    <MglMap
      style="width: 100%"
      container="#map"
      :center="coordinates"
      :accessToken="accessToken"
      :mapStyle.sync="mapStyle"
    />
  </q-page>
</template>

<script lang="ts">
import Vue from 'vue';
import Mapbox from 'mapbox-gl';
import { MglMap } from 'vue-mapbox';
import 'mapbox-gl/dist/mapbox-gl.css';

export default Vue.extend({
  name: 'PageIndex',
  data() {
    return {
      accessToken:
        'MY_ACCESS_TOKEN',
      mapStyle: 'mapbox://styles/mapbox/streets-v11',
      coordinates: [23.119456, -82.426454]
    };
  },
  components: {
    MglMap
  },
  created() {
    this.mapbox = Mapbox;
  }
});
</script>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
vvavepacketcommented, Oct 30, 2020

It is working thank you.

1reaction
vvavepacketcommented, Oct 29, 2020

@elC0mpa Did you managed to fix this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Google Maps Not Showing Map - Technipages
If Google Maps fails to load the map and the streets are not showing, this guide will show you how to fix the...
Read more >
Google Maps API --Map not displaying - Stack Overflow
First time using the Google maps API, and the map isn't showing up. I've read quite a few things regarding height and width...
Read more >
How to Fix Google Maps When It's Not Working on Android
How to Fix Google Maps When It's Not Working on Android · 1. Enable Location Accuracy · 2. Turn Off the Wi-Fi Only...
Read more >
Google Maps not showing route: Learn how to solve this issue ...
Google Maps not showing route · Location Accuracy · Uninstall and reinstall · Recalibrating the compass · Clear Cache and Internet Connectivity.
Read more >
My Map is Not Showing On My Website - WP Go Maps
My Map is Not Showing On My Website. If your Map is not displaying on the front-end of your website, this could be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found