2
웹 화면에지도를 표시하기 위해 노력하고 있습니다. 하지만 그것을 표시하는 동안 일부 오류가 발생했습니다.gmap3을 통해지도를 표시하는 중 오류가 발생했습니다.
오류 : -
TypeError: $("#driver_map").gmap3 is not a function
코드 : -
%script{:src=>'../assets/public/js/gmap3.js'}
%script{:src=>'http://maps.google.com/maps/api/js?sensor=false' :type=>'text/javascript'}
%script{:src=>'../assets/public/js/jquery-1.6.4.js'}
%html
%head
%body
%div{:id=>"driver_map"}
:javascript
$(function(){
$('#driver_map').gmap3(
{ action:'init',
options:{
center:[46.578498,2.457275],
zoom: 5
}
},
{ action: 'addMarkers',
markers:[
{lat:48.8620722, lng:2.352047, data:'Paris !'},
{lat:46.59433,lng:0.342236, data:'Poitiers : great city !'},
{lat:42.704931, lng:2.894697, data:'Perpignan ! <br> GO USAP !'}
],
}
);
});
날이 오류를 해결하는 데 도움이 바랍니다.