private void OnStartDownloadTile(OnlineMapsTile tile) { Texture tileTexture = new Texture(); // Here your code to load tile texture from any source. // Apply your texture in the buffer and redraws the map. if (api.target == OnlineMapsTarget.texture) { // Apply tile texture tile.ApplyTexture(tileTexture as Texture2D); // Send tile to buffer api.buffer.ApplyTile(tile); } else { // Send tile texture tile.texture = tileTexture as Texture2D; // Change tile status tile.status = OnlineMapsTileStatus.loaded; } // Redraw map (using best redraw type) api.CheckRedrawType(); }
private void OnStartDownloadTile(OnlineMapsTile tile) { Texture tileTexture = new Texture(); // Here your code to load tile texture from any source. // Apply your texture in the buffer and redraws the map. if (map.target == OnlineMapsTarget.texture) { // Apply tile texture tile.ApplyTexture(tileTexture as Texture2D); // Send tile to buffer map.buffer.ApplyTile(tile); // Destroy the texture, because it is no longer needed. OnlineMapsUtils.DestroyImmediate(tileTexture); } else { // Send tile texture tile.texture = tileTexture as Texture2D; // Change tile status tile.status = OnlineMapsTileStatus.loaded; } // Redraw map (using best redraw type) map.CheckRedrawType(); }
private void OnStartDownloadTile(OnlineMapsTile tile) { Texture tileTexture = new Texture(); // Here your code to load tile texture from any source. // Apply your texture in the buffer and redraws the map. if (api.target == OnlineMapsTarget.texture) { tile.ApplyTexture(tileTexture as Texture2D); api.buffer.ApplyTile(tile); } else { tile.texture = tileTexture as Texture2D; tile.status = OnlineMapsTileStatus.loaded; } api.CheckRedrawType(); }