diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 977dcf92a..a383e6035 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -92,6 +92,10 @@ void MapContext::triggerUpdate(const TransformState& state, const Update flags) } void MapContext::setStyleURL(const std::string& url) { + if (styleURL == url) { + return; + } + FileSource* fs = util::ThreadContext::getFileSource(); if (styleRequest) { @@ -121,6 +125,10 @@ void MapContext::setStyleURL(const std::string& url) { } void MapContext::setStyleJSON(const std::string& json, const std::string& base) { + if (styleJSON == json) { + return; + } + styleURL.clear(); styleJSON = json;