Page 1 of 1

Touching the current location on a map

Posted: Fri Sep 16, 2016 10:32 pm
by GoneToSail
After the command mobileStartTrackingSensor "location" has been called, a user can display an annotation named "Current Location" by touching the blue circle showing this location. At that time, is there any message sent to the card so that a handler can be called with a script allowing, for instance, the display of the current coordinates ?
Thanks for any assistance !

Re: Touching the current location on a map

Posted: Sat Sep 17, 2016 10:19 pm
by Dixie
Let's say that you call

Code: Select all

 mobileStartTrackingSensor "location", true
in the openStack handler... then the current location is updated every time you change your location... the new coordinates can be displayed with the lat/long provided by the 'locationcahanged' handler

Code: Select all

on locationChanged latitude, longitude
   --set the theCurrentLocation of this stack to latitude & comma & longitude
   put latitude & comma & longitude into fld "currLocation"
end locationChanged

Re: Touching the current location on a map

Posted: Sun Sep 18, 2016 11:59 am
by GoneToSail
Thanks Dixie !
I have already done this, but I'm actually trying to display the coordinates ONLY when the user is touching the blue circle representing the current location. Any idea ?