marcelo:
> You can't. Javascript only.
Because Javascript can, then php can theoreticaly. Javascript gets
encoded polygon with direction. Example of encoded polygon:
"s{upIoeudFAqI" and draws it on the map. I can't find source of
javascript function fromEncoded(polylines, fill?, color?, opacity?,
outline?)
In documentation:
"<b>
class GPolygon
This is very similar to a GPolyline, except that you can additionally
specify a fill color and opacity.
Constructor
Constructor Description
GPolygon(latlngs, strokeColor?, strokeWeight?, strokeOpacity?,
fillColor?, fillOpacity?, opts?) Creates a polygon from an array of
vertices. The colors are given as a string that contains the color in
hexadecimal numeric HTML style, i.e. #RRGGBB. The weight is the width
of the line in pixels. The opacities is given as a number between 0
and 1. The line will be antialiased and semitransparent. (Since 2.69)
Factory Methods
Factory Methods Return Value Description
fromEncoded(polylines, fill?, color?, opacity?, outline?) GPolygon
Creates a polygon (consisting of a number of polylines) from encoded
strings of aggregated coordinates and levels. polylines contains an
associative array of constituent polylines, encoded in the same format
as described in the GPolyline.fromEncoded documentation. fill
specifies whether to fill in the polygon with a certain color. opacity
and outline specifies whether to stroke the polygon with the
polyline's color, weight and opacity. In case multiple values are
specified in polylines, the first polyline's values are taken. (Since
2.78)</b>