<h3><span id="order-pay-dialog-close" class="close" onclick="return X.boxClose();">关闭</span>谷歌地图坐标定位</h3>
<div id="map_canvas" style="width:620px; height:420px"></div>
</div>
<script>
var infowindow=null;
var infowindow2=null;
var marker =null;
function initialize() {
geocoder = new google.maps.Geocoder();
var myLatlng = new google.maps.LatLng({$longi}, {$lati});
var myOptions = {
zoom: 13,
center: myLatlng,
navigationControl: false,
scaleControl: false,
streetViewControl: false,
mapTypeControl:false,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
google.maps.event.addListener(map, 'click', function(event) {
X.misc.setgooglemappoint(event.latLng);
//将标记点移动东到点击的地方
marker.setPosition(event.latLng);
  });
init(map ,myLatlng );
}
setTimeout(initialize,100);
function init(map,myLatlng ) {   
       addSite(map,"",myLatlng,"" );
    }   
  
    function addSite(map, siteDesc, location,address) {     
         marker = new google.maps.Marker({   
         position: location,   
         map: map   
      });   
      attachSecretMessage(marker, siteDesc,address);   
    }   
    function attachSecretMessage(marker, siteDesc,address) {   
    infowindow2=infowindow;
      infowindow = new google.maps.InfoWindow(   
          { //content: '<b>商场名称: </b>' + siteDesc + '</br>'+'<b>商场地址:</b>'+ address +'</br>',   
            content: '<b>A </b>',  
            size: new google.maps.Size(50,50)   
          });   
        google.maps.event.addListener(marker, 'click', function() {   
        infowindow.open(map,marker);   
      });   
    }   
</script>
 
                    
                     
                    
                 
                    
                 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号