Right below
struct ContentView: View {
@State var textFieldLat: String = ""
@State var textFieldLong: String = ""
@State var savedLat: String = ""
@State var savedLong: String = ""
The middle code:
Button(action: {
savedLat = textFieldLat ////<-- saved as latitude to plot
savedLong = textFieldLong////<--- saved as longitude to plot
I have tried converting them to double from string. I am new to swiftui, might have declared it wrongly.
Sorry for the messy reply, @State var textFieldLat: String = "" right below ContentView:View{ ...
At the Button, i declared as savedLat = texteFieldLat. I have tried converting from string to double. Is my approach correct on the map
annotation part?
Right below
struct ContentView: View {
@State var textFieldLat: String = ""
@State var textFieldLong: String = ""
@State var savedLat: String = ""
@State var savedLong: String = ""
The middle code:
Button(action: {
savedLat = textFieldLat ////<-- saved as latitude to plot
savedLong = textFieldLong////<--- saved as longitude to plot
I have tried converting them to double from string. I am new to swiftui, might have declared it wrongly.
Sorry for the messy reply, @State var textFieldLat: String = "" right below ContentView:View{ ...
At the Button, i declared as savedLat = texteFieldLat. I have tried converting from string to double. Is my approach correct on the map
annotation part?