Ver Mensaje Individual
  #1  
Antiguo 10-03-2018
jkokoj jkokoj is offline
Miembro
 
Registrado: ago 2010
Posts: 14
Reputación: 0
jkokoj Va por buen camino
Al capturar coordenadas y ponerlas en un mapa, falla en algunos celulares

Saludos cordiales a todos, el error ocurre cuando trato de hacer la conversión de tipo de dato, de Double a String, trato de convertir y guardar en las variables lat y long. Bueno en realidad mi consulta es la siguiente. Por que mi código funciona en un samsung S4 y no funciona en los celulares J2 prime y J5 prime, también lo probé en un xiaomi de gama alta y funciona. Si alguien me puede ayudar a entender por que ocurre esto.

Código Delphi [-]
procedure TForm1.ListBox1ItemClick(const Sender: TCustomListBox;
  const Item: TListBoxItem);
var
  mapCenter: TMapCoordinate;
  MyMarker: TMapMarkerDescriptor;
  lat,long : Double;
  i : Integer;
begin
  I:= Item.Index;

  lat :=StrToFloat(LJSonArray.Items[i].GetValue<string>('latitud'));
  long :=StrToFloat(LJSonArray.Items[i].GetValue<string>('longitud'));



  mapCenter := TMapCoordinate.Create(Lat, Long);
  MapView1.Location := mapCenter;
  MapView1.Zoom:=16;
  MyMarker := TMapMarkerDescriptor.Create(mapCenter, 'Ubicaciones enviadas');
  MyMarker.Draggable := True;
  MyMarker.Visible :=True;
  MapView1.AddMarker(MyMarker);
  MapView1.MapType := TMapType.Hybrid;
end;
Responder Con Cita