小编sha*_*ter的帖子

从样式化的Google地图中删除室内地图

我正在尝试用波士顿地铁线路,陆地和水制作风格的谷歌地图.我将所有东西的可见性设置为关闭,但是一些建筑物仍然出现,它看起来像是唯一带有室内地图的建筑物.

这是我的代码:

<html>

<head>
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">

    var lat = 42.3581;
    var long = -71.0636;
    google.maps.visualRefresh = true;

    function initialize()
    {
        var mapStyle =
        [
            {
                featureType: 'administrative',
                elementType: 'all',
                stylers:
                [
                    { visibility: 'off' }
                ]
            },
            {
                featureType: 'landscape',
                elementType: 'all',
                stylers:
                [
                    { visibility: 'off' }
                ]
            },
            {
                featureType: 'poi',
                elementType: 'all',
                stylers:
                [
                    { visibility: 'off' }
                ]
            },
            {
                featureType: 'road',
                elementType: 'all',
                stylers:
                [
                    { visibility: 'off' }
                ]
            },
            { …
Run Code Online (Sandbox Code Playgroud)

google-maps google-maps-api-3

5
推荐指数
1
解决办法
1610
查看次数

标签 统计

google-maps ×1

google-maps-api-3 ×1