Hi
In fact, to make things work [ I've just found out ]
The Var must be returned like this in Javascript.
var points = [
new VELatLong(50.37349614430351, -2.0654296875000106),
new VELatLong(51.56341232867588, 2.4609375),
new VELatLong(53.514184520771124, -3.427734375000007),
new VELatLong(50.37349614430351, -2.0654296875000106)
];
Things I notice are...
The first and last lines are always the same [ to close the polygon ]
The last 'new VELatLong() does not have a , to continue...
So I need to turn
$polyPoints="50.37349614430351, -2.0654296875000106,51.56341232867588, 2.4609375,53.514184520771124, -3.427734375000007,50.37349614430351, -2.0654296875000106";
in to...
var points = [
new VELatLong(50.37349614430351, -2.0654296875000106),
new VELatLong(51.56341232867588, 2.4609375),
new VELatLong(53.514184520771124, -3.427734375000007),
new VELatLong(50.37349614430351, -2.0654296875000106)
];
remembering there could be any number of points held in $row[polyPoints];
😕