Skip to content

Commit 6d9bec4

Browse files
committed
docs: temporary solution for infoWindowTemplate
1 parent 5978139 commit 6d9bec4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,22 @@ exports.onCameraMove = onCameraMove;
242242
```
243243

244244
## Custom Info Windows (Beta)
245+
>[!WARNING]
246+
> if you are using NS7 `infoWindow Template` won't work from a xml file! a temporary solution will be declaring infoWindow Template from the code behind like this :
247+
248+
```ts
249+
var mapView = null;
250+
251+
export function onMapReady(args) {
252+
mapView = args.object;
253+
mapView.infoWindowTemplate = `<StackLayout orientation="vertical" width="200" height="150" >
254+
<Label text="{{title}}" className="title" width="125" />
255+
<Label text="{{snippet}}" className="snippet" width="125" />
256+
<Label text="{{'LAT: ' + position.latitude}}" className="infoWindowCoordinates" />
257+
<Label text="{{'LON: ' + position.longitude}}" className="infoWindowCoordinates" />
258+
</StackLayout>`;
259+
}
260+
```
245261

246262
To use custom marker info windows, define a template in your view like so:
247263

0 commit comments

Comments
 (0)