<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=true"></script>
<script type="text/javascript">
var myOptions = {
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
}
var map;
function initialize() {
var myLatlng = new google.maps.LatLng(39.9208, 116.4001);
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
map.setCenter(myLatlng);
}
</script>
</head>
<body style="margin:0px; padding:0px;" onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
*************************************************************************************
Then if the location changed, I can get the latest info of the current
latitude and longitude and then using the following codes to update
the Maps:(using "Qt for Symbian" for development )
QStringList scriptStr;
scriptStr
<< QString("var myLatlng = new google.maps.LatLng(%1,
%2);").arg(longitude).arg(latitude)
<<"map.setCenter(myLatlng);";
map->page()->mainFrame()->evaluateJavaScript(scriptStr.join("\n"));
On SDK emulator it is able to run well and get the maps according to
current position but memory leak comes out and it would be down
automatically, and running it on N95 I even can‘t get the current
maps(longitude and latitude is absolutely get by other codes), so
could you help me?
In other words, you are kind of on your own.
Chad Killingsworth
On 3月15日, 下午10时25分, Chad Killingsworth
<chadkillingswo...@missouristate.edu> wrote:
> Symbian OS is not one of the supported platforms. It may be possible
> to get some functionality to work, but it is highly unlikely that
> everything documented would work as listed.
>
> In other words, you are kind of on your own.
>
> Chad Killingsworth
>
> On Mar 15, 4:18 am, ruiran <wrr...@sina.com> wrote:
>
>
>
> > hi,
> > I have implemented a simple application with Google Maps API v3 on
> > Nokia N95. The function is very similar with “Google map” on Symbian
> > phones, and now I just only first load a HTML file like this:
> > ******************************************************************************************
> > <html>
> > <head>
> > <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
>
> > <script type="text/javascript" src="http://maps.google.com/maps/api/js?
> > sensor=true"></script>
> > <script type="text/javascript">
>
> > var myOptions = {
> > zoom:8,
> > mapTypeId: google.maps.MapTypeId.ROADMAP,
> > }
> > var map;
> > function initialize() {
> > var myLatlng = new google.maps.LatLng(39.9208, 116.4001);
> > map = new google.maps.Map(document.getElementById("map_canvas"),
> > myOptions);
> > map.setCenter(myLatlng);
> > }
> > </script>
> > </head>
> > <body style="margin:0px; padding:0px;" onload="initialize()">
> > <div id="map_canvas" style="width:100%; height:100%"></div>
> > </body>
> > </html>
> > *************************************************************************************
> > Then if the location changed, I can get the latest info of the current
> > latitude and longitude and then using the following codes to update
> > the Maps:(using "Qt for Symbian" for development )
>
> > QStringList scriptStr;
> > scriptStr
> > << QString("var myLatlng = new google.maps.LatLng(%1,
> > %2);").arg(longitude).arg(latitude)
> > <<"map.setCenter(myLatlng);";
> > map->page()->mainFrame()->evaluateJavaScript(scriptStr.join("\n"));
>
> > On SDK emulator it is able to run well and get the maps according to
> > current position but memory leak comes out and it would be down
> > automatically, and running it on N95 I even can‘t get the current
> > maps(longitude and latitude is absolutely get by other codes), so
> > could you help me?- 隐藏被引用文字 -
>
> - 显示引用的文字 -
Chad Killingsworth