Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Dim MapWebView As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
MapWebView.Initialize("")
Activity.AddView(MapWebView,0,0,100%x,100%y)
ShowMap(46.138, 7.118, 15)
End Sub
Sub ShowMap(Latitude As Float, Longitude As Float, Zoom As Int)
Dim HtmlCode As String
HtmlCode = "<!DOCTYPE html><html><head><meta name='viewport' content='initial-scale=1.0, user-scalable=no' /><style type='text/css'> html { height: 100% } body { height: 100%; margin: 0px; padding: 0px }#map_canvas { height: 100% }</style><script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=true'></script><script type='text/javascript'> function initialize() { var latlng = new google.maps.LatLng(" & Latitude & "," & Longitude & "); var myOptions = { zoom: "&Zoom&", center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); var marker0 = new google.maps.Marker({ position: new google.maps.LatLng(" & Latitude & "," & Longitude & "),map: map,title: '',clickable: false,icon: '' }); }</script></head><body onload='initialize()'> <div id='map_canvas' style='width:100%; height:100%'></div></body></html>"
MapWebView.LoadHtml(HtmlCode)
End Sub