Languages

Menu
Sites
Language
Can't inject location using emulator control panel

I got the platform emulator to run (showing the hands, loading my app, etc.), but when I try to use the control panel to inject the location, I get an error saying "This page can't load Google Maps directly" (looks like an error coming from Google Maps directly", first image below). After that, I can click on the map, or use manual entry to add location, but when I click Inject Marker/ Inject Location, the UI changes to allow me to cancel, but never progresses past this point (Second image below). I can still press cancel, but retrying doesn't change the outcome). Does anyone know how to get around this issue?

 

Responses

3 Replies
Paul L

Hello, I have the same. There is bug in emulator and/or location tool. You can enter lat/lon manually (probabely only integer value) and then in your app (in location_manager_set_position_updated_cb callback) change it to desired coords.

Peter Kolichikov

What do you mean enter lat/lon manually? Do you mean through the code, or through the manual entry in the Location part of the Control panel? I tried doing the latter (entering 45, 45, 10, 2), but it seems to hang in a similar way as the map one does.

Paul L

Try to enter latitude = 1, longitude = 0, altitude = 0, accuracy = 0 in control panel. Then capture latitude in location_manager_set_position_updated_cb function and change coordinates to required value.

Pseudo code:

switch(latitude){

case 0:

myCoord = LatLng(51.123,1.232);

break;

case 1:

myCoord = LatLng(51.124,123);

break;

}