a14n / dart-google-maps

A library to use Google Maps JavaScript API v3 from Dart scripts.
Apache License 2.0
130 stars 66 forks source link

Unable to call new GMap #53

Closed YuKitsune closed 6 years ago

YuKitsune commented 6 years ago

When calling new GMap, an error in the console appears, stating Cannot read property '$index' of undefined at Object.J.$index$asx.

Been searching for hours and can't find a solution.

Dart code:

import "package:google_maps/google_maps.dart";
import "dart:html";

// Google Map
GMap map;

void main(List<String> args){
    map = new GMap(querySelector("mapElement"));
}

Exception:

Uncaught TypeError: Cannot read property '$index' of undefined
    at Object.J.$index$asx (DartMap.js:6250)
    at StaticClosure.dart.main (google_maps_src.g.dart:7623)
    at startRootIsolate_closure.call$0 (isolate_helper.dart:122)
    at _IsolateContext.eval$1 (isolate_helper.dart:474)
    at Object.startRootIsolate (isolate_helper.dart:121)
    at DartMap.js:6728
    at DartMap.js:6729
    at DartMap.js:6709
    at DartMap.js:6720
    at DartMap.js:6732