jquery가 포함 된 Google지도 v3에 맞춤 컨트롤을 추가하려면 어떻게해야하나요?google maps api
3
A
답변
7
당신은 당신이 그 (것)들을지도 자체에서 수행 할 기능에 사용자 지정 컨트롤의 요소를 결합해야 할 필요가 있지만, 다음과 같이, DOM을 조작 할 jQuery를 사용하여 사용자 정의 컨트롤을 추가 뭔가를
:
$(function() {
var myOptions = {
...
mapTypeControl: false
}
map = new google.maps.Map($mapDiv, myOptions);
...
// Remove the custom control from the DOM to memory
$control = $(".myControlSelector").detach();
// Push the control to the top right position on the map
map.controls[google.maps.ControlPosition.TOP_RIGHT].push($control[0]);
});
추가 설명서는 다음 위치 http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomControls
1
일례 jQuery Google Maps plugin를 사용하는 태그 필터링 제어부를 추가 "Filter Markers Example"근처의 하단을 참조.
비슷한 예제와 동일한 jQuery 플러그인을 사용하는 here (소스, 전화/태블릿/데스크톱).
관련 문제
- 1. Google Maps Data API와 Google Maps API
- 2. Grails + Google Maps API
- 3. GeoLocation + Google Maps API?
- 4. Google Maps API 마커 제목
- 5. Google Maps API 경계 오류
- 6. Google Maps 용 Java API
- 7. 로컬로 Google Maps API 테스트
- 8. Google Maps API Geocode Synchronously
- 9. Google Maps API for Blackberry
- 10. Google Maps API : 우편 번호
- 11. Google Maps API v3 BrowserIsCompatible
- 12. Google Maps API vs Multimap/Bing Maps API
- 13. MapActivity (Google Maps API)의 Google Maps 고급 기능
- 14. Google Maps API 키는 언제 필요합니까?
- 15. Google Maps API DirectionsRendererOptions이 작동하지 않습니까?
- 16. jqtouch/google maps api v3 문제
- 17. Google Maps API v3의 경계 재설정
- 18. Google Maps Javascript API V3 - Continuous Panning
- 19. 이스라엘의 Android 및 Google Maps API
- 20. jQuery 및 Google Maps API V3 - 시작하기
- 21. API google maps 및 GPolyline의 문제
- 22. Google Maps API 키가 정말로 필요합니까?
- 23. Google Maps API v3의 마커 켜기/끄기
- 24. Mapkit은 Google Maps API V3을 사용합니까?
- 25. google maps api v2 - 수만 건의 마커
- 26. Google Maps API - GMarker.openInfoWindowHtml() 작동이 중지되었습니다.
- 27. 역 지오 코딩을위한 google maps API 사용하기
- 28. Google Maps API 3 로딩 아이콘
- 29. Drupal 모듈 google maps api 스크립트 추가
- 30. Google Maps API 범위 : Safari에없는 FF에서 작동합니까?
어떤 종류의 컨트롤입니까? 자세한 내용을 참조하십시오 ... – Michal
지도 유형 선택 컨트롤과 마찬가지로, 나는 그것에 대한 내 자신의 컨트롤을 사용하고 싶습니다. – Amit