Skip to content

Fix bug causing queryRenderedFeatures to crash on polygon features that have an id field. #4494

Description

@gmaclennan

mapbox-gl-js version: v0.34.0

Steps to Trigger Behavior

  1. Add a GeoJSON polygon source with non-integer (string) ids
  2. Call map.queryRenderedFeatures() on mousemove

Expected Behavior

map.queryRenderedFeatures() should return an array of features under the mouse pointer

Actual Behavior

Uncaught Error: Unimplemented type: 7

I have created a JSFiddle of the failing code: https://jsfiddle.net/p78o8exf/6/

This code works fine with v0.32.1 but since v0.33 it is broken. This is valid GeoJSON (checked with @mapbox/geojsonhint).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions