I have a problem implementing a map widget for my Android app.
I want to display markers but I just can't get them to show up on the map.
I use the example code provided in the Dictionary.
See my code here:
Code: Select all
on openCard
local tMarkers, tMarkerData
set the region of widget "Map" to "55 .9533,-3 .1883, 10, 10"
set the centerCoordinates of widget "Map" to "55 .9533,-3 .1883"
put "55 .9533,-3 .1883" into tMarkerData["coordinates"]
put "Centre of Edinburgh" into tMarkerData["title"]
put tMarkerData into tMarkers["Edinburgh"]
set the markers of widget "Map" to tMarkers
end openCard
As you can see, I'm doing it exactly like in the Dictionary example but neither the marker is shown nor is the map centered at the coordinates that I'm submitting.
I just don't see my mistake here, hope that anyone can help me.
Since the map widget is not opening on an emulator for me, for whatever reason,
I test my application by saving it as standalone and then moving it to my phone.
The map is shown there, but like I said, with no markers and wrongly centered.
What am I missing here?