Geeks With Blogs


Add to Google

Tim Hibbard CEO for EnGraph software

I'm trying to get Google Maps and Yahoo Maps to play well together with Where's Tim. Not quite there yet, but getting close.

Trying to work in URL query strings too:

Technorati Tags: Yahoo Maps, Google Maps, Where's Tim

Posted on Monday, November 7, 2005 6:05 PM Mapping , Where's Tim | Back to top

Comments on this post: Playing with Yahoo maps API

# re: Playing with Yahoo maps API
Requesting Gravatar...
Hi Tim,

I am trying to use the Yahoo Map API do display the image, it works find if I hardcode the value in this function

var myPoint = new YGeoPoint(37.4041960114344,-122.008194923401);

This is what I want now the user enter their address, I will get the X and Y coordinate from my database for that address, but I am not sure how do I can pass those values to the client side so that it can display the correct place.

I am trying to using the Ajax:

Server Side:
public string MapCoord(Not Sure what to put in here)
//Get X and Y coordinate from database
return x and Y coordinate;


//Client Side

script type="text/javascript" src=";appid=MyID">

<style type="text/css"> #mapContainer { height: 600px; width: 600px; }

<form name="Form1" method="post" id="Form1">

<enter address here>
<input type="submit" name="buttonname" value="Submit" onclick="Load();">
<div id="mapContainer"></div>

function Load()

function Load_callback(response)
var av = response.value;
var myPoint = new YGeoPoint(Put X and Y coordinate in here);
Left by Tom Lee on May 03, 2006 11:16 AM

# re: Playing with Yahoo maps API
Requesting Gravatar...
I see what you are trying to do.

Maybe this will help and I'm doing this outside an editor so forgive any syntax errors:

.NET code
Public class ajaxPage
Private sub page_load()
End sub

<serializable()> _
Public structure latlngPoint
public lat as double
public lng as double
End structure

<ajax.ajaxmethod()> _
Public function GetData() as latlngPoint
dim rv as new latlngPoint = 38.5
rv.lng = -95.5
return rv

End function

End class

Javascript code

function Load()

Function getAjaxData(){

Function getAjaxData_callback(response){
var av = response.value;
var myPoint = new YGeoPoint(, av.lng);

I just created a structure and made it serializable so that AJAX could pass it between server and client and then called it from javascript...bang!!

Tim Hibbard
Left by Tim Hibbard on May 03, 2006 11:59 AM

Your comment:
 (will show your gravatar)

Copyright © Tim Hibbard | Powered by: