Map Widget Coordinates Stay at 0,0

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JereMiami
Posts: 119
Joined: Mon Nov 03, 2014 12:17 am

Map Widget Coordinates Stay at 0,0

Post by JereMiami » Sun Aug 09, 2020 2:19 pm

Question on the Map Widget.

If I have the centerCoordinates for the Map Widget set at a specific location BEFORE I test it on my android device, it works as it should. CenterCoordiantes are correct. Span is correct, and thus, region is correct.

Now, if I test if I test it on my android device with the centerCoordiantes set at 0,0 (or, well anywhere), and try to change them on the android device AFTER, with a button, it does not change from the preset centerCoordinates and I'm stuck off the coast of Africa.

What should I be doing to get the centerCoordinates to change while ON the android device?

Code on "Button:"
on mouseUp

...//other stuff to get tLat & tLng
put tLat & "," & tLng into tCoordinates

set the centerCoordinates of widget "Map" to tCoordinates
put tCoordinates into tMarkerData["coordinates"]
put "AwesomeSauce" into tMarkerData["title"]
put tMarkerData into tMarkers["Awesome"]
set the markers of widget "Map" to tMarkers
set the span of widget "Map" to ".01,.01"

JereMiami
Posts: 119
Joined: Mon Nov 03, 2014 12:17 am

Re: Map Widget Coordinates Stay at 0,0

Post by JereMiami » Sun Aug 09, 2020 2:41 pm

Region. It's region that changes it. Nevermind!

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”