3
어떻게 이것을 v3으로 포팅 할 수 있습니까? removeOverlay는 v3에 포함되어 있지 않습니다.Google지도 API v3의 removeOverlay
if(mapElements[lMapElementIndex]['marker'] != 0){
//map.removeOverlay(mapElements[lMapElementIndex]['marker']); V2
}
V3?
if(mapElements[lMapElementIndex]['marker'] != 0){
//map.removeOverlay(mapElements[lMapElementIndex]['marker']);
mapElements(mapElements[lMapElementIndex]['marker']).setMap(null);
} //but throws an error mapElements is not a function
감사합니다 setMap (null) ... 알고 있지만 rlly 확실히이 removeFromMap (lMapElementIndex) 함수를 변경하려면 어떻게합니까 (http://pastebin.com/EFwnngnR 참조) 줄 : 573 – Jim
At 언뜻 보면 591 행을 내 대답의 코드 행으로 변경해야하는 것처럼 보입니다. 현재 당신은'setMap'을 단지 숫자 일 것이라고 생각하고 있습니다. –
오류 제가 \t로 변경 사라진 경우 '(mapElements [lMapElementIndex] ['마커 ']! = 0) { \t \t //map.removeOverlay(mapElements[lMapElementIndex]['marker']); v2 \t \t mapElements [lMapElementIndex] [ 'marker']. setMap (null); \t \t console.log ("[lMapElementIndex] [ 'marker'] Löschen"); \t} ' – Jim