http://www.google.com/apis/maps/documentation/
This is a map overlay that draws a polyline on the map, using the vector drawing facilities of the browser if they are available, or an image overlay from Google servers otherwise.
Constructor | Description |
---|---|
GPolyline(points, color?, weight?, opacity?) | Creates a polyline from an array of vertices. The color is given as a string that contains the color as a hexadecimal number RRGGBB. The weight is the width of the line in pixels. The opacity is given as a number between 0 and 1. The line will be antialiased and semitransparent. |
Factory Methods | Return Value | Description |
---|---|---|
fromEncoded(color?, weight?, opacity?, points, zoomFactor, levels, numLevels) | GPolyline | Creates a polyline from encoded strings of aggregated points and levels. color is a string that contains a hexadecimal numeric HTML style, i.e. #RRGGBB. weight is the width of the line in pixels. opacity is a number between 0 and 1. points is a string containing the encoded latitude and longitude coordinates. levels is a string containing the encoded polyline zoom level groups. numLevels is the number of zoom levels contained in the encoded levels string. zoomFactor is the magnification between adjacent sets of zoom levels in the encoded levels string. Together, these two values determine the precision of the levels within an encoded polyline. The line will be antialiased and semitransparent. (Since 2.63) |
Methods | Return Value | Description |
---|---|---|
getVertexCount() | Number | Returns the number of vertices in the polyline. (Since 2.46) |
getVertex(index) | GLatLng | Returns the vertex with the given index in the polyline. (Since 2.46) |
Events | Arguments | Description |
---|---|---|
remove | none | This event is fired when the polyline is removed from the map, using GMap2.removeOverlay() or GMap2.clearOverlays(). |
A polyline represents a vector polyline overlay on the map. A polyline is drawn with the vector drawing facilities of the browser if they are available or an image overlay from Google servers otherwise.
Constructor | Description |
---|---|
GPolyline(points, color?, weight?, opacity?) | Constructs a polyline from the given array of lat/lng points. color should be a hex HTML color (e.g., "#0000ff"), weight is an integer representing the width of the line in pixels, and opacity should be a float between 0 and 1. |