How to initialize and customize a GMSPlace object

263 views Asked by At

I want to initialize and customize a GMSPlace object, with a custom variable. I'm trying to do the below:

import Foundation
import GooglePlaces

func parseObject() {
    let parsedGMS = GMSPlace()
    parsedGMS.coordinate.latitude = 4.0 
    parsedGMS.formattedAddress = "test test"
}

but the issue is that these are get only properties so how can I do that ??

enter image description here

1

There are 1 answers

0
M Reza On

You cannot do that. GMSPlace is an immutable class. It means that once an object of this class is created, you cannot change its content. You shouldn't create your own custom objects from this class.