Enabling liteMode in Javascript googlemaps api

喜夏-厌秋 提交于 2020-01-16 04:11:07

问题


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
                });
            });

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?


回答1:


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?



来源:https://stackoverflow.com/questions/35993452/enabling-litemode-in-javascript-googlemaps-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!