google-map icon indicating copy to clipboard operation
google-map copied to clipboard

html template is missing in google-map

Open tenacious-joy opened this issue 7 years ago • 3 comments
trafficstars

When google-map is imported in a polymer 3 element, it produces the following error:

element-mixin.js:362 template getter must return HTMLTemplateElement Uncaught TypeError: Cannot read property 'api' of undefined

It occurs in chrome.

It can be fixed by:

  1. Importing html from html-tag.js
  2. And return the template as html template.

Fix: import { html } from '@polymer/polymer/lib/utils/html-tag.js'; Change Polymer({ _template: [[some html]] }) to

Polymer({ _template: html[[some html]] })

Had to fix this inside node_modules which cannot be pushed to production.

tenacious-joy avatar Nov 18 '18 14:11 tenacious-joy

Hi your issue is still there or code is available in production.?

anoopsharma010395 avatar Jan 17 '19 14:01 anoopsharma010395

The issue is still there. Importing html seems to be the only solution :-(

mshockwave avatar Mar 22 '19 01:03 mshockwave

Just run into this bug as well - the fix is simple enough (as described above) but now I've had to copy this library into my code and make the edit (as well as changing several import statements). I can see that is has been left untouched for a long time already but hope it gets addressed

simonh1000 avatar Aug 14 '19 06:08 simonh1000