hi, I want to have a button on my project and when user press that I save his current location on there via Google Map!
Use the location function to get the latitude and longitude. Parse out those values and then use them to construct a Google Maps URL which you can display in a web viewer.
do you have any learning picture or video sir?
it is in the help - even with an example
FileMaker Pro 16 Help
and then how can I use it on Google map?
Explain in detail exactly what you mean by "use it on Google map". This is NOT enough information for us to understand what you are trying to achieve.
Aren't you getting tired of having us ask this question?
We can't get inside your head and know what you want unless you tell us.
Walking into the doctor and saying "i'm sick" is not enough information for them to make a diagnosis and recommend a treatment.
let me explain to you completely, I want when user press button I have a
screen shot or text field I his location save on that field then after that
I can check it where he was and where he didn't go there.
I save the current location by this way at first.
now I don't want to use open URL, I want to open this on web viewer but I don't know how? please help me to do that
In its simplest form, you could set the Web Viewer to use the following as it's web address (as shown in attached image):
"https://maps.google.com/maps?q=" & users::location
You will need a Google account and use the Developers area to get an API key. Also they have usage restrictions.
Try this formula for the web viewer:
If ( not IsEmpty ( Users::location ) ;
Let ( [
latitude = MiddleWords ( Users::location ; 1 ; 1 );
longitude = MiddleWords ( Users::location ; 2 ; 1 )
"http://maps.google.com/maps?q=" & latitude & "," & longitude
; "" )
I do this work but it doesn't work sir.
Ah yes, my mistake, you need to get the first two values from the 'Location' as shown by Jason Wood below... I was looking at older documentation for Go 12, when the Location function only returned latitude and longitude... It now also returns accuracy.
it doesn't work too
You could also try using the 'LocationValues' function to get a list that has latitude and longitude as first two values, so is easy to then use GetValue in the calculation for the Google maps URL, e.g.:
"https://maps.google.com?q=" & GetValue ( users::location ; 1 ) & "," & GetValue ( users::location ; 2 )
See attached file which I have tested on my iPad and works as expected.
Yea what is my problem?
I don't know exactly what problem you are having, but did my example file work for you?
If so, then just use the same techniques in your file...
Make sure to use LocationValues to get the location in your script. Check that those values do appear in the field you expect them to. Make sure to 'commit' records. Check that web viewer is using same URL as in my file, making sure the correct field in your solution is being referenced.
You can also use the native iOS maps URL.
Assuming variables that you set from the Location function:
$lat = your latitude
$lng = your longitude
"maps://apple.com/?q=My Location Name&ll=" & $lat & "," & $lng
The parameter q specifies the Pin Name to display on the map, ll is the location to center the map around.
Opens the Maps App, not the browser.
Then you can use iOS sharing just as you would normally.
Here is a link to iOS maps URL scheme.
You can also use other parameters for navigation etc.
I want to user can see the location on file maker without any exit.
is there any way I save Persian / Farsi name of that location in the field?
Retrieving data ...