私はSamsung Smart TV 2012と基本的にHTML5とJavaScript用のアプリを製作しています。 GoogleマップV3は非常にうまく動作しますが、その1つです。 テレビには十分な処理能力がないため、スムーズなエフェクトがひどく見えます。 最大の問題は、スムーズなsetZoom()です。 私の質問:方法や多分滑らかなズームを無効にするパラメータですか? 、またはマップ全体のすべてのスムーズエフェクトを無効にすることができますか? ありがとうございます!Google Maps API V3はスムーズにズームを無効にします
5
A
答えて
10
はい、スムーズズームを無効にすることができます。しかし、いくつかの変化があります。 V2では、disableContinuousZoom()だけで問題を解決できますが、この新しいバージョンでは、Googleのユーザーはそれを実装していませんでした。
これが最初の可能性である(と私の意見で最悪...):
* {
-webkit-transition-property: none!important;
transition-property: none!important;
/* These doesn't affect anything, but, just in case. */
-webkit-animation: none!important;
animation: none!important;
}
(このソリューションの引用元:http://code.google.com/p/gmaps-api-issues/issues/detail?id=3033&q=continuous%20zoom&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal)他のソリューション
、と私は考えて、最高の、 OpenLayersを実装したものです。
/**
* APIMethod: setMapObjectCenter
* Set the mapObject to the specified center and zoom
*
* Parameters:
* center - {Object} MapObject LonLat format
* zoom - {int} MapObject zoom format
*/
setMapObjectCenter: function(center, zoom) {
if (this.animationEnabled === false && zoom != this.mapObject.zoom) {
var mapContainer = this.getMapContainer();
google.maps.event.addListenerOnce(
this.mapObject,
"idle",
function() {
mapContainer.style.visibility = "";
}
);
mapContainer.style.visibility = "hidden";
}
this.mapObject.setOptions({
center: center,
zoom: zoom
});
},
これはあなたのスタイルでマップコンテナを使用しているため、かなり奇妙ですが、あなたのケースで異なり、おそらく最良の解決策はTHIでありますs!
0
それはgmaps docsではないのですが、これは私の作品:!!、CSSを使用したものferran87
map = new google.maps.Map(el, {animatedZoom: false});
+0
2011年4月17日のように、この文書化されていない設定はまだ私のために働いていました。 – MattGerg
関連する問題
- 1. Maps APIをV3:Google MapsのAPI V3で
- 2. Google Maps API V3の地図を中心にズームする
- 3. google maps api v3はズーム用のマルチタッチをサポートしていますか?
- 4. Google Maps API v3オーバーレイ
- 5. GWT + Google Maps API v3
- 6. Google Maps JavaScript API v3
- 7. Google Maps API V3 - ポリゴンスムージドエッジ
- 8. Google Maps API V3グレーエリア
- 9. Google Maps API V3プロットアドレス
- 10. Google Maps API V3 infowindow
- 11. google maps api v3 - マップデータホワイトブロックマップ
- 12. GoogleマップV3 APIキーローカルコンピュータエラー:GoogleアプリケーションでMaps APIの使用を無効にしました
- 13. PHPはGoogle Maps API V3内
- 14. は、infowindow google maps api(v3)
- 15. ズーム付きのカスタム画像マーカーのサイズ変更 - Google Maps API v3
- 16. Google Maps API Javaデフォルトのズーム
- 17. Google Maps API v3のチュートリアル
- 18. Google Maps API v3マーカー座標
- 19. Google MapsのAPI V3 TrafficLayerウィジェット
- 20. Google Maps API v3:図面マネージャ
- 21. MVC 4とGoogle Maps API v3
- 22. google maps api v3 expandボタン
- 23. Google Maps API v3 JS map.fitbounds
- 24. Google Maps API v3(PHPとJavascript)
- 25. どのV3 Google MapsのAPI
- 26. Google Maps API V3のエラー
- 27. Google Maps Api V3 - StreetView enableCloseButton
- 28. Googleマップのドラッグ、ズーム、カーソルの変更を無効/有効にする方法v3
- 29. JQueryを使用してGoogle Maps API(V3)のinfoWindow/Box内のリンクを無効にしますか?
- 30. Google Maps API v3ストリートビュー "google is not defined"
大きな感謝は私のためにかなり良い仕事を!申し訳ありませんが投票に十分な評判を持っていません.. – codeTemplar
問題なしcodeTemplar! :p – ferran87