I try to embed a map in my desktop application by using CHtmlView::Navigate2 method to browse local webpage which is a simple google-maps sample html. The html file source as the following.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?callback=initMap"
async defer></script>
</body>
</html>
The html file with google-maps JavaScript API simple map sample was displayed properly with Internet Explorer but only white color map with vaild zoom control in my CHtmlView window. And I observe that if quickly zoom in/out the map in my test application sometimes the map show up then disappear immediately.