route-me-map
[Prev] Thread [Next] | [Prev] Date [Next]
[route-me] A few more question regarding custom tile sources Thomas Winkler Wed Jun 24 07:00:23 2009
Hello, is there any documentation on how to integrate custom tile sources? I couldn't really find anything except for some bits and pieces on this mailinglist, so I'm currently playing around trial and error style. Here's my situation: I have custom tiles for an area of about 30,000 sq mi which I'd like to use with route-me (so I do not want to show the whole world in my App but a specific area). The tiles are available in 4 different zoom levels: Zoom 0: 24 rows and 16 columns Zoom 1: 96 rows and 64 columns Zoom 2: ~192 rows and 128 columns etc. Currently, I'm playing around with the SimpleMap example and modifying RMOpenStreetMapsSource.m to load the tiles from the custom tiles server instead from openstreetmaps. I got it working with a fixed zoom setting of kDefaultInitialZoomLevel = 5.0 (defined in RMMapContents.h) while requesting custom tiles with zoom 0 from the server (so, the framework thinks it's using zoom level 5 but I have modified the tileURL method to return a URL for zoom level 0 of my custom tiles). I had a closer look at the OpenStreetMap tiles and found out that the zoom levels look something like this: Zoom 0: 1 row and 1 column (whole world is in one tile) Zoom 1: 2 rows and 2 columns (whole world is on 4 tiles) Zoom 2: 4x4 Zoom 3: 8x8 ... Zoom 11: 2048x2048 ... Zoom 15: 32768x32768 So, obviously both tile sources do not only use different zoom levels but also my custom tile source doesn't have the same amount of rows and columns like OpenStreetMap seems to have. Question 1: I assume the framework has to know for each zoom level how many tile rows and columns there are but couldn't find it anywhere in the source code. Any hints? Question 2: How does the framework know which Lat/Lon corresponds to which tile? I assume this has to be initialized somewhere (e.g. center of tile 0/0 at zoom 0 is a specific Lat/Lon), but where and how? My custom tiles are only available for a specific area on the globe so I guess I have to tell the framework where it is so that I can place markers etc. Question 3: As you can see above, the OpenStreetMap zoom level always quadruples from the previous level (e.g. at level 0 the whole world is on 1 tile, on level 2 it's 4 tiles, 16 tiles etc.). My custom tiles are a little different: zoom level 0 has 16 columns, level 1 has 64 columns, 2 has 128 columns etc. Is there an easy way to handle this different zoom factors with route-me? Thanks, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "route-me" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/route-me-map?hl=en -~----------~----~----~----~------~----~------~--~---
- [route-me] A few more question regarding custom tile sources Thomas Winkler <=