From: Varun Date: Tue, 18 Oct 2016 01:54:08 +0000 (-0400) Subject: Fix: Bug with when to do a readyMapCb X-Git-Tag: submit/tizen_3.0/20161108.012559~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F92810%2F4;p=platform%2Fcore%2Flocation%2Fmaps-plugin-mapzen.git Fix: Bug with when to do a readyMapCb Change-Id: I7aff7bd8a6b791f1b7987e218a9167ed39355572 --- diff --git a/src/mapzen/tangram_view.cpp b/src/mapzen/tangram_view.cpp index 6acc2d8..5116220 100644 --- a/src/mapzen/tangram_view.cpp +++ b/src/mapzen/tangram_view.cpp @@ -135,6 +135,10 @@ mapzen_error_e TangramView::create(maps_view_h view, maps_plugin_map_view_ready_ m_map->resize(m_w, m_h); + if (m_w > 1 && m_h > 1) { + readyMapCb((void*)view); + } + m_isInitialized = true; return MAPZEN_ERROR_NONE; @@ -245,7 +249,7 @@ mapzen_error_e TangramView::render(maps_view_h view, const maps_coordinates_h co m_h = MAX(m_h, 1); if (x != m_x || y != m_y || w != m_w || h != m_h) { - if (m_x == 0 && m_y == 0 && x > 0 && y > 0) { + if ( (m_w <= 1 || m_h <= 1) && w > 1 && h > 1) { // Send a tangram view ready callback when we have a legit canvas size readyMapCb((void*)view); }