locked
V4 to V5 hassle! RRS feed

  • Question

  • We are migrating V4 version of our maps mashup to V5 and we are
    having some weird issues with new pushpins with such exceptions:

    [Exception... "'[object Object]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"

    The offending code just boggles my mind

             var temp=pinLatLong.split(', ');
             var ll=map.GetCenter();//
    //the below assignment causes the issues!!! Without the below, a pin is drawn OK in the center
             ll.Latitude=parseInt(temp[0]);ll.Longitude=parseInt(temp[1]);
    //the above is causing issues - temp[0] and temp[1] are just long and lat strings!
             var shape = new VEShape(VEShapeType.Pushpin, ll);
             shape.SetTitle(tempTitle);

    Sunday, June 3, 2007 12:52 PM

Answers

  • John, thnaks a ton Lat Long are Floats not INTs.
    THANKS DUDE
    Monday, June 4, 2007 12:36 AM

All replies

  • Tom, is it the parseInt?

    try:

    Code Snippet
    var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(temp[0],temp[1]));

     

    John.

    Sunday, June 3, 2007 10:16 PM
    Moderator
  • John, thnaks a ton Lat Long are Floats not INTs.
    THANKS DUDE
    Monday, June 4, 2007 12:36 AM