0
안녕하세요 저는 sencha touch v.2.2.1 google maps에 마커를 추가하려고합니다. 나는지도를 볼 수 있지만 마커는 볼 수 없다. 나는 응용 프로그램을 테스트하기 위해, 구글 크롬을 사용하고 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
Sencha Touch에 마커 추가
config: {
items: [{
xtype: 'map',
itemId: 'mapHomeView',
width: Ext.os.deviceType == 'Phone' ? null : 1500,
height: Ext.os.deviceType == 'Phone' ? null : 350,
useCurrentLocation: true,
listeners: {
maprender: function(extMapComponent, googleMapComp){
var marker = new google.maps.Marker({
title: 'test',
position: new google.maps.LatLng (49.279989, -123.126333),
map: Ext.ComponentQuery.query('#mapHomeView')[0].map,
// map: googleMapComp,
});
marker.setMap(Ext.ComponentQuery.query('#mapHomeView')[0].map);
}
}]
}
: 나는 또한 필요한 lib 디렉토리를 추가했다. 설정에서 위치 요청을 활성화했습니다.
라인 맵 : ... 또는 주석 처리 된지도 : ... 라인이 작동하지 않습니다.