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.

При использовании SSR, карты не будут работать, если не сделать следующее:

<yandex-map
    v-if="showMap"
    class="ymap"
    :coords="[54.62896654088406, 39.731893822753904]"
></yandex-map>

И в mounted: mounted() { this.showMap = true }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nikitakuhtacommented, Apr 21, 2020

У меня аналогичная проблема с Nuxt SSR, как у автора issue. Если не запретить рисовать компонент yandex-map на сервере, то после загрузки вылетает ошибка: Uncaught TypeError: Cannot read property 'offsetWidth' of null Карта при этом на клиенте уже не рисуется.

Если закрыть компонент в <client-only>, или сделать хак с mounted, чтобы компонент рисовался только на фронте, то карта работает. Какие настройки искать - не понял. Nuxt.js v2.12.2, vue-yandex-maps v0.10.7.

Снимок экрана 2020-04-21 в 22 12 51
0reactions
evgajukovcommented, Oct 15, 2019
let YmapPlugin;
let Ymap;

if(process.browser){
     YmapPlugin = require('vue-yandex-maps/dist/vue-yandex-maps')
     Ymap = YmapPlugin.yandexMap;
}

А можно поподробнее как после Ymap использовать?

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSR Motorsports - Motorcycles, Pit Bikes, Dirt Bikes, Scooters ...
SSR Motorsports - Motorcycles, Pit Bikes, Dirt Bikes, Scooters, Side x Side's, ATV's, Mopeds, Electric Vehicles, Benelli- Worldwide Distributor.
Read more >
SSR Wheels|
SSR has always focused on manufacturing precise, lightweight, and strong wheels and will continue this tradition for years to come. Detail · PARTS...
Read more >
SSR - Wikipedia
Solid State Records, a Christian record label; Chevrolet SSR, a Chevrolet small truck; Disney's Saratoga Springs Resort & Spa; Small Screen Rendering, ...
Read more >
Smith Seckman Reid, Inc. (SSR)- Engineering ...
SSR is a leader in providing comprehensive engineering design and facility consulting services that consistently meet and exceed these expectations.
Read more >
SSR Motorsports ATVs, UTVs, SxS, Motorcycles & More
Below you'll find the full line of the SSR dirt bikes, pit bikes, ATVs, scooters and enduros as carry. Click here if you'd...
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