[core] [android] Fix InfoWindow topOffsetPixels adjustment when switching styles

Fixes #2599
Make getTopOffsetPixelsForAnnotationSymbol private
Also implements MapChangeWillStartLoadingMap, MapChangeDidFinishLoadingMap
Paritally implements #630
This commit is contained in:
Leith Bade
2015-10-12 10:56:41 +11:00
parent 4ea8e4bc0a
commit 2ee7b02189
9 changed files with 109 additions and 49 deletions

View File

@@ -74,6 +74,10 @@ void Map::renderSync() {
} else if (renderState != RenderState::fully) {
renderState = RenderState::fully;
view.notifyMapChange(MapChangeDidFinishRenderingMapFullyRendered);
if (data->loading) {
data->loading = false;
view.notifyMapChange(MapChangeDidFinishLoadingMap);
}
}
// Triggers an asynchronous update, that eventually triggers a view
@@ -93,10 +97,12 @@ void Map::update(Update flags) {
#pragma mark - Style
void Map::setStyleURL(const std::string &url) {
view.notifyMapChange(MapChangeWillStartLoadingMap);
context->invoke(&MapContext::setStyleURL, url);
}
void Map::setStyleJSON(const std::string& json, const std::string& base) {
view.notifyMapChange(MapChangeWillStartLoadingMap);
context->invoke(&MapContext::setStyleJSON, json, base);
}