Can I do that ? RRS feed

  • Question

  • Hello,
    I want to build an application based on Mappoint web service for my Graduation Project, and I have many questions:
    1.where can I get started , where can I find the appropriate documentation ?
    2.Can I use I database to store user requests(with the map images)  to work with them on offline status ?
    3.what are all the services offered by mappoint ?
    Thank you .
    Saturday, February 21, 2009 5:22 PM


All replies

  • You will be able to find some information about MapPoint through this links:

    You will be able to find the answer to your questions through this elements. 

    More informations here: http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/001db5dc-6fd3-4723-8654-971865ea281e

    Saturday, February 21, 2009 5:28 PM
  • If by chance your looking for a better user experience but still want to use the mappoint datasource for storing your data you can integrate MapPoint with Virtual Earth. An article on how to do this can be found here: http://msdn.microsoft.com/en-us/library/cc316940.aspx If your storing your data in database and not in a MapPoint datasource then you don't really need to use MapPoint. A better choice would be the Virtual Earth web service as it is faster and has higher quality imagery. Som earticles on the Virtual Earth web services can be found here:

    Documentation for this service can be found here: http://msdn.microsoft.com/en-us/library/cc980922.aspx

    Saturday, February 21, 2009 6:06 PM
  • Thank you very much Richard_Brundritt and Nicolas Boonaert for the help
    First I am new in this field .
    The application witch I want to build is windows application and not a web application .
    What is the difference between Mappoint and Virtual Earth ?

    Thursday, February 26, 2009 7:10 AM
  • "Virtual Earth" is a brand name applied to several related technologies. You might find the following thread helpful to explain the main elements:

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Thursday, February 26, 2009 8:12 AM
  • Two way to include a map control into your windows application.

    • The first way is to use the webbrowser element that help you to integrate the VE Map Control (The webbrowser element will load an HMTL page). So you will have every features that you might already saw on the iSDK. You might be aware of some little problems (i.e.: the webbrowser element is rendered above every other controls...).

    • The second way that is by far more tricky, is to develop with the vewes (Virtual Earth Web Service 1.0) that will allow you to get some imagery and do basic things in a limited way (add some pushpins). In this way, you will have to add some interactivity by developing your own control, and add some features by using System.Drawing (to draw on the map).
      Richard did a great job on his last article (link above). 

    I hope that you will be able to do what you want, the first solution is the simplest and with the iSDK and other resources on the web will certainly help you.

    Thursday, February 26, 2009 1:24 PM
  • Thank you very much for the help .
    I will start with Mappoint web service and if I Have several time, I will integrate Virtual earth web service with mappoint .
    Now I have an other question , If I want To store User Activity on the application (search, maps...) into a database to see them when he is not connected to the internet . Is that possible ?
    Saturday, February 28, 2009 2:33 PM
  • Hello All,

    I have a similar kind of question.
    I am a graduate student and doing my project using Maps.

    I recently went through the Virtual Earth SDK and learnt a few things from it which would be useful for my project.

    Actually, my project is related to the routing feature.
    Now, I want to display the VE as my front end which can be done.

    While showing route from A and B, I want to show it my way....according to the calculations I get from my database.

    How can it be done? What should I learn in ordert to accomplish it?

    Please reply.



    (I am sorry, by mistake is clicked the propose answer button and cannot undo it now....)
    • Proposed as answer by Swaroop_d Wednesday, March 4, 2009 1:31 AM
    Wednesday, March 4, 2009 1:31 AM
  • Hi

    you will need to draw your own polly line including all the route geomatry from your database. See the interactive sdk for examples of drawing a polyline:

    http://dev.live.com/Virtualearth/sdk (under use default shapes, add default shape)

    You other option is to format your data as georss and that will draw the polyline for you when you load, again see the interactive sdk for an example of loading a georss file (under import data into layers, add a georss file)

    I hope that helps
    Brian @ Earthware - UK interactive mapping web developers http://www.earthware.co.uk/blog | http://www.twitter.com/earthware
    Wednesday, March 4, 2009 6:33 AM
  • Just to codify Brian's suggestion - the following code compares how to use Virtual Earth's GetDirections() method to automatically display a route between two locations, and how to create your own Polyline from an array of lat/lon coordinates.
    GetDirections() can be used with named places, such as Los Angeles and San Jose, or latitude/longitude coordinates.

    Save this as an .htm file and load it in your browser. The VERoute is displayed in light blue, the user-created route in red.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"
      <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script> 
      <script type="text/javascript"
          var map = null
          function GetMap() { 
              map = new VEMap('divMap'); 
              // 1.) VE-generated route 
              // Display the VE-calculated Route between Los Angeles and San Jose 
              map.GetDirections(['Los Angeles', 'San Jose']); 
              // 2.) User-created route 
              // Specify an array of points representing a user-created route between Los Angeles and San Jose 
              var MyRoute = new VEShape(VEShapeType.Polyline, [new VELatLong(34, -118), new VELatLong(35, -120.5), new VELatLong(37.3, -121.8)]); 
              // Apply a bit of styling to the route 
              MyRoute.SetLineColor(new VEColor(255, 0, 0, 0.7)); 
              // Add it to the map 
    <body onload="GetMap();"
      <div id="divMap" style="position: relative; width: 640px; height: 480px;"></div> 

    If only Dionne Warwick had used Virtual Earth, eh?

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Wednesday, March 4, 2009 9:23 AM
  • Thank You Earthware and Tanoshimi.

    That really helps and seems simple.

    My next question is how can I know the latitude Longitude values for various cities? (like Los Angeles, San Jose)

    Does each address in a city have different Latitude Longitude values?

    Can you recommend me a book or any online article, blog etc which can help me learn about these things?

    I have been reading few blogs by Microsoft employees and so far find it interesting and helpful.

    Thanks for your help.



    Thursday, March 5, 2009 11:43 PM
  • Latitude and Longitude are angular coordinates (measured from the centre of the Earth) that allow you to uniquely identify any position on the Earth's surface. So, yes, every address, every city, every tree, every busstop, every blade of grass has a unique pair of latitude and longitude coordinates (within a given spatial reference system).
    When we refer to a single pair of coordinates to describe a whole city, it obviously just describes a point that is roughly at the centre of the city, but if you want to describe individual addresses within the city you normally use a technique called geocoding - the process of going from a text description of a place (such as '10 Downing St, London') to a pair of coordinates (such as -0.38, 51.5) so that they can be used in applications such as Virtual Earth or SQL Server 2008.
    There's loads of sites that list latitude/longitude of major world cities - a quick Google produced:

    Using these coordinates you can place pushpins on a map representing these locations, perform route-finding, and do spatial calculations (such as, find me all the features within a 10m radius of the route between X and Y)

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    • Proposed as answer by Swaroop_d Thursday, October 15, 2009 4:05 PM
    Friday, March 6, 2009 9:30 AM
  • also try http://www.geonames.org/ which have a large database of places and features worldwide for free. This data is used by people like MultiMap for identifying more obscure place names

    Brian @ Earthware - UK interactive mapping web developers http://www.earthware.co.uk/blog | http://www.twitter.com/earthware
    • Proposed as answer by Swaroop_d Thursday, October 15, 2009 4:05 PM
    Friday, March 6, 2009 3:13 PM
  • What about my question :
    If I want To store User Activity on the application (search, maps...) into a database to see them when he is not connected to the internet . Is that possible ?
    Tuesday, March 10, 2009 4:31 PM
  • I'm not sure exactly what you want to do... you can write your own javascript to capture pretty much anything the user does on a webpage - where they click, what they search for, how long they spend on the page etc. and store this in a database. This is not Virtual Earth-specific, just capturing events and using AJAX.
    You can't store the resulting map images in a database though, this would be breaching the TOS I think...

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Tuesday, March 10, 2009 5:08 PM
  • Hi Tanoshimi

    I tried the code that you specified for drawing a polyline for a route.

    But , as u see it doesnt give the exact path....I mean it goes over the mountains and lakes which is not what we need.

    So, does it means that for finding path A to B which goes through freeway C and D, that I have to specify all the lat and longs of A B C and D?

    With that do I have to know all the accurate paths first ?

    Can I know how microsoft can find the initial path from Los Angeles to San Jose?

    What do I need to refer to understand it?


    Thursday, March 12, 2009 6:45 PM
  • A polyline simply draws the shortest straight line segments between a set of points. If there is a mountain between points A and B, then when you create a polyline connecting those points it will go over the mountain.
    In your first post you said that you wanted to show a route 'according to the calculations you get from your database'. I assume that your database knows about the shape of roads, and the positions of lakes and monutains, in which case it should return a set of points avoiding those features. If your database doesn't have this information then it's not going to produce very good routes, and you would be better off using the inbuilt routing feature, GetDirections().

    You can pass an array of up to 25 VELatLong objects to GetDirections to specify the waypoints through which a VE-generated route should pass. i.e. map.GetDirections([A,B,C,D]);

    My last code snippet demonstrated the difference in these two approaches.

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    • Proposed as answer by Swaroop_d Thursday, October 15, 2009 4:07 PM
    Thursday, March 12, 2009 7:04 PM