dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

Adding circle to map #404

Closed jasonmuriel closed 4 years ago

jasonmuriel commented 4 years ago

I am unable to add a circle to the map and can't seem to google any example code.

I've tried the following with no error but it does not draw a circle: this.mapView.addCircle(new CircleOptions() .map(this.mapView) .center(new LatLng(this.latitude, this.longitude) .radius(10000) .fillColor(Color.argb(128, 255, 0, 0)));

Could you provide an example or documentation for this ? Thank you so much for any assistance!

LABCAT commented 4 years ago

@jasonmuriel Did you manage to figure this out?

I have been able to get a circle added to the map but can't seem to set any of the color properties and if I set strokeColor, the stroke doesn't show at all.

LABCAT commented 4 years ago

For anyone who is looking how to do this, iIfigured it out from the following commit: https://github.com/dapriett/nativescript-google-maps-sdk/commit/9af4182fc2b57c772c67a7dad75cb675298775ce#diff-c8f0f9ac25e62bb68d3a88ef649d973d

and also in the demo: https://github.com/dapriett/nativescript-google-maps-sdk/blob/master/demo/app/main-page.js