|
|
导航: |
论坛 -> 移动应用开发
斑竹:flyers,iamdream |
|
作者: |
|
2014/5/15 2:44:48 |
标题: |
xe6 android WebBrowser.LoadFromStrings? |
浏览:1743 |
|
加入我的收藏 |
楼主: |
unit umap1;
interface
uses ...
type TForm1 = class(TForm) WebB: TWebBrowser; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
const s1= '<!DOCTYPE html>' +'<html>' + '<head>'
+ ...
+ '</style>' + '<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>' + '<script>'
+'var map;' +'function initialize() {' + 'var mapOptions = {' + 'zoom: 18,' + 'center: new google.maps.LatLng(-34.397, 150.644)' + '};' + 'map = new google.maps.Map(document.getElementById("map-canvas"),' + 'mapOptions);' +'}'
+'google.maps.event.addDomListener(window, "load", initialize);'
'</script>' + '</head>' + '<body>' + '<div id="map-canvas"></div>' + '</body>' +'</html>' ;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject); begin WebBrowser.LoadFromStrings(s1, ''); end;
end.
请问 center: new google.maps.LatLng(-34.397, 150.644) - 经纬度 要如何由xe6 android传经纬度给Javascrip? 谢谢
----------------------------------------------
- |
|