Has anybody else used getUserLocation along with storyboard? I know it should be straight forward but I’ve confirmed bugs in the past after spending precious hours troubleshooting. Here is my code…
…
local myMap
local myLat
local myLong
local myLocation
local myOptions
…
function scene:createScene( event )
local group = self.view
…
myMap = native.newMapView(0, 65, display.contentWidth, 385 - top)
myMap.mapType = “normal”
myMap.alpha = 1
myLocation = myMap:getUserLocation()
myLat = myLocation.latitude
myLong = myLocation.longitude
myOptions = { title = “Lat:”…myLat…"/Long:"…myLong, subtitle = “You are here!” }
print("myLat = "…myLat) –> Corona Simulator: 37
print("myLong = "…myLong) –> ** Corona Simulator: ** -122
native.showAlert( "My Lat/Long: “, myLat…” / "…myLong ) –> iOS Simulator: 0/0
myMap:addMarker( myLat, myLong, myOptions)
myMap:setCenter( myLat, myLong)
…
end