www.sdlsuite.com Forum Index www.sdlsuite.com
Discussion of technical aspects of the SDL Component Suite
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tiling and Geomap

Post new topic   Reply to topic    www.sdlsuite.com Forum Index -> GeoPack
View previous topic :: View next topic  
Author Message

Joined: 07 Sep 2011
Posts: 42
Location: Maasland, The Netherlands

PostPosted: Thu Apr 05, 2012 2:46 pm    Post subject: Tiling and Geomap Reply with quote

I want to use a webbases tiling source like OpenStreetmap. This means a standardized way of cutting up a map in tiles of 256x256 where the lines by which the tiles are cut is determined by an open standard. Google maps for example also uses this.

The tiles are sorted on a folder tree like this:

dataroot/zoomlevel/column/row.png or .jpg

The source can either be downloaded and locally stored tiles or online tiles. I use downloaded tiles.

Loading tiles from disk can be time consuming and thus I prefer to first load some tiles, show them in Geomap, continu loading the rest and then show the whole image in Geomap. (I use threads to achieve this in background.)

For this I use some code like Geomap.MapBitmap:=MyBitmap;
Where MyBitmap is made up of x*y tiles that were drawn on the Canvas of MyBitmap.
MyBitmap is already sized to the max of all tiles to be downloaded.

This code calls SetMapBitmap and in here MyBitmap is assigned to the internal Bitmap of Geomap. Assigning means making a copy and not pointing with a pointer.

So when I then draw the remaining tiles on MyBitmap, they will not show on the Geomap internal memory bitmap (GrafBMP). For this I have to call Geomap.MapBitmap:=MyBitmap again and thus Assign the whole bitmap again.

Is there a better way to do this? For example when MyBitmap and GrafBMP point to the same bitmap source in memory and thus changes made to the bitmap will show after the next call to Paint in Geomap.

I love to hear.
Jaap van Goor
Promanent b.v.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.sdlsuite.com Forum Index -> GeoPack All times are GMT + 1 Hour
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group