Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate_layout_property.js:14Uncaught TypeError: Cannot read property 'visibility' of undefined #3125

Closed
binchen123 opened this issue Sep 1, 2016 · 6 comments

Comments

@binchen123
Copy link

According to the instructions which is contained in CONTRIBUTING.md file of mapbox-gl-js/building_redux_renderbuffer_dds branch, I finished the preparation of development enviroment.After starting the web server with commandline(mapbox_accesstoken={X} npm run start-debug),I try to browse index.html page with firefox.Unfortunately,the error occured(see the title).Could you tell me why?What shoud I do?

@binchen123
Copy link
Author

mapbox_streets_v8.json:
{
"version": 8,
"name": "Mapbox Streets",
"metadata": {
"mapbox:autocomposite": true
},
"sources": {
"composite": {
"url": "mapbox://nicki.bmpkqj9z",
"type": "vector"
}
},
"sprite": "mapbox://sprites/mapbox/streets-v8",
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"layout": {
"visibility": "visible"
},
"paint": {
"background-color": "#999"
},
"interactive": true
},

    {
        "interactive": true,
        "layout": {
            "visibility": "visible",
            "line-cap": "round",
            "line-join": "round"
        },
        "type": "line",
        "source": "composite",
        "id": "road-motorway-case",
        "paint": {
            "line-width": {
                "base": 1.5,
                "stops": [
                    [
                        5,
                        0.75
                    ],
                    [
                        18,
                        20
                    ]
                ]
            },
            "line-color": {
                "base": 1,
                "stops": [
                    [
                        5.9,
                        "#fff"
                    ],
                    [
                        6,
                        "#fff"
                    ]
                ]
            },
            "line-opacity": {
                "base": 1.2,
                "stops": [
                    [
                        5,
                        0
                    ],
                    [
                        5.5,
                        1
                    ]
                ]
            }
        },
        "source-layer": "road"
    },
    {
        "interactive": true,
        "layout": {
            "visibility": "none"
        },
        "type": "fill",
        "source": "composite",
        "id": "building-fill",
        "paint": {
            "fill-color": "#f00",
            "fill-opacity": 1,
            "fill-outline-color": "#0f0"
        },
        "source-layer": "building"
    },
    {
      "layout": {
        "visibility": "visible"
      },
      "type": "extrusion",
      "source": "composite",
      "id": "buildingtada",
      "filter": ["in", "extrude", "true"],
      "paint": {
        "extrusion-color": "#fff",
        "extrusion-antialias": true,
        "extrusion-outline-color": "#f00",
        "extrusion-opacity": 1,
        "extrusion-shadow-color": "#00f",
        "extrusion-lighting-anchor": "viewport"
      },
      "source-layer": "building",
      "interactive": true
    },
    {
        "id": "road-label",
        "type": "symbol",
        "source": "composite",
        "source-layer": "road_label",
        "interactive": true,
        "filter": [
            "all",
            [
                "in",
                "$type",
                "LineString",
                "Point",
                "Polygon"
            ],
            [
                "in",
                "class",
                "motorway",
                "pedestrian",
                "primary",
                "secondary",
                "street",
                "street_limited",
                "tertiary"
            ]
        ],
        "layout": {
            "text-field": "{name_en}",
            "symbol-placement": "line",
            "text-size": 16,
            "text-font": [
                "DIN Offc Pro Cond Medium",
                "Arial Unicode MS Regular"
            ],
            "text-transform": "uppercase"
        },
        "paint": {}
    },
    {
        "id": "poi-label",
        "type": "symbol",
        "source": "composite",
        "source-layer": "poi_label",
        "interactive": true,
        "filter": [
            "<=",
            "scalerank",
            3
        ],
        "layout": {
            "visibility": "visible",
            "text-field": "{name_en}",
            "text-font": [
                "DIN Offc Pro Regular",
                "Arial Unicode MS Regular"
            ],
            "text-size": 12
        },
        "paint": {
            "text-halo-width": 1,
            "text-halo-color": "#fff"
        }
    }
]

}

@jfirebaugh
Copy link
Contributor

mapbox-gl-js/building_redux_renderbuffer_dds branch

Sorry, we can't provide support for branches other than master. They may be in progress, out of date, or otherwise not working for a variety of reasons.

@binchen123
Copy link
Author

Firstly,thanks to jfirebaugh.As you said the community can't provie help for branch other than master,but the discussion about 3d extrusion(building) rendering on mapbox-gl-js is up to date(thread:mapbox/mapbox-gl-style-spec#456 you tell me which branch could do the 3d extrusion rendering(buildings) or what I should do?

@jfirebaugh
Copy link
Contributor

Most likely, you should simply wait until we've released the feature in an officially supported version.

You're welcome to try out in progress work, but we can't provide technical support for it -- doing so would take away from the limited time we have, which we want to use to work on the feature itself.

@binchen123
Copy link
Author

Thanks again.I am now debugging the issue.

@binchen123
Copy link
Author

John Firebaugh:I solved the issue,thank you.

[image: 内嵌图片 1]

2016-09-02 8:57 GMT+08:00 John Firebaugh notifications@github.com:

Most likely, you should simply wait until we've released the feature in an
officially supported version.

You're welcome to try out in progress work, but we can't provide technical
support for it -- doing so would take away from the limited time we have,
which we want to use to work on the feature itself.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AT_kEr1pv-jddgbdbkftK-bbvOPfc78Oks5ql3RpgaJpZM4JyfiD
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants