Class GooglePolyline
To draw a line on your map, use a polyline. The Polyline class defines a linear overlay of connected line segments on the map. A Polyline object consists of an array of LatLng locations, and creates a series of line segments that connect those locations in an ordered sequence.
Inheritance
Inherited Members
Namespace:GoogleMaps.Polylines
Assembly:GoogleMaps.dll
Syntax
public class GooglePolyline : ExtenderControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IExtenderControl, IPostBackEventHandler
Properties
Clickable
Gets or sets a value indicating whether this polyline is clickable.
Declaration
[Browsable(true)]
public bool Clickable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Draggable
If set to true, the user can drag this shape over the map. The Geodesic
property defines the mode of dragging. Defaults to false.
Declaration
[Browsable(true)]
public bool Draggable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Editable
If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. Defaults to false.
Declaration
[Browsable(true)]
public bool Editable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Geodesic
Gets or sets a value indicating whether this GooglePolyline is geodesic. Render each edge as a geodesic (a segment of a "great circle"). A geodesic is the shortest path between two points along the surface of the Earth.
Declaration
[Browsable(true)]
public bool Geodesic { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
OnClientClick
Gets or sets the on client click handler.
Declaration
public string OnClientClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client click. |
OnClientDoubleClick
Gets or sets the on client double click handler.
Declaration
public string OnClientDoubleClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client double click. |
OnClientMouseDown
Gets or sets the on client mouse down handler.
Declaration
public string OnClientMouseDown { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client mouse down. |
OnClientMouseMove
Gets or sets the on client mouse move handler.
Declaration
public string OnClientMouseMove { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client mouse move. |
OnClientMouseOut
Gets or sets the on client mouse out handler.
Declaration
public string OnClientMouseOut { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client mouse out. |
OnClientMouseOver
Gets or sets the on client mouse over handler.
Declaration
public string OnClientMouseOver { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client mouse over. |
OnClientMouseUp
Gets or sets the on client mouse up handler.
Declaration
public string OnClientMouseUp { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client mouse up. |
OnClientRightClick
Gets or sets the on client right click handler.
Declaration
public string OnClientRightClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The on client right click. |
Path
The ordered sequence of coordinates of the Polyline. This path is specified using an array of LatLngs.
Declaration
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public List<LatLng> Path { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<LatLng> | The path. |
StrokeColor
Gets or sets a value for stroke color of the polyline.
Declaration
[Browsable(true)]
public Color StrokeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The color. |
StrokeOpacity
Gets or sets the opacity of polyline. The opacity is given as a number between 0 and 1. The line will be antialiased and semitransparent.
Declaration
[Browsable(true)]
public float StrokeOpacity { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The opacity. |
StrokeWeight
Gets or sets the weight of polyline. The weight is the width of the line in pixels.
Declaration
[Browsable(true)]
public int StrokeWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The weight. |
ZIndex
The zIndex compared to other polys.
Declaration
[Browsable(true)]
public int ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index. |
Methods
GetScriptDescriptors(Control)
When overridden in a derived class, registers the System.Web.UI.ScriptDescriptor objects for the control.
Declaration
protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors(Control targetControl)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.Control | targetControl | The server control to which the extender is associated. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.UI.ScriptDescriptor> | An enumeration of System.Web.UI.ScriptDescriptor objects. |
Overrides
GetScriptReferences()
When overridden in a derived class, registers the script libraries for the control.
Declaration
protected override IEnumerable<ScriptReference> GetScriptReferences()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.UI.ScriptReference> | An object that implements the System.Collections.IEnumerable interface and that contains ECMAScript (JavaScript) files that have been registered as embedded resources. |
Overrides
OnClick(MouseEventArgs)
Raises the Click event.
Declaration
protected virtual void OnClick(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnDoubleClick(MouseEventArgs)
Raises the DoubleClick event.
Declaration
protected virtual void OnDoubleClick(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseDown(MouseEventArgs)
Raises the MouseDown event.
Declaration
protected virtual void OnMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseMove(MouseEventArgs)
Raises the MouseMove event.
Declaration
protected virtual void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseOut(MouseEventArgs)
Raises the MouseOut event.
Declaration
protected virtual void OnMouseOut(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseOver(MouseEventArgs)
Raises the MouseOver event.
Declaration
protected virtual void OnMouseOver(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseUp(MouseEventArgs)
Raises the MouseUp event.
Declaration
protected virtual void OnMouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnRightClick(MouseEventArgs)
Raises the RightClick event.
Declaration
protected virtual void OnRightClick(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
RaisePostBackEvent(String)
When implemented by a class, enables a server control to process an event raised when a form is posted to the server.
Declaration
public void RaisePostBackEvent(string eventArgument)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventArgument | A System.String that represents an optional event argument to be passed to the event handler. |
Implements
Events
Click
This event is fired when the DOM click event is fired on the Polyline.
Declaration
public event EventHandler<MouseEventArgs> Click
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
DoubleClick
This event is fired when the DOM dblclick event is fired on the Polyline.
Declaration
public event EventHandler<MouseEventArgs> DoubleClick
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
MouseDown
This event is fired when the DOM mousedown event is fired on the Polyline.
Declaration
public event EventHandler<MouseEventArgs> MouseDown
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
MouseMove
This event is fired when the DOM mousemove event is fired on the Polyline.
Declaration
public event EventHandler<MouseEventArgs> MouseMove
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
MouseOut
This event is fired on Polyline mouseout.
Declaration
public event EventHandler<MouseEventArgs> MouseOut
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
MouseOver
This event is fired on Polyline mouseover.
Declaration
public event EventHandler<MouseEventArgs> MouseOver
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
MouseUp
This event is fired when the DOM mouseup event is fired on the Polyline.
Declaration
public event EventHandler<MouseEventArgs> MouseUp
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |
RightClick
This event is fired when the Polyline is right-clicked on.
Declaration
public event EventHandler<MouseEventArgs> RightClick
Event Type
Type | Description |
---|---|
System.EventHandler<MouseEventArgs> |