Rob I did that, and the log from the Corona emulator, runing on the Samsung device is below.
The latitude and longitude is nil, but the “event.isError” is returning FALSE, it sounds like the “myMap:requestLocation” is returning empty.
Since my app plots 12 map markers, I decided to plot only one. When I do that some times it plots one and some time it gives the nil error. For some reason the requestLocation on Android needs more time to find the location.
I am using the device connected to the WiFi.
The next step will be to pass the Latitude and Longitude numbers and not use the myMap:request.
This is either a bug or some build.settings parameters. I am not sure.
Here are the locations I am using:
stadiumLocations[1] = "Saint Petersburg Stadium,Russia, 197110" stadiumLocations[2] = "Fisht Stadium,Russia, 354340" stadiumLocations[3] = "Ekaterinburg Arena, Russia, 620028" stadiumLocations[4] = "Kazan Arena,Russia, 421001" stadiumLocations[5] = "Nizhny Novgorod Stadium, Russia, 603159" stadiumLocations[6] = "Kaliningrad Stadium, Russia, 236006" stadiumLocations[7] = "Spartak Stadium, Russia, 125424" stadiumLocations[8] = "Samara Arena, Russia, 443072" stadiumLocations[9] = "Rostov Arena, Russia, 344002" stadiumLocations[10] = "Volgograd Arena, Russia, 400005" stadiumLocations[11] = "Mordovia Arena, Russia, 430009"
On the iPhone they work fine and if I paste the locations on google map it finds all of them too.
SM-G920V: The specified string is at: nil , nil May 09 06:15:04.407 SM-G920V: The spe May 09 06:15:04.407 cified string is at: nil , nil SM-G920V: The specified string is at: nil , nil SM-G920V: The specified string is at: nil , nil SM-G920V: The specified string is at: nil , nil SM-G920V: The specified string is at: nil , nil May 09 06:15:04.410 SM-G920V: The specified string i May 09 06:15:04.411 s at: nil , nil May 09 06:15:04.411 SM-G920V: The specified string is at: nil , nil May 09 06:15:04.413 SM-G920V May 09 06:15:04.414 : The specified string is at: nil , nil May 09 06:15:04.415 SM-G920 May 09 06:15:04.416 V: The specified string is at: nil , nil May 09 06:15:04.431 SM-G920V: T May 09 06:15:04.431 he specified string is at: nil , nil SM-G920V: The specified string is at: nil , nil May 09 06:15:06.667 SM-G920V: ERROR: May 09 06:15:06.667 May 09 06:15:06.672 Runtime error May 09 06:15:06.672 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \< May 09 06:15:06.676 venues.lua:286\> May 09 06:15:06.676 SM-G920V: ERROR: Runtime error May 09 06:15:06.676 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.698 SM-G920V: ERROR: Runtime error May 09 06:15:06.698 SM-G920V: /Users/aroldocarvalho/Documents/\_Corona/201 May 09 06:15:06.700 8WorldCup/venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.701 SM-G920V: ERROR: Runtime error May 09 06:15:06.701 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.701 SM-G920V: ERROR: Runtime error May 09 06:15:06.701 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.701 SM-G920V: ERROR: Runtime error May 09 06:15:06.701 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.731 SM-G92 May 09 06:15:06.732 0V: ERROR: Runtime error May 09 06:15:06.732 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.732 SM-G920V: ERROR: Runtime error May 09 06:15:06.732 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> SM-G920V: Loc Handler Error: May 09 06:15:06.732 SM-G920V: ERROR: Runtime error May 09 06:15:06.733 SM-G920V: venues.lua:85: Function mapView:setCenter() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'setCenter' SM-G920V: venues.lua:85: in function \<venues.lua:78\> May 09 06:15:06.733 SM-G920V: ERROR: Runtime error May 09 06:15:06.733 SM-G920V: venues.lua:85: Function mapView:setCenter() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'setCenter' SM-G920V: venues.lua:85: in function \<venues.lua:78\> May 09 06:15:06.733 SM-G920V: ERROR: Runtime error May 09 06:15:06.733 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.733 SM-G920V: ERROR: Runtime error May 09 06:15:06.733 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.733 SM-G920V: ERROR: Runtime error May 09 06:15:06.734 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\> May 09 06:15:06.734 SM-G920V: ERROR: Runtime error May 09 06:15:06.734 SM-G920V: venues.lua:74: Function mapView:addMarker() was given an invalid 'latitude' argument. Was expecting a number. SM-G920V: stack traceback: SM-G920V: [C]: ? SM-G920V: [C]: in function 'addMarker' SM-G920V: venues.lua:74: in function 'addStadiums' SM-G920V: venues.lua:286: in function \<venues.lua:286\>