[AccessD] [EXTERNAL] Re: New Web Browser Control - Local Files for Google Maps

David Emerson newsgrps at dalyn.co.nz
Wed May 24 19:26:26 CDT 2023


Hi All,

Below is a simplified version of my html file.  It just requires putting in
a Google API key.  The only line that seems to be the problem when run in
the Edge Web Control is the call to Google Maps.  It work ok when it is
opened directly in a web browser.  Perhaps a bug in the control's processing
one of the following lines?

<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=
ReplaceWithGoogleKey "></script>

map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);


<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost --> 
<html> 
<head> 
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> 
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
<title>Google Maps JavaScript API v3 Example: Directions Waypoints</title> 
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map-canvas { height: 100% }
</style>

// *** Need to replace key with actual key in next line *** 
<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=
ReplaceWithGoogleKey "></script> 
<script type="text/javascript"> 
  var map;
 
  function initialize() {
    showPoints();
  }
  
  function showPoints() {
    var parms = new Array();
    var checkboxArray = document.getElementById("mappoints");
	
    for (var i = 0; i < checkboxArray.length; i++) {
	  parms = checkboxArray[i].value.split(";");
      if (i==0) {
        overlaytype = parms[0];
      } else {
        if (i==1) {
    	  var firstlocation = new google.maps.LatLng(-41.197008,
174.812589);
    	  var myOptions = {
      	    zoom: 11,
      	    mapTypeId: google.maps.MapTypeId.ROADMAP,
      	    center: firstlocation
    	  }
    	  map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
	}
      }
    }
  }

</script> 
</head> 
<body onload="initialize()"> 
<div id="map_canvas" style="float:left;width:100%;height:100%;"></div> 
<div id="control_panel"
style="float:right;width:30%;text-align:left;padding-top:20px"> 
<select multiple id="mappoints">
  <option value="2;C:\AATemp">2</input>
  <option value="-41.280556;174.778278;CTL;BuildingMarker;Name: CTL
<br>70 Featherston Street
<br>Wellington
<br>6011">Central </input>
  <option value="-41.11346;174.8469;HH01;ManholeMarker;Name: HH01
<br>1 Gloaming Hill
<br>Titahi Bay
<br>Porirua
<br>5022">1 Gloaming Hill</input>
</select> 
</div> 
</body> 
</html>


-----Original Message-----
From: AccessD <accessd-bounces+newsgrps=dalyn.co.nz at databaseadvisors.com> On
Behalf Of David Emerson
Sent: Sunday, May 21, 2023 4:28 PM
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Cc: 'Gustav Brock' <gustav at cactus.dk>
Subject: Re: [AccessD] [EXTERNAL] Re: New Web Browser Control - Local Files
for Google Maps

Hi Gustav,

This didn't work for me.  Perhaps because it is part of the whole Google
maps marker variable?

          var marker = new google.maps.Marker({
             position: new google.maps.LatLng(parms[0],parms[1]),
             map: map,
            icon: image
          });

-----Original Message-----
From: AccessD <accessd-bounces+newsgrps=dalyn.co.nz at databaseadvisors.com> On
Behalf Of Gustav Brock via AccessD
Sent: Sunday, May 21, 2023 4:08 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Cc: Gustav Brock <gustav at cactus.dk>
Subject: Re: [AccessD] [EXTERNAL] Re: New Web Browser Control - Local Files
for Google Maps

Hi David

You skipped this variation:

          var image = 'https://msaccess/'+dir+'/htm/images/' + parms[3]+
'.png'

Works for me when I click the control.

/gustav




More information about the AccessD mailing list