次のコードを検討してください。
$('.stores').click(function() {
console.log($(this).data('latitude')); // -1754.26265626
console.log($(this).data('longitude')); // 65.262518
console.log(themap); // Properly a Google Map instance.
themap.setCenter(new LatLng($(this).data('latitude'), $(this).data('longitude')));
});
ドキュメントによると、この方法を使用してsetCenter
簡単にマップを中央に配置できますが、ドキュメントが使用している表記法がわかりません。
見る:
LatLng(lat:number, lng:number, noWrap?:boolean)
これをどのように正確に使用しますか?
エラーが発生します:
Uncaught ReferenceError: LatLng is not defined