WebService for google maps

1 posts, 0 answers
  1. Lorenzo Castrico
    Lorenzo Castrico avatar
    13 posts
    Member since:
    Jul 2007

    Posted 06 Jul 2008 Link to this post

    maybe i'm a bit off-topic, but i couldn't find a solution anywhere else.
    I want to create a webservice that returns, using google maps api, driving distance betwen to cities.
    Js code is quite simple:
      map = new GMap2(document.getElementById("map_canvas"));  
      map.setCenter(new GLatLng(42.351505,-71.094455), 15);  
      directionsPanel = document.getElementById("route");  
      directions = new GDirections(map, directionsPanel);  
      directions.load("500 Memorial Drive, Cambridge, MA to 4 Yawkey Way, Boston, MA 02215 (Fenway Park)"); 
    i can exclude the part to show the map...
    i also need to add a js event handler:
    GEvent.addListener(directions, "load", onGDirectionsLoad); that retrieve the distance.

    The problem is that i have no idea how to use this code inside a asmx

    Is this possible ? What alternatives do i have ? WebRequest ? 


Back to Top