Search the web
Sign In
New User? Sign Up
yws-maps-ajax · | Yahoo! Maps Ajax API
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to get the Lat and Long from a YCustomOverlay   Message List  
Reply | Forward Message #239 of 257 |
Re: How to get the Lat and Long from a YCustomOverlay

I just wanted to add that I don't think I'm creating the object properly. When I
do this:

var marker = new YCustomOverlay(new YGeoPoint(Lat, Lon));
(Lat and Lon are numbers)

and I try to access the YGeoPoint it says it's not defined.

I even try this example I found in Internet:
var oDiv = document.createElement("div");
oDiv.style.width = "16px";
oDiv.style.height = "16px";
oDiv.style.backgroundColor = "blue";
oMap.addOverlay(new YCustomOverlay(oMap.getCenterLatLon(), oDiv));

but it won't show anything!! :(

How do I create a YCustomOverlay then? I'm stuck here I can't make them work.

Thanks again :)
Reine.

--- In yws-maps-ajax@yahoogroups.com, "notaplayer83" <notaplayer83@...> wrote:
>
> Hi :)
>
> I'm working with YCustomOverlays but I'm not able to get the lat nd long from
the object once it's created :(. The weird part is that I can actually print
them with an alert() but can't use the value for anything else.
>
> To get the value I'm using something like this:
>
> var point = marker.YGeoPoint; // marker is the YCustomOverlay
>
> Firebug says marker.YGeoPoint is undefined but if I do this:
> alert(marker.YGeoPoint.Lat);
>
> I get the right values.
>
> What can I do to get the lat and long properly?
>
> Thanks fr your help :)
> Reine.
>





Tue Jul 21, 2009 2:26 pm

notaplayer83
Offline Offline
Send Email Send Email

Forward
Message #239 of 257 |
Expand Messages Author Sort by Date

Hi :) I'm working with YCustomOverlays but I'm not able to get the lat nd long from the object once it's created :(. The weird part is that I can actually...
notaplayer83
Offline Send Email
Jul 20, 2009
9:16 pm

I just wanted to add that I don't think I'm creating the object properly. When I do this: var marker = new YCustomOverlay(new YGeoPoint(Lat, Lon)); (Lat and...
notaplayer83
Offline Send Email
Jul 21, 2009
2:26 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help