0
My Map에서 프로젝트를 완료하는 동안 API V2가 2013 년부터 더 이상 지원되지 않는다는 사실을 발견했습니다. 업그레이드 프로세스를 생각하기 시작했습니다. V3를 문서에에 설명 된대로Google Maps API V2를 V3로 업그레이드
나는이
function initialize() {
var myLatLng = new google.maps.LatLng(24.886436490787712, -70.2685546875);
var myOptions = {
zoom: 5,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var bermudaTriangle;
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var triangleCoords = [
new google.maps.LatLng(25.774252, -80.190262),
new google.maps.LatLng(18.466465, -66.118292),
new google.maps.LatLng(32.321384, -64.75737),
new google.maps.LatLng(25.774252, -80.190262)
];
// Construct the polygon
// Note that we don't specify an array or arrays, but instead just
// a simple array of LatLngs in the paths property
bermudaTriangle = new google.maps.Polygon({
paths: triangleCoords,
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#FF0000",
fillOpacity: 0.35
});
bermudaTriangle.setMap(map);
}
있습니다. 그러나 v3는 현재 구현에서 사용하는 GXmlHttp를 사용하지 않는다는 것을 이해합니다. 나는 Use Php MySQL w/ V3과 비슷한 경로로 가야한다고 가정하고 있습니다. 그러나이 메소드를 Point of Polygon 함수와 함께 사용하는 방법에 관해서는 약간 혼란 스럽습니다.
모든 조언을 주시면 감사하겠습니다. 고맙습니다!
감사합니다. 방금 전에 다이빙을하기 전에 입력을 찾고 업그레이드해야한다는 것을 알았습니다. – mcmonty
Re : Polygon을 가리 킵니다. GMap V3에는 새로운 유틸리티 함수 containsLocation (point, polygon)이 있습니다. [Geometry Library reference] (http://code.google.com/apis/maps/documentation/javascript/reference.html#poly)를 참조하십시오. –