I have google maps plugin running in my angular app, and i’m trying to use the custom info window option, but I can’t figure out how to convert the code sample to the angular version.
My working version without the info window:
<GridLayout rows="*" columns="*"> <MapView [latitude]="42" [longitude]="42" [zoom]="8" (mapReady)="onMapReady($event)"></MapView> </GridLayout>
A snippet from the plugin’s page with the info window:
<maps:mapView mapReady="onMapReady"> <!-- Default Info Window Template --> <maps:mapView.infoWindowTemplate> <StackLayout orientation="vertical" width="200" height="150" > <Label text="{{title}}" className="title" width="125" /> <Label text="{{snippet}}" className="snippet" width="125" /> <Label text="{{'LAT: ' + position.latitude}}" className="infoWindowCoordinates" /> <Label text="{{'LON: ' + position.longitude}}" className="infoWindowCoordinates" /> </StackLayout> </maps:mapView.infoWindowTemplate> <!-- Keyed Info Window Templates --> <maps:mapView.infoWindowTemplates> <template key="testWindow"> <StackLayout orientation="vertical" width="160" height="160" > <Image src="res://icon" stretch="fill" height="100" width="100" className="infoWindowImage" /> <Label text="Let's Begin!" className="title" /> </StackLayout> </template> </maps:mapView.infoWindowTemplates> </maps:mapView>
How would you integrate infoWindowTemplate
?