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

StreetViewPanorama.controls array can't be indexed using ControlPosition enum #66

Closed jeffmin closed 5 years ago

jeffmin commented 5 years ago

This code leads to the following error:

google.maps.GMap map;
...
var topRightControls = map.streetView.controls[ControlPosition.TOP_RIGHT];

Error:

  The argument type 'ControlPosition' can't be assigned to the parameter type 'int'. #argument_type_not_assignable

I believe lib/src/core/street_view/street_view_panorama.dart should replace lines 57-66 with simply: Controls controls;

a14n commented 5 years ago

Thanks for the report.

Fix available in version 3.3.4.