App crashes when trying to add markers in app with user input

I want to build an app where I can create a marker based on user inputs. But each time I try to create the marker the app crashes and restarts.Please help me its very important.!

This is the UI and the current code.


1 Like

You are extracting the latitude and longitude as STRINGS, so instead of having (say) 15.32, you have a text “15.32”.
Add 0 to the value, or multiply by 1. Using a mathematical operation will force the string to be converted into a number, THEN you can use it as an numerical entry.

Thanks for the reply I’ll try your suggestion :smiley: