This is a migrated thread and some comments may be shown as answers.

How can I create my custom tiles?

2 Answers 62 Views
Map
This is a migrated thread and some comments may be shown as answers.
Jason D
Top achievements
Rank 1
Veteran
Jason D asked on 24 Jun 2011, 06:20 PM
Looking for input on what others do. I've implemented a custom provider. I create a large image in memory and then slice it into tiles. This works until the image is too big and I run out of memory. Surely there is a better way to do this. Ideally I would like something that creates the tiles directly to disk. Another 'problem' is that I'm doing things like 'DrawPolygon' onto my image so I don't have knowledge of exactly which pixels are being colored, otherwise I could easily figure which pixels to write to. Appreciate any help. Thanks.

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 29 Jun 2011, 02:18 PM
Hello Jason,

I'm not sure whether this approach will be applicable, but still -- you can create your image, then save it to the hard drive, and then use Microsoft DeepZoom Composer to create tiles for your application.

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason D
Top achievements
Rank 1
Veteran
answered on 08 Aug 2011, 04:55 PM
For anyone who has the same problem, I wound up calculating which tile each point is in, and drawing on the that tile. So the largest image in memory is only 256x256. The downside to this is that it is not as accurate and you can tiny white space in between tiles sometimes, since the data on the boundaries doesn't get drawn on adjacent tiles. I think this is just something I have to live with. An alternative is load the surrounding 8 tiles to get maximum accuracy. This has the downside of being slower since images have to constantly be loaded, drawn, and sliced up again. This method also doesn't work well on the fly, when each tile is being requested. It works well for pre-rendering, but then there's too much delay.
Tags
Map
Asked by
Jason D
Top achievements
Rank 1
Veteran
Answers by
Andrey
Telerik team
Jason D
Top achievements
Rank 1
Veteran
Share this question
or