Open TomQv opened 7 years ago
I uploaded a new version with test data.
The project is fare from working. The only thing, which is working for testing is the TileProvider.Test. There you find a folder named "Data". Copy this folder to "C:\Users\
ok, this compiles and runs, but
var tileImage = renderer.ExecuteJob(renderJob);
returns null, so no image is rendered.
I updated to SkiaSharp 1.57.1.
When I run the project, tileImage isn't null, but a SKImage. Did you copy the files in the Data folder to the mentioned path? Don't add the Data folder itself. Only the content (andorra.map and folder Osmarender).
yes, this one is fine now. Very impressive, will play with this now. Thanks 👍
referring to the TileProvider.Test. with Andorra, it doesn't render labels and pois, only roads and polygons. Is this still to do?
Ok, after some debugging, Poi-symbols are not implemented yet and labels are rendered without rotation.
I have implemented the missing DrawTextRotated and labels are now visible in the output file with correct rotation.
public void DrawTextRotated(string text, int x1, int y1, int x2, int y2, IPaint paint)
{
double y = y2 - y1;
double x = x2 - x1;
float degrees = (float)(Math.Atan2(y, x) * 180 / Math.PI);
var np = ((SkiaPaint)paint).NativePaint;
if (paint.Transparent && np.Color == 0) // workaround for transparent black foreground stroke color ???
{
//np.Transparent = false;
np.Color = SKColors.Black; // use visible way text: {#ff000000} instead of transparent {#00000000}
np.StrokeWidth += 2;
}
nativeCanvas.Save();
nativeCanvas.RotateDegrees(degrees, x1, y1);
nativeCanvas.DrawText(text, x1, y1, np);
nativeCanvas.Restore();
}
MapsforgeSharp.Map is not compiling, gives the following erros. did I miss something?
Severity Code Description Project File Line Suppression State Error CS0115 'MapWorkerPool.run()': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 78 Active Error CS0115 'BitmapLRUCache.RemoveEldestEntry(KeyValuePair<Job, ITileBitmap>)': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\cache\InMemoryTileCache.cs 178 Active Error CS0534 'LayerManager' does not implement inherited abstract member 'PausableThread.GetThreadPriority()' MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\LayerManager.cs 37 Active Error CS0544 'LayerManager.ThreadPriority': cannot override because 'PausableThread.ThreadPriority' is not a property MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\LayerManager.cs 131 Active Error CS0115 'MapWorkerPool.MapWorker.run()': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 118 Active Error CS0115 'PausableThread.Interrupt()': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\util\PausableThread.cs 156 Active Error CS0115 'PausableThread.Run()': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\util\PausableThread.cs 208 Active Error CS0535 'QueueItemComparator' does not implement interface member 'IComparer<QueueItem>.Compare(QueueItem, QueueItem)' MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\queue\QueueItemComparator.cs 23 Active
Error CS1729 'Runnable' does not contain a constructor that takes 0 arguments MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 54 Active
Error CS0535 'TileBasedLabelStore' does not implement interface member 'LabelStore.Clear()' MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\labels\TileBasedLabelStore.cs 30 Active
Error CS0115 'TileBasedLabelStore.RemoveEldestEntry(KeyValuePair<Tile, IList>)': no suitable method found to override MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\labels\TileBasedLabelStore.cs 99 Active
Error CS0534 'TileDownloadThread' does not implement inherited abstract member 'PausableThread.GetThreadPriority()' MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\download\TileDownloadThread.cs 28 Active
Error CS0544 'TileDownloadThread.ThreadPriority': cannot override because 'PausableThread.ThreadPriority' is not a property MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\download\TileDownloadThread.cs 79 Active
Error CS0103 The name 'Executors' does not exist in the current context MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 66 Active
Error CS0103 The name 'Executors' does not exist in the current context MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 67 Active
Error CS0314 The type 'T1' cannot be used as type parameter 'T' in the generic type or method 'QueueItem'. There is no boxing conversion or type parameter conversion from 'T1' to 'org.mapsforge.map.layer.queue.Job'. MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\queue\QueueItemComparator.cs 33 Active
Error CS0314 The type 'T2' cannot be used as type parameter 'T' in the generic type or method 'QueueItem'. There is no boxing conversion or type parameter conversion from 'T2' to 'org.mapsforge.map.layer.queue.Job'. MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\queue\QueueItemComparator.cs 33 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\cache\InMemoryTileCache.cs 21 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\labels\TileBasedLabelStore.cs 21 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\overlay\Polygon.cs 23 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\overlay\Polyline.cs 23 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\rule\RenderTheme.cs 20 Active
Error CS0246 The type or namespace name 'core' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\XmlRenderThemeStyleLayer.cs 19 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\DatabaseRenderer.cs 44 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\DatabaseRenderer.cs 45 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\DatabaseRenderer.cs 46 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\DatabaseRenderer.cs 47 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\PolylineContainer.cs 29 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\RendererJob.cs 26 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\TileRendererLayer.cs 33 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\RenderCallback.cs 24 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\Area.cs 32 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\Caption.cs 36 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\Circle.cs 30 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\Line.cs 34 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\LineSymbol.cs 30 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\PathText.cs 33 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\RenderInstruction.cs 24 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\renderinstruction\Symbol.cs 28 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\rule\RenderTheme.cs 23 Active
Error CS0234 The type or namespace name 'core' does not exist in the namespace 'org.mapsforge' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\rule\Rule.cs 26 Active
Error CS0246 The type or namespace name 'ExecutorService' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 47 Active
Error CS0246 The type or namespace name 'ExecutorService' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 48 Active
Error CS0246 The type or namespace name 'InterruptedException' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 98 Active
Error CS0246 The type or namespace name 'JavaToDotNetGenericWildcard' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\queue\QueueItemComparator.cs 23 Active
Error CS0246 The type or namespace name 'LRUCache<,>' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\rule\RenderTheme.cs 39 Active
Error CS0246 The type or namespace name 'LRUCache<,>' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\rendertheme\rule\RenderTheme.cs 40 Active
Error CS0246 The type or namespace name 'ReentrantReadWriteLock' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\cache\FileSystemTileCache.cs 199 Active
Error CS0246 The type or namespace name 'Runnable' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 28 Active
Error CS0246 The type or namespace name 'Runnable' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\renderer\MapWorkerPool.cs 105 Active
Error CS0234 The type or namespace name 'Thread' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\util\PausableThread.cs 26 Active
Error CS0246 The type or namespace name 'WorkingSetCache<,>' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\cache\InMemoryTileCache.cs 170 Active
Error CS0246 The type or namespace name 'WorkingSetCache<,>' could not be found (are you missing a using directive or an assembly reference?) MapsforgeSharp.Map C:\Users\Tom\QuoVadis\Dlls\Mapsforge\MapsforgeSharp-master\MapsforgeSharp.Map\src\main\layer\labels\TileBasedLabelStore.cs 30 Active