我正在使用简单的代码在手机上显示谷歌地图。添加 TLocationSensor,将属性 Active 设置为 True。
添加 LocationChanged 事件处理程序:
procedure TLocationForm.LocationSensor1LocationChanged(Sender: TObject;
const OldLocation, NewLocation: TLocationCoord2D);
begin
WebBrowser1.Navigate(
Format(
'https://maps.google.com/maps?q=%s,%s',
[NewLocation.Latitude.ToString, NewLocation.Longitude.ToString]
)
);
end;
为什么我的浏览器一直在加载?