Hi,
i have a problem with marker moving along a polyline:

The Code:

// Create an array with points : Von Münster über Berlin nach München
var points = [
                   new GLatLng(51.964711, 7.628496),
                   new GLatLng(52.523405, 13.4114),
                ];
// Create a new polyline :
var polyline = new GPolyline(points, '#ff0000', 1, 1.0);
map.addOverlay(polyline);

That works, i got a nice polyline.

So....my little Problem....I use the Google Maps extension epoly.js

The "data" as the Parameter of GetPointAtDistance is a Server-Side
incrementing integer. (The following is executed after each server
poll)

var test = polyline.GetPointAtDistance(data);
alert(test);   // Result:  (51.990059619478544, 7.890873317416931)  //
Correct ! the result includes the brackets and commata !

Problem: I need 2 Parameters for the Following GLatLng(). First the
latitude and second the longitude
How to extract those 2 values from the "test" var ??
I have tried thousand of possiblities, the one that is working for the
latitude is:
alert(test.Kd);  // Gives me only the latitude WITHOUT the brackets.

But what about the longitude ? I dont know how to extract it....

var point = new GLatLng(test.Kd,6);  //   the "6" is  static value,
but here i need the "longitude"
var marker = new GMarker(point);

map.addOverlay(marker);


I tried to fix the problem by using an array, by using javascripts
split.....
But nothing worked....

Any suggestions ? Please help me....

Greeting,
Julian

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to