如果我在Delphi XE6移动项目中有这个脚本:
const
cRoute =
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true">
</script>
<script type="text/javascript">
var geocoder;
var map;
var trafficLayer;
var bikeLayer;
var markersArray = [];
function GotoLatLng(Lat, Lang) {
var latlng = new google.maps.LatLng(Lat,Lang);
map.setCenter(latlng);
PutMarker(Lat, Lang, Lat+","+Lang);
}
</script>
</head>
</html>;
如何从TLocationSensor向此脚本发送Lat和Lang的值,并在android / ios上的TWebBrowser中显示请求的地图?
TNX
答案 0 :(得分:0)
WebBrowser1.EvaluateJavaScript('GotoLatLng('+DelphiLatVar+','+DelphiLongVar+');');