mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.25k stars 2.23k forks source link

map.setConfigProperty('basemap', 'show3dObjects', false) in standard style doesn't work anymore in 3.6.0 #13252

Closed romka-best closed 3 months ago

romka-best commented 3 months ago

mapbox-gl-js version: 3.6.0

browser: Google Chrome. Version 127.0.6533.119

Steps to Trigger Behavior

  1. Initialize the map, for example:
    const mapInstance = new Map({
      container: mapContainer.current,
      zoom: MAP_MIN_ZOOM,
      pitch: MAP_ANIMATION_PITCH,
      center: MAP_CENTER,
      interactive: true,
      accessToken: process.env.NEXT_PUBLIC_MAPBOX_TOKEN,
    });
  2. Wait, when map will be loaded, for example:
    mapInstance.on('load', () => {});
  3. In 'load' event set config property 'show3dObjects' to false, for example:
    mapInstance.on('load', () => {
     mapInstance.setConfigProperty('basemap', 'show3dObjects', false);
    });

Expected Behavior

No 3D objects appear on the map

Actual Behavior

All 3D objects appear on the map

mourner commented 3 months ago

Thanks for the report! Confirmed, we'll look into fixing it on the server side shortly (the root cause is Standard v1 being served to v3.6.0 instead of Standard v2).

mourner commented 3 months ago

Should work properly now.