From e6cce424773302d3e00efdfc67f14746ac47f3db Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Tue, 4 Jun 2019 18:18:54 -0700 Subject: [PATCH] Fix style diff warning when reusing map (#816) --- src/mapbox/mapbox.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mapbox/mapbox.js b/src/mapbox/mapbox.js index f759d003..0a3a778d 100644 --- a/src/mapbox/mapbox.js +++ b/src/mapbox/mapbox.js @@ -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 }); }