www.pudn.com > GoogleEarth-information-systems.rar > MYfunc.php, change:2012-06-23,size:1619b


 
function DrawPoly() 
{ 
gex.dom.clearFeatures(); 
var placemark = gex.dom.addPlacemark({ 
  polygon: [], 
  style: { 
    line: { width: 15, color: '#ff0' }, 
    poly: { color: '8000ffff' } 
  } 
}); 
gex.edit.drawLineString(placemark.getGeometry().getOuterBoundary()); 
return placemark;  
} 
 
function EditPoly() 
{ 
gex.dom.clearFeatures(); 
var placemark = gex.dom.addPlacemark({ 
  lineString: [[0,0], [0,1], [1,1], [1,0]], 
  style: { 
    line: { width: 15, color: '#ff0' }, 
    poly: { color: '8000ffff' } 
  } 
}); 
 
gex.edit.editLineString(placemark.getGeometry()); 
} 
 
 
 
function EditMyMark() 
{ 
gex.dom.clearFeatures(); 
var pm = gex.dom.addPointPlacemark([0, 0], { 
  name: 'Champion', 
  icon: { 
    stockIcon: 'paddle/blu-circle', 
    hotSpot: { left: '50%', bottom: 0 } 
  } 
}); 
 
var draggingStyle = gex.dom.buildStyle({ 
  icon: { 
    stockIcon: 'paddle/red-circle', 
    hotSpot: { left: '50%', bottom: 0 } 
  } 
}); 
 
gex.edit.makeDraggable(pm, { 
  dropCallback: function() { 
    gex.edit.endDraggable(pm); 
  }, 
  draggingStyle: draggingStyle, 
  targetScreenOverlay: { 
    icon: 'http://maps.google.com/mapfiles/kml/shapes/cross-hairs.png', 
    overlayXY: { left: '50%', top: '50%' }, 
    screenXY: { left: 0, top: 0 }, 
    size: { width: 32, height: 32 } 
  } 
}); 
 
} 
 
 
 
function GetMyPoint() 
{ 
 
var myID= "foo";  
 gex.dom.addPointPlacemark(gex.util.getLookAt(), { name: 'Hello World!' });  
 
 
    
} 
 
 
 
 
function Setcenter() 
{ 
 
var map = new gex.document.getElementById("googlemap");  
        map.setCenter(new GLatLng(30.65, 104.08), 14);  
 
}