本家の料金表を見てもいまいちよくわからないのですが、
https://cloud.google.com/maps-platform/pricing/sheet/?hl=ja
下記関数を利用した場合には、どのカテゴリのAPIに該当するのでしょうか?
new google.maps.Map : Static Maps ?
new google.maps.Marker : ?
new google.maps.LatLng : ?
new google.maps.Polyline : ?
new google.maps.DirectionsRenderer( rendererOptions ) : Directinos API?
new google.maps.DirectionsService() : Directions API ?
directionsService.route(request, function (response, status) {}) : Directions API?
また、例えばmarkerの設定をするのに、new google.maps.Markerやnew google.maps.MarkerImage、new google.maps.Sizeなどを利用した場合、その1つ1つが課金対象なのでしょうか?
javascript
1var marker = new google.maps.Marker({ 2 position: mylatlng, 3 map: map, 4 icon : new google.maps.MarkerImage( 5 // マーカーの画像URL 6 'image/marker.png', 7 // マーカーのサイズ 8 new google.maps.Size(45, 45), 9 // 画像の基準位置 10 new google.maps.Point(0, 0), 11 // Anchorポイント 12 new google.maps.Point(10, 24) 13 ) 14 });
どなたか詳しくご教示頂ければ幸甚で御座います。
###テストコード
javascript
1 function calcRoute(startLatLng,targetLatLng){ 2 var request = { 3 origin: new google.maps.LatLng(startLatLng[0], startLatLng[1]), // スタート地点 4 destination: new google.maps.LatLng(targetLatLng[0], targetLatLng[1]), // ゴール地点 5 travelMode: google.maps.DirectionsTravelMode.WALKING // 移動手段 6 }; 7 8 directionsService.route(request, function (response, status) { 9 if(directionsDisplay){ 10 directionsDisplay.setMap(null); 11 directionsDisplay.setPanel(null); 12 } 13 14 if (status === google.maps.DirectionsStatus.OK) { 15 var rendererOptions = { 16 map: map, // 描画先の地図 17 draggable: true, // ドラッグ可 18 //preserveViewport: true // centerの座標、ズームレベルで表示 19 suppressMarkers: true // デフォルトのマーカーを削除 20 }; 21 directionsDisplay = new google.maps.DirectionsRenderer( rendererOptions ); 22 directionsDisplay.setDirections( response ); 23 directionsDisplay.setMap(map); 24 25 /*ルートの詳細表示*/ 26 directionsDisplay.setPanel(document.getElementById("directions_panel")); 27 28 /* 出発地点・到着地点マーカーが移動された時 */ 29 google.maps.event.addListener(directionsDisplay, 'directions_changed',function() { 30 currentDirections=directionsDisplay.getDirections(); 31 var route=currentDirections.routes[0]; 32 var s=""; 33 for(var i=0; i<route.legs.length; i++) { 34 var routeSegment=i+1; 35 s+=route.legs[i].start_address+'to'; 36 s+=route.legs[i].end_address+'\n'; 37 s+=route.legs[i].distance.text; 38 } 39 dbg("directions_changed:"+s); 40 }); 41 } 42 }); 43 }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/12/11 09:52
2018/12/11 10:01
2018/12/11 10:14
2019/02/19 09:52