google-map element throws error upon creation

140 views Asked by At

Downvote people: Note that this question is n̲o̲t̲ about Google Maps API V3. <google-map> is a GoogleWebComponent that displays a map automagically upon declaration in dom.


var map = document.createElement("google-map");

By only executing this line, it throws an error saying:

Uncaught TypeError: latitude must be a number

I don't even get a chance to set the latitude property.

Is this because I'm creating multiple google-maps (in different dom-modules) within the same page? If not, why is this happening and how do I solve this?


Added

Even doing something like this still yields the same error:

var map = document.createElement("span");
    map.innerHTML = "<google-map latitude='1'></google-map>";
0

There are 0 answers