2013-09-26 1 views
0

의지도 이미지의 원인 :는 내가이지도가 샘플 코드를 실행 한지도가 자바 스크립트 API

MQA.EventUtil.observe(window, 'load', function() { 
/*Create an object for options*/ 
var options={ 
    elt:document.getElementById('map'),  /*ID of element on the page where you want the map added*/ 
    zoom:10,         /*initial zoom level of the map*/ 
    latLng:{lat:39.743943, lng:-105.020089}, /*center of map in latitude/longitude */ 
    mtype:'map',        /*map type (map)*/ 
    bestFitMargin:0,       /*margin offset from the map viewport when applying a bestfit on shapes*/ 
    zoomOnDoubleClick:true     /*zoom in when double-clicking on map*/ 
}; 

/*Construct an instance of MQA.TileMap with the options object*/ 
window.map = new MQA.TileMap(options); 
}); 

하고 확인지도를 생성합니다. 그러나 생성 된 HTML을 보면지도 데이터의 출처가 명확하지 않습니다. 나는 어쩌면 iframe이, 또는 이미지를 기대했지만, 난 볼 하나하지 않습니다

<div id="map" style="width: 800px; height: 300px; position: relative;"> 
<div style="width: 800px; height: 300px; z-index: 0; overflow: hidden; background: none repeat scroll 0% 0% rgb(255, 255, 255); position: relative; top: 0px; left: 0px; cursor: -moz-grab;"> 
<div class="mqa-display" style="position: absolute; z-index: 0;"> 
<div class="mqa-zl mqa-zl100 mqa-zlf" style="position: absolute; z-index: 100; cursor: default;"> 
<div class="mqa-zl mqa-zl0 mqa-zlgl" style="position: absolute; z-index: 0; left: 400px; top: 150px;"> 
<div class="mqa-zl mqa-zl10 mqa-zlf" style="position: absolute; z-index: 22;"> 
<div class="mqa-zl mqa-zl1000 mqa-zlf" style="position: absolute; z-index: 1000;"> 
<div class="mqa-zl mqa-zl1000 mqa-zlgl" style="position: absolute; z-index: 1000; left: 400px; top: 150px;"> 
<div class="mqa-zl mqa-zl5 mqa-zlgl" style="position: absolute; z-index: 5; left: 400px; top: 150px;"> 
</div> 
</div> 
</div> 

어떻게 그 HTML 콜로라도의 상세지도를 나타 냅니까?

감사

답변

3

당신이 자바 스크립트 API에 의해 생성 참조지도를 다운로드 및지도를 만드는 조립지도 이미지 타일의 집합에 의해 생성된다. 사용자가 팬하고 확대/축소 할 때 추가 타일이 다운로드됩니다.

지도 타일은 전세계에있는 다양한 서버에서 캐시되고 호스팅됩니다.

+0

확인. 그러나 위에 표시된 div # map HTML가이 div에 제공된 타일을 얻는 방법은 무엇입니까? – Steve

관련 문제