在Javascript googlemaps api中启用liteMode [英] Enabling liteMode in Javascript googlemaps api
本文介绍了在Javascript googlemaps api中启用liteMode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们使用JavaFX的WebView嵌入了一个网页,我们希望使用Google地图的 javascript API 和 ng-map 。
We are using JavaFX' WebView to embed a webpage where we want to display map content using google map's javascript API and ng-map.
NgMap.getMap().then(function (map) {
map.setOptions({
maxZoom: 17,
streetViewControl: true,
// liteMode: true, // that would be cool :-)
streetViewControlOptions: {
position: google.maps.ControlPosition.TOP_RIGHT },
keyboardShortcuts: false,
//... ommited for brevity
});
});
由于WebView不支持WebGL ,我们需要找到一种方法来启用 lite模式 (因为使用 android API )。有没有人知道一种方法来实现这一目标?
As WebView is not supporting WebGL we need to find a way to enable lite mode (as it is possible when using the android API). Does anyone know a way to achieve this?
推荐答案
当我只通过URL在一个JavaFX WebView中加载谷歌地图时,在lite模式下。你确定这不会发生吗?
When I just load google maps in a JavaFX WebView via URL I automatically end up in the lite mode. Are you sure this does not happen for you too?
这篇关于在Javascript googlemaps api中启用liteMode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文