Community of VE/MapPoint Users and Developers
This is a discussion on Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (5/6) within the Virtual Earth Blogs forums, part of the Blogs category; Adding VETileLayer We have seen in the previous parts how we can add not only simple point-geographies but also ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (5/6) Adding VETileLayerWe have seen in the previous parts how we can add not only simple point-geographies but also polygons and lines to Virtual Earth. We did that using GeoRSS-feeds and we added some spatial-functions for further analysis. All these data were vector data, i.e. we had to consider individual points or arrays of points and the more points we have the more work is to do for the Virtual Earth MapControl. One of the tables in our database – the table TopographicLine - which contains LINESTRING-geographies for just a small area of 9 square-kilometers has already more than 200,000 objects with a total of almost 730,000 points. That is clearly too much to make up a good user experience in Virtual Earth. However we have seen before that we can create a tile layer to overlay various type of image data on Virtual Earth. We have learned about the MapCruncher which is available for free download and which allows us to manually geo-reference images and cut them into pyramid-levels and each of the pyramid levels into tile-mosaics. The MapCruncher however requires always an image, i.e. raster data as input. In our example we have a table in SQL Server 2008 which holds our vector data. Safe FME, the spatial ETL-tool which we heard about before as well, can assist us here to either create an image which we will later process with the MapCruncher or - in the latest beta version of FME 2008 – it can also cut the tiles directly for us. Below you see the workflow in the Safe FME Workbench:
Once we start the process FME will create the tile set. In our example this will be more than 4,600 square PNG-images with a side-length of 256 pixels. Now we copy the tiles into a virtual directory on your web server and start coding. To add a tile layer to Virtual Earth we can use a method AddTileLayer. This method has one mandatory parameter which is the VETileSourceSpecification. The specification contains the name of the layer as well as the URL to the virtual directory on our web server in which we hold our tiles. Furthermore it contains a bounding rectangle which determines the region for which Virtual Earth should retrieve tiles. It also contains a minimum and maximum zoom-level at which we want to display the tile layer as well as a z-index and a percentage value for the opacity of this layer. The z-index is important if we add more than one tile layer and need to determine which one is on top. The opacity allows us to create a translucency effect so that we can see the Virtual Earth images or roads underneath our custom tile layer. var bounds = [new VELatLongRectangle(new VELatLong(maxlat, maxlon),new VELatLong(minlat, minlon))]; To implement the function we want to keep it as generic as possible so that we can re-use it for different tile layers and only need to change the parameters when we call it. We use exactly the same syntax as mentioned above. //Tile Layer In the ASP.NET-part of the application we create a new accordion pane which hosts another HTML-element of type checkbox. Attached to the checkbox is an onclick-event which calls the above mentioned JavaScript-function with the necessary parameters. <cc1:AccordionPane ID="paneTileLayer" runat="server"> That’s it let’s see the result: (to be continued) Technorati Tags: Virtual Earth,SQL Server 2008 ![]() ![]() Click here to view the article. Last edited by Eric Frost; 03-22-2008 at 05:56 PM. |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (5/6) - MapPoint Forums | This thread | Refback | 03-28-2008 11:28 AM | |
| North Dakota Map and Map of North Dakota - MapPoint State Map Gallery - MP2K Magazine | This thread | Refback | 03-25-2008 09:23 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 03-23-2008 09:22 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (6/6) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-22-2008 08:13 AM |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (4/6) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-03-2008 12:51 PM |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (3/6) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-02-2008 03:52 PM |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (2/6) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-02-2008 03:52 PM |
| Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (1/6) | Johannes Kebeck's Blog | Virtual Earth Blogs | 0 | 03-02-2008 03:52 PM |
Cheap Flights from Manchester
Book cheap flights from Manchester Airport from a range of Tour Operators and airlines. Holiday Hypermarket will help you jet off. Visit online to find useful airport information too.
Flights to Italy
Find and book flights to Italy. Travel Counsellors can help with travel to Italy including flights and accommodation.
Cuba Holidays
After years of neglect by the western world, Cuba is coming back onto the holiday scene. Cuba Holidays are a unique and enjoyable experience. Book at dealchecker.co.uk.
Jamaica Holidays
Jamaica holidays give you the chance to enjoy the vibrant cultural heritage and wonderful laid back atmosphere of the Caribbean. Book here!
Egypt
In Egypt you find an ancient city buzzing with life. There is an abundance of historical sites to see, not just the pyramids. The Opera House is certainly worth a visit and you can enjoy some open-air theatre too.
All inclusive holidays
To plan all inclusive holidays, use Travel.co.uk to explore all the possibilities.
Cheap Holidays in Goa
Visit the unique blend of east and west in India! Get information on cheap holidays in Goa, only at On The Beach.