OnCreate life cycle of experiences and MapView visual component
Here is the code:
Application {
Array treasureScores
OnInit {
treasureScores = [10, 20, 30, 50, 100]
}
}
Experience CreateTreasure {
String name label("Treasure name") as TextField
Double latitude label("latitude") as TextField
Double longitude label("longitude") as TextField
Array points value([]) as Select
Array treasureLocationInMap as MapView
OnCreate {
CreateTreasure ct = broker.ui.getDataSource()
ct.points = treasureScores
ct.treasureLocationInMap = []
}
}