in my win32 console application, l use HTMLControl open a website
( the website can open google map through google map api) ... but l
found is cannot open google map in my application..
is the main code : (test.cpp)
InitHTMLControl(g_hInst); //init HTMLControl
SendMessage(hWndHtml, DTM_NAVIGATE, 0, (LPARAM)(LPTSTR)TEXT("http://
127.0.0.1/1.html")); //open 1.html in my application
next is the 1.html (copy from google code ):
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8,
center: latlng,
navigationControl: true,
mapTypeControl: true,
scaleControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var geocoder = new google.maps.Geocoder();
}
</script>
</head>
<body onload="initialize()">
begin--->
<div id="map_canvas" style="width:100%; height:100%">
<--end
</body>
</html>
l found is wrong at :
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
anybody know why ????
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.