
<?php 

//https://developers.google.com/maps/documentation/javascript/adding-a-google-map#all
//AIzaSyAA4Aze6MZodfecXJSp9jD5hxj9h6Oq6xI

?>



    <script defer
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAA4Aze6MZodfecXJSp9jD5hxj9h6Oq6xI&callback=initMap">
</script>
谷歌地图不能用了。谷歌要收费。
 https://blog.csdn.net/weixin_43272781/article/details/104640671

<?php


//http://api.map.baidu.com/lbsapi/createmap/index.html  创建sample

//".LANG." must be cn.
$sql = "SELECT arr_map from ".TABLE_LANG."  where lang='".LANG."'  order by id limit 1";
//echo $sql;
$row22 = getrow($sql);
 //pre($row22);
$arr_can=$row22['arr_map'];

$map_w='100%';
$map_h="350px";



$bscntarr = explode('==#==',$arr_can); 
     if(count($bscntarr)>1){  // pre($bscntarr);
          foreach ($bscntarr as   $bsvalue) {
           
             if(strpos($bsvalue, ':##')){
               $bsvaluearr = explode(':##',$bsvalue);
               $bsccc = $bsvaluearr[0];
               $$bsccc=$bsvaluearr[1];
             }
          }
      }



?>

    <style type="text/css">
      /* Set the size of the div element that contains the map */
      #dmgooglemap {
        height: <?php echo $map_w;?>;
        /* The height is 400 pixels */
        width: <?php echo $map_h;?>;
        /* The width is the width of the web page */
      }
    </style>
    <script>
      // Initialize and add the map
      function initMap() {
        // The location of Uluru
        const uluru = { lat: <?php echo $map_x_wei;?>, lng: <?php echo $map_y_jing;?> };
        // The map, centered at Uluru
        const map = new google.maps.Map(document.getElementById("dmgooglemap"), {
          zoom: 4,
          center: uluru,
        });
        // The marker, positioned at Uluru
        const marker = new google.maps.Marker({
          position: uluru,
          map: map,
        });
      }
    </script>
 


    <div id="dmgooglemap"></div>
 