Hi
Question
For my application,
1) When I am online (To the office with Wifi), I need to load Wmts tiles.
The user choose just a region by is name and my application read the bounding box of this region.
With the bounding box and many zoom level , I want to load the tiles and save them in a tilecache Sqlite.
The user see just a progress bar.
2) When I am offline, the application use the tilecache. No problem.
Do you have a process description to make function.
Regards
Laurent M
Load Tiles
Hi Maumet,
For Question 1#, here are some tips:
1. Android Edition supports SQLiteTileCache, please refer below code:
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.TileCache = new SqliteBitmapTileCache(@"SqliteDBPath","WmtsLayerCache");
WmtsLayer wmtsLayer = new WmtsLayer();
//TODO: Setting your wmts layer;
2. Uses DrawingProgressChanged event can get the drawing progress, you can update your progress bar in this event, below is sample code:
wmtsLayer.DrawingProgressChanged += WmtsLayer_DrawingProgressChanged;
private void WmtsLayer_DrawingProgressChanged(object sender, DrawingProgressChangedEventArgs e)
{
//TODO: set progress bar with e.ProgressPercentage;
}
Thanks,
Hi Don
Thanks for your response.
But I need to load tiles just with a bounding box and many zoom level.
The user choose a region, choose zooms level (10 to 18 ?) and load.
No map, just a progress bar.
Regards
Laurent M
Hi Laurent,
Attached sample shows how to pre-generate cache tiles fro WMTS, you should want to run that on PC, and copy the generated cache folder to your Android mobile, then make your cache folder in Android app same as the pre-generated cache folder, that will works.
If you want to run the sample, please assign your WMTS server link to the WMTSurlstring in LayerProvider.GetLayersToCache function. And you should want to modify the ActiveLayerName, TileMatrixSetName, OutputFormat etc.
And if you want to get an Android version cache generator, please contact your sales to get a professional service.
Thanks,
CacheGeneratorForWMTS.zip (1.53 MB)
Hi Don
I watched the sample. It is very interesting if I want to make tiles with a map.
The sample generate new tiles, but I want just load tiles of a WMTS serveur.
If I use GetTiles of a layerOverlay:
var tiles = layerOverlay.TileCache.GetTiles®;
foreach (var t in tiles)
{
if (t.Bitmap != null)
{
layerOverlay.TileCache.SaveTile(t);
}
}
And I change the zoom and the extent of the map.
Is it a solution ?
Regards
Lauren M
Hi Don
About the contact to get a professional service.
My sales is ThinkGeo, I contact Moritz from sales@ThinkGeo.
Thanks
Laurent M
Hi Laurent,
Tile is related with overlay but not map, so if you want to generate any tile, just directly add the overlay to the utility.
And you’re right, if you need professional service, you should want to contact Moritz for detail.
Regards,
Don
Is there any example of tiles of the generation of attachment to a web project?
Hi Elton,
http://wiki.thinkgeo.com/wiki/map_suite_web_edition_all_samples#tile_cache_generator
This generator can build cache for all edition include web.
Wish that’s helpful.
Regards,
Don