-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding GroundOverlays #492
Comments
onfireprojects
changed the title
Adding absolutely positioned overlays ("ground overlays") for custom shapes with text
Adding GroundOverlays
Feb 10, 2022
Have you found a solution yet? I think your best bet would be to add them via the native Google Maps SDK. We did something like that for a tile overlay, and thanks to NativeScripts ability to access native SDKs it was not that complicated. Here's an example of how to add the tile overlay. Ground overlay should be similar. methods: {
addTileOverlayAndroid() {
addPrecipitationTileOverlayAndroid() {
// load the map overlay
let tileUrlProvider = com.google.android.gms.maps.model.UrlTileProvider.extend({
getTileUrl: (x,y,zoom) => {
let url = this.getTileUrl(x, y, zoom);
return new java.net.URL(url);
}
});
let tileProviderInstance = new tileUrlProvider(256, 256);
this.currentFrame.overlay = this.mapView.gMap.addTileOverlay(new com.google.android.gms.maps.model.TileOverlayOptions()
.tileProvider(tileProviderInstance)
.transparency(0.9));
},
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[edited for readability and specification]
I want to add GroundOverlays, which are a thing inside the iOS file "objc!GoogleMaps.d.ts" >> GMSGroundOverlay
and i may be mistaken, but i don't see a way to use that right now, as it's also not a part of map-view.d.ts or other files.
Is there a way to use those functionalities (and other map-related things for that matter) directly - or am i missing something completely?
My project is running nativescript-vue 2.9 with nativescript-google-maps-sdk 3.0.2 btw
The text was updated successfully, but these errors were encountered: