Community of VE/MapPoint Users and Developers
This is a discussion on How to bring your own content to Virtual Earth (Part 5) within the Virtual Earth Blogs forums, part of the Blogs category; In the previous parts for this series we have been adding various types of vector data to our Virtual Earth ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to bring your own content to Virtual Earth (Part 5) In the previous parts for this series we have been adding various types of vector data to our Virtual Earth application. We will now move on and start adding raster data to overlay floor-plans or even add our own aerial images. Especially aerial or satellite images can be quite large - 2GB are not so seldom - so that we have to look at a way which is still efficient on the web. Virtual Earth supports this type of overlays directly by adding custom tile layers. What exactly does that mean and how does it work? The Virtual Earth Tile System Let's have a quick look at the Virtual Earth tile system first. Joe Schwarz has written an excellent article which is published on MSDN. The Virtual Earth tile system is structured in a quadtree. At level 1 the whole world is split into 4 tiles. Each of those has a size of 256 x 256 pixels and their names match the quadkey as shown below. If we zoom-in one more level, i.e. to level 2, we split each of these tiles into 4 tiles and number them as shown in the example below. This rule applies for every subsequent zoom-level. Thus we can say:
The Virtual Earth MapControl will load the tiles from the Virtual Earth tile servers and stitch them together. The tiles will be cached for up to 7 days in the local browser cache; that is of course only if the cache doesn't flow over and you don't have a policy which flushes the cache. If you return to the same location within these 7 days the MapControl will try to find the relevant tiles in the browser cache first before it contacts the Virtual Earth tile servers. Adding Custom Tile Layers to Virtual Earth To add a custom tile layer to Virtual Earth we use the method AddTileLayer from the VEMap-class. This function requires a VETileSourceSpecification as input as well as a boolean value which indicates if the tile layer should be visible. The VETileSource is specified by
function GetTiles()
Add the Custom Tile Layer to our Sample Application If you stored your data in Amazon S3 you can use the Virtual Directory of your bucket to directly access the data. If you store the data in one of your own servers you have to create a virtual directory in your web server which points to this physical directory. On our web site we first add another AccordionPane. In this AccordionPane we will have 5 HTML-controls of type checkbox - one for each layer that we add. As before we attach an onclick-event to the checkboxes. This time it will the JavaScript AddTileLayer that we execute and we will do that with a number of parameters again. <ajaxToolkit:AccordionPane ID="paneTileLayer" runat="server">
If the checkbox has been deactivated we delete the relevant tile layer. Otherwise we define the VETileSourceSpecification and add the layer to the map. function AddTileLayer(control, layer, maxlat, maxlon, minlat, minlon, url, minlvl, maxlvl, opac, zindex) |
![]() |
| Tags |
| bring, content, part, virtual earth |
| ||||
| Posted By | For | Type | Date | |
| Technorati: Discussion about “How to bring your own content to Virtual Earth (Part 5)” | This thread | Refback | 12-20-2007 11:34 AM | |
| MapPoint Articles - MP2K Magazine | This thread | Refback | 10-03-2007 05:03 PM | |
| MapCruncher: Blogs, Photos, Videos and more on Technorati | This thread | Refback | 10-03-2007 03:13 PM | |
| Hannes's Virtual Earth Blog: Blog Reactions on Technorati | This thread | Refback | 10-01-2007 03:58 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to bring your own content to Virtual Earth (Part 2) | Johannes Kebeck's Blog | Virtual Earth Blogs | 1 | 10-16-2007 05:02 PM |
| How to bring your own content to Virtual Earth (Part 4) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 09-26-2007 04:13 PM |
| How to bring your own content to Virtual Earth (Part 3) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 09-26-2007 07:50 AM |
| How to bring your own content to Virtual Earth (Part 1) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 09-15-2007 03:25 PM |
| Virtual Earth 4 | Eric Frost | MapPoint Web Service and Virtual Earth | 0 | 10-31-2006 10:17 PM |
Flights Malta
Fine weather, good beaches and warm, clear waters. All that is missing is you! For flights to Malta visit Holiday Hypermarket.
Portugal Weather
Check out Portugal Weather - Travel Counsellors details information on Portugal including, weather, flights and accommodation.
Holiday to Thailand
Want to go somewhere new? Book a low cost holiday to Thailand at dealchecker.co.uk. See the stunning national parks and uninhabited islands.
Sri Lanka Holidays
There are some outstanding deals on Sri Lanka holidays at theholidayplace.co.uk. Sri Lanka is renowned for it's exceptional beauty! Book a holiday today!
Cheap Morocco Holidays
Cheap Morocco holidays may be the answer to your cheap holiday search. With sunshine throughout most of the year it can be great value if you avoid the peak season. Why not include a trip to the small tranquil town of Chefchaouen Tangier in your visit?
Travel Guides
As far as travel guides are concerned, your best move would be to check out our website at Travel.co.uk
Cyprus Holidays
Fancy a Mediterranean holiday? Get information on Cyprus holidays at On The Beach.