次のコードを使用して、API から json データを取得しています。
$.getJSON( '../propertylocator/api/configurations', function(data) {
$.each( data.rows, function(i, rows) {
//var homeLatlng= new google.maps.LatLng(0, -180);
$('#map_canvas').gmap('addShape', {
'Polyline': new google.maps.LatLng(rows.latitude, rows.longitude),
'bounds': true
}).click(function() {
$('#map_canvas').gmap('openInfoWindow', { 'content': '<strong><a href="detailPage.php?id='+ rows.propertyid +'">'+rows.propertyname+'</a></strong><br/>'+rows.propertyoverview }, this);
});
});
正常に動作しますが、昨日、暗号化されたパスワードを使用した基本認証を Web アプリに含めました。json API を取得するときに認証するために、このコードに認証を含めるにはどうすればよいですか?
ありがとう