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.21k stars 2.22k forks source link

Fallback images are not working with manually added image #9900

Closed francois2metz closed 4 years ago

francois2metz commented 4 years ago

mapbox-gl-js version: 1.11.1

browser: Firefox, Chrome and I believe all others

Steps to Trigger Behavior

  1. Load and add an image with addImage named custom-marker
  2. Load a geojson source (or any other source) with points
  3. Style the points with an icon-image with a fallback
'icon-image': ["coalesce",
  ['image', 'nonexistant'],
  ['image', 'custom-marker']
]

Link to Demonstration

I updated the example "Draw GeoJSON points" to reproduce it https://docs.mapbox.com/mapbox-gl-js/example/geojson-markers/

https://jsfiddle.net/5ga36cnw/3/

Expected Behavior

The Mapbox DC office should display the custom marker

Actual Behavior

The Mapbox DC office don't display any marker

Additional stuff

karimnaaji commented 4 years ago

This will be available in 1.12, thanks for the contribution @francois2metz !