Fix style diff warning when reusing map (#816)

This commit is contained in:
Xiaoji Chen 2019-06-04 18:18:54 -07:00 committed by Xiaoji Chen
parent 435bb15cb6
commit e6cce42477

View File

@ -271,7 +271,9 @@ export default class Mapbox {
// Step3: update style and call onload again
if (props.mapStyle) {
this._map.setStyle(props.mapStyle, {
diff: true
// From the user's perspective, there's no "diffing" on initialization
// We always rebuild the style from scratch when creating a new Mapbox instance
diff: false
});
}