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

Drawing a layer over part of the map #115

Closed exilonX closed 2 years ago

exilonX commented 2 years ago

Hey!

I've been working on a project that needs to somehow highlight that parts not all parts of the map are available to interact with. So I need a layer over the parts that are not included and keeping a normal, interractive map on the parts (countries) that are in the project.

Something like this: image

The greyed out countries are excluded from the project and you can't interract with the map there, but in Romania for example it should be possible. Is it possible to build this layer ? I tried using KmlLayer but I'm not sure if it's what I need...

final kmlLayer = KmlLayer(KmlLayerOptions()
        ..url =
            'http://googlemaps.github.io/kml-samples/kml/Placemark/placemark.kml'
        ..suppressInfoWindows = true
        ..map = map);

Thanks!

a14n commented 2 years ago

Your question is rather related to the usage of the google maps API. I'd recommend asking on StackOverflow. Once you get a good answer don't hesitate to come back to me if you have some difficulties to translate it to Dart.