MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Virtual Earth & SQL Server 2008 - Part 3: Getting Started with Virtual Earth

This is a discussion on Virtual Earth & SQL Server 2008 - Part 3: Getting Started with Virtual Earth within the Virtual Earth Blogs forums, part of the Map Forums category; Getting Started with Virtual Earth Getting started with the development of location based applications has never been easier than with ...


Go Back   MapPoint Forums > Map Forums > Virtual Earth Blogs

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 03-02-2008
Member
Green Belt
 
Join Date: Sep 2007
Posts: 50
Virtual Earth & SQL Server 2008 - Part 3: Getting Started with Virtual Earth

Getting Started with Virtual Earth

Getting started with the development of location based applications has never been easier than with Virtual Earth. You do not need to sign-up for a developer account; you can just visit the Software Development Kit (SDK) and start on your application immediately.

The “Interactive SDK” enables you to explore implementations of frequently used features. You can have a closer look at a real application in Virtual Earth and then flip through the tabulators to display the complete source code for this particular website or to review the reference for this feature. With just one mouse-click you can copy the complete source-code and with a second paste it into an empty HTML-document. Of course, there is also a traditional reference SDK available. There is an online version on the MSDN as well as a downloadable version in CHM-format. These resources as well as a forum and links to blogs and community sites can be found in the last tabulator.


The Application Programming Interface for Virtual Earth is an AJAX-Control and the coding is done in JavaScript. AJAX stands for “Asynchronous JavaScript And XML” and its main advantage is the partial page update. While a web service always requires a request and response for the complete page, an AJAX-enabled application allows you to refresh just parts of the website, e.g. you can pan and zoom the map without refreshing the content around the map or you can add and remove layers without reloading the background. The Virtual Earth map control is such an AJAX-control and it will access a number of different services in the Microsoft data canters for example to geocode addresses, search in business listings or calculate routes. It will also contact so called “tile servers” from where it retrieves small raster tiles with a side length of 256 pixels. These tiles can be pre-rendered roadmaps or imagery with different levels of detail and they always cover a fixed geographic area. The tiles are organized in a quadkey-structure which is further explained in a whitepaper on the Microsoft Developer Network. Basically, there is a distinct relationship between the name of the tile, the geographic area it covers and the zoom-level. The Virtual Earth map control will determine which area you want to display at what zoom-level and it will contact the tile servers to retrieve the necessary tiles and stitch them together in the client’s browser.


We have several ways to add content to Virtual Earth. Of course we can directly add addresses or business listings from a search within Virtual Earth but we can also add data from different sources. To do so we need to understand the objects in Virtual Earth. The top-level object is the VEMap. To a VEMap-object we can add one or more VEShapeLayers to which again we can add one or more VEShape-objects of type Pushpin, Polyline or Polygon. Each of these VEShapeLayers and VEShapes can have a z-index to control which one is on top, from a visual perspective.


Besides adding individual VEShape-objects to a layer we can also import complete datasets from GeoRSS-feeds or from KML, KMZ or GPX-files. GeoRSS is a modification to the well known Real Simple Syndication (RSS) which adds another tag for point, polyline or polygon information. The Keyhole Markup Language (KML) or the compressed (zipped) version of it (KMZ) had originally been developed for a product called Keyhole which is known today as Google Earth. This markup language is currently being standardized by the Open Geospatial Consortium (OGC) and is already very common. GPX is a XML format for waypoints, tracks and trails, used by many GPS (Global Positioning System) devices.

All of the above mentioned formats add vector data to the map, i.e. you define geometries by one or more pair of coordinates - in this case latitudes and longitudes. While this is often the preferred format it can have disadvantages when the number of points increases. For instance if you need a highly accurate representation of the coastline of Norway this will require at least some 10,000 points and the handling of this many points through JavaScript is very CPU-intensive (and in some cases just too slow). To overcome this limitation you can rasterize such complex data and add that data to Virtual Earth as a raster layer. Such raster data can come from your own tile data source or they can come from a Web Map Service (WMS) which is compliant to the Open Geospatial Consortium’s (OGC) standard.

The simplest way to create your own tile data source is to use the MapCruncher. It allows you to manually georeference an image by defining map-correspondence points. You load an image into the workbench and move a distinct point under the crosshair in the left window. Then you move the related location in Virtual Earth under the crosshair in the right window and once you have a few points (at least 3) you can lock the view which re-projects the image so that it fits to the geography. Now the MapCruncher can do its main work and cut down the image in pyramid layers and tile structures which follow the Virtual Earth naming convention.


Once you have the tiles you just have to put them into a virtual directory on your web server and then you can call the method VEMap.AddTileLayer to overlay these tiles on top of the Virtual Earth base-layers. Don’t worry about the details of this method for now - we will discuss that a little bit later in more detail when we actually use it. Below you find a graphics of the principle: When the application loads in the client’s browser it will get the skeleton of the website form your web server but it loads the Virtual Earth map control and the Virtual Earth tiles from the Microsoft data centers. To overlay your own custom tile layer it will contact your web server again and retrieve those tiles which have the same name as the ones which are currently displayed.


(to be continued)

*



Click here to view the article.

Last edited by Eric Frost; 03-03-2008 at 06:35 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/virtual-earth-sql-server-2008-part-3-getting-started-virtual-earth-7215.html

Posted By For Type Date
OJ is innocent. It was Lock Stitchs » Blog Archive » What others have been saying about lock stitch This thread Pingback 03-03-2008 05:21 PM
Hannes's Virtual Earth Blog on Technorati This thread Refback 03-02-2008 03:30 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Virtual Earth & SQL Server 2008 - Part 1: Introduction (2/2) Johannes Kebeck's Blog Virtual Earth Blogs 0 03-02-2008 07:30 AM
Virtual Earth & SQL Server 2008 - Part 1: Introduction (1/2) Johannes Kebeck's Blog Virtual Earth Blogs 0 03-02-2008 07:30 AM
Virtual Earth Partners Jump on the SQL Server 2008 Band Wagon! VE For Government Virtual Earth Blogs 1 11-13-2007 05:59 PM
MapDotNet Server 6.5 Supports SQL Server 2008 and New Virtual Earth Features VE For Government Virtual Earth Blogs 0 11-12-2007 05:42 PM
Getting Started with the Virtual Earth Map Control Eric Frost MP2K Magazine Articles 0 08-02-2005 03:39 PM


All times are GMT -5. The time now is 07:43 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Cheap Florida Flights
Cheap Florida flights are a reality when you book online at Holiday Hypermarket. We search leading tour operators to show you top deals.

European City Breaks
Book European city breaks with Travel Counsellors. A personal travel counselor will help plan your European city break.

Thailand Holidays
Thailand Holidays can suit your budget when you book with dealchecker.co.uk. If you are strapped for cash, visit online to find the deal for you.

Holidays to Cancun
The Holiday Place has special offers on holidays to Cancun during the month of September. Book a late summer holiday with us!

Cheap Canaries Holidays
Are you hunting down cheap Canaries holidays? Well check out ulookubook.com to bag a great value holiday. There are numerous festivals taking place all year round. Why not book your holiday around one?

Holidays
At Travel.co.uk the options for holidays are endless. Do some online comparison shopping!

Cheap Lanzarote Holidays
The Canary Islands beckons you to come! View information on cheap Lanzarote holidays at On The Beach!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46