諸彼特座標物件字串 Javascript API V0.0.1 參考資料

facebook twitter plurk

Reference Table of Contents

CoStr

Map

Overlays

Events

Base

MVC

Drawing Library


zhupiter.CoStr.CoStrType class

Identifiers for CoStr types.

Constant

ConstantDescription
NONEReserved.
GMAPGoogle Map CoString.
CANVAS2DHTML5 2D Canvas CoString.

zhupiter.CoStr.Map class

CoString coordiante map/canvas.

Constructor

ConstructorDescription
Map(coordianteDiv:Node, opts?:MapOptions)Creates a new CoString map/canvas inside of the given HTML container, which is typically a DIV element.

Methods

MethodsReturn ValueDescription
getBounds()LatLngBounds|Bounds2DReturns the lat/lng | x/y bounds of the current viewport.
getCenter()LatLng|Point2DReturns the position displayed at the center of the map/canvas.
getDiv()NodeReturns the DIV object of coordinate map/canvas HTML container.
getZoom()numberReturns the current zoom level number.
setCenter(latlng:LatLng|LatLngLiteral|Point2D)NoneChanges the center of the map/canvas.
setOptions(options:MapOptions)NoneChanges the settings by a set of options.
setZoom(zoom:number)NoneChanges the zoom level to the given number.
getCoStrDrawingManager()DrawingManagerReturns the cureent CoString drawing manager object of the map/canvas.
getCoStrLang()stringReturns the current CoString language of the map/canvas. Accepted values are 'en': English, 'cht': Tranditional Chinese, 'chs': Simple Chinese
getCoStrType()CoStrTypeReturns the cureent CoString type of the map/canvas.
getRawMap()GMapThis method is only available for GMAP CoString type. Returns the current GMap object.
getCoString(type:CoStrType)stringReturns the current CoString of settings/objects of the map/canvas by the given CoString type.
setCoStrDrawingManager(drawingManager:DrawingManager)NoneChanges the current CoStringdrawing manger to the given DrawingManager.
setCoString(coString?:string, editable?:boolean)NoneParsers the CoString and applys the settings and objects to the map/canvas. CoString is trying to get from the HTTP GET URL query string if not given. Editabling is enabled by default if DrawingManager is set.

Events

EventsArgumentsDescription
bounds_changedNoneThis event is fired when the viewport bounds have changed.
center_changedNoneThis event is fired when the map/canvas center property changes.
clickMouseEvent|MouseEvent2DThis event is fired when the user clicks on the map/canvas (but not when they click on a marker or infowindow).
dblclickMouseEvent|MouseEvent2DThis event is fired when the user double-clicks on the map/canvas. Note that the click event will also fire, right before this one.
dragNoneThis event is repeatedly fired while the user drags the map/canvas.
dragendNoneThis event is fired when the user stops dragging the map/canvas.
dragstartNoneThis event is fired when the user starts dragging the map/canvas.
mousemoveMouseEvent|MouseEvent2DThis event is fired whenever the user's mouse moves over the map/canvas container.
rightclickMouseEvent|MouseEvent2DThis event is fired when the DOM contextmenu event is fired on the map/canvas container.
zoom_changedNoneThis event is fired when the map/canvas zoom property changes.

zhupiter.CoStr.MapOptions object

Properties

PropertiesTypeDescription
centerLatLng|Point2DThe initial map/canvas center. Required.
draggablebooleanIf false, prevents the map/canvas from being dragged. Dragging is enabled by default.
zoomnumberThe initial map/canvas zoom level. Required.
coStrLangstringThe language used in the map/canvas. Required. 'en': English, 'cht': Tranditional Chinese, 'chs': Simple Chinese
coStrMaxDecodenumberThe maximum number of decoding objects. Default value is 0 for unlimit.
coStrTypeCoStrTypeThe CoString type of the map/canvas. Required.

zhupiter.CoStr.Marker class

Constructor

ConstructorDescription
Marker(opts?:MarkerOptions)Creates a marker with the options specified.

Methods

MethodsReturn ValueDescription
getClickable()boolean
getCursor()string
getDraggable()boolean
getIcon()string|Icon|Symbol
getMap()MapReturns the CoString map/canvas on which this Marker is attached.
getOpacity()number
getPosition()LatLng|Point2D
getTitle()string
getVisible()boolean
getZIndex()number
setClickable(flag:boolean)None
setCursor(cursor:string)None
setDraggable(flag:boolean)None
setIcon(icon:string|Icon|Symbol)None
setMap(map:Map)NoneRenders the Marker on the specified CoString map/canvas. If Map is set to null, the Marker will be removed.
setOpacity(opacity:number)None
setOptions(options:MarkerOptions)None
setPosition(yx:LatLng|LatLngLiteral|Point2D)None
setTitle(title:string)None
setVisible(visible:boolean)None
setZIndex(zIndex:number)None

Events

EventsArgumentsDescription
clickMouseEvent|MouseEvent2DThis event is fired when the marker icon was clicked.
clickable_changedNoneThis event is fired when the marker's clickable property changes.
cursor_changedNoneThis event is fired when the marker's cursor property changes.
dblclickMouseEvent|MouseEvent2DThis event is fired when the marker icon was double clicked.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the marker.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the marker.
draggable_changedNoneThis event is fired when the marker's draggable property changes.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging the marker.
mousedownMouseEvent|MouseEvent2DThis event is fired for a mousedown on the marker.
mouseoutMouseEvent|MouseEvent2DThis event is fired when the mouse leaves the area of the marker icon.
mouseoverMouseEvent|MouseEvent2DThis event is fired when the mouse enters the area of the marker icon.
mouseupMouseEvent|MouseEvent2DThis event is fired for a mouseup on the marker.
position_changedNoneThis event is fired when the marker position property changes.
rightclickMouseEvent|MouseEvent2DThis event is fired for a rightclick on the marker.
title_changedNoneThis event is fired when the marker title property changes.
visible_changedNoneThis event is fired when the marker's visible property changes.
zindex_changedNoneThis event is fired when the marker's zIndex property changes.

zhupiter.CoStr.MarkerOptions object

Properties

PropertiesTypeDescription
clickablebooleanIf true, the Marker receives mouse and touch events. Default value is true.
cursorstringMouse cursor to show on hover
draggablebooleanIf true, the Marker can be dragged. Default value is false if the map's DrawingManager is NOT set.
iconstring|Icon|SymbolIcon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url.
opacitynumberThe Marker's opacity between 0.0 and 1.0.
positionLatLng|Point2DMarker position. Required.
titlestringRollover text
visiblebooleanIf true, the Marker is visible
zIndexnumberAll markers are displayed on the map/canvas in order of their zIndex, with higher values displaying in front of markers with lower values.
coStrMapMapCoString map/canvas on which to display Marker.

zhupiter.CoStr.InfoWindow class

Constructor

ConstructorDescription
InfoWindow(opts?:InfoWindowOptions)Creates an info window marker with the given options.

Methods

MethodsReturn ValueDescription
getClickable()boolean
getContent()string|Node
getCursor()string
getDraggable()boolean
getIcon()string|Icon|Symbol
getMap()MapReturns the CoString map/canvas on which this InfoWindow is attached.
getOpacity()number
getPosition()LatLng|Point2D
getTitle()string
getVisible()boolean
getZIndex()number
setClickable(flag:boolean)None
setContent(content:string|Node)None
setCursor(cursor:string)None
setDraggable(flag:boolean)None
setIcon(icon:string|Icon|Symbol)None
setMap(map:Map)NoneRenders the InfoWindow on the specified CoString map/canvas. If Map is set to null, the InfoWindow will be removed.
setOpacity(opacity:number)None
setOptions(options:InfoWindowOptions)None
setPosition(yx:LatLng|LatLngLiteral|Point2D)None
setTitle(title:string)None
setVisible(visible:boolean)None
setZIndex(zIndex:number)None

Events

EventsArgumentsDescription
clickMouseEvent|MouseEvent2DThis event is fired when the marker icon was clicked.
clickable_changedNoneThis event is fired when the marker's clickable property changes.
content_changedNoneThis event is fired when the content property changes.
cursor_changedNoneThis event is fired when the marker's cursor property changes.
dblclickMouseEvent|MouseEvent2DThis event is fired when the marker icon was double clicked.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the marker.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the marker.
draggable_changedNoneThis event is fired when the marker's draggable property changes.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging the marker.
mousedownMouseEvent|MouseEvent2DThis event is fired for a mousedown on the marker.
mouseoutMouseEvent|MouseEvent2DThis event is fired when the mouse leaves the area of the marker icon.
mouseoverMouseEvent|MouseEvent2DThis event is fired when the mouse enters the area of the marker icon.
mouseupMouseEvent|MouseEvent2DThis event is fired for a mouseup on the marker.
position_changedNoneThis event is fired when the marker position property changes.
rightclickMouseEvent|MouseEvent2DThis event is fired for a rightclick on the marker.
title_changedNoneThis event is fired when the marker title property changes.
visible_changedNoneThis event is fired when the marker's visible property changes.
zindex_changedNoneThis event is fired when the marker's zIndex property changes.

zhupiter.CoStr.InfoWindowOptions object

Properties

PropertiesTypeDescription
clickablebooleanIf true, the InfoWindow receives mouse and touch events. Default value is true.
cursorstringMouse cursor to show on hover
draggablebooleanIf true, the InfoWindow can be dragged. Default value is false if the map's DrawingManager is NOT set.
iconstring|Icon|SymbolIcon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url.
opacitynumberThe InfoWindow's opacity between 0.0 and 1.0.
positionLatLng|Point2DInfoWindow position. Required.
titlestringRollover text
visiblebooleanIf true, the InfoWindow is visible
zIndexnumberAll markers are displayed on the map/canvas in order of their zIndex, with higher values displaying in front of markers with lower values.
contentstringContent of InfoWindow.
coStrMapMapCoString map/canvas on which to display InfoWindow.

zhupiter.CoStr.Polyline class

Constructor

ConstructorDescription
Polyline(opts?:PolylineOptions)Create a polyline using the passed PolylineOptions, which specify both the path of the polyline and the stroke style to use when drawing the polyline.

Methods

MethodsReturn ValueDescription
getDraggable()booleanReturns whether this Polyline can be dragged by the user.
getEditable()booleanReturns whether this Polyline can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Polyline is attached.
getPath()MVCArray.<LatLng|Point2D>Retrieves the first path.
getVisible()booleanReturns whether this Polyline is visible on the map/canvas.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Polyline over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Polyline by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Polyline on the specified CoString map/canvas. If Map is set to null, the Polyline will be removed.
setOptions(options:PolylineOptions)None
setPath(path:MVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>)NoneSets the first path.
setVisible(visible:boolean)NoneHides this Polyline if set to false.

Events

EventsArgumentsDescription
clickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Polyline.
dblclickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Polyline.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Polyline.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Polyline.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging thePolyline.
mousedownPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Polyline.
mousemovePolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Polyline.
mouseoutPolyMouseEvent|MouseEvent2DThis event is fired on Polyline mouseout.
mouseoverPolyMouseEvent|MouseEvent2DThis event is fired on Polyline mouseover.
mouseupPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Polyline.
rightclickPolyMouseEvent|MouseEvent2DThis event is fired when the Polyline is right-clicked on.

zhupiter.CoStr.PolylineOptions object

Properties

PropertiesTypeDescription
clickablebooleanIndicates whether this Polyline handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Polyline over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Polyline by dragging the control points shown at the vertices (and on each segment). Defaults to false.
pathMVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>The ordered sequence of coordinates of the Polyline.
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Polyline is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Polyline.

zhupiter.CoStr.Polygon class

Constructor

ConstructorDescription
Polygon(opts?:PolygonOptions)Create a polygon using the passed PolygonOptions.

Methods

MethodsReturn ValueDescription
getDraggable()booleanReturns whether this Polygon can be dragged by the user.
getEditable()booleanReturns whether this Polygon can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Polygon is attached.
getPath()MVCArray.<LatLng|Point2D>Retrieves the first path.
getVisible()booleanReturns whether this Polygon is visible on the map/canvas.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Polygon over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Polygon by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Polygon on the specified CoString map/canvas. If Map is set to null, the Polygon will be removed.
setOptions(options:PolygonOptions)None
setPath(path:MVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>)NoneSets the first path.
setVisible(visible:boolean)NoneHides this Polygon if set to false.

Events

EventsArgumentsDescription
clickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Polygon.
dblclickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Polygon.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Polygon.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Polygon.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging thePolygon.
mousedownPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Polygon.
mousemovePolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Polygon.
mouseoutPolyMouseEvent|MouseEvent2DThis event is fired on Polygon mouseout.
mouseoverPolyMouseEvent|MouseEvent2DThis event is fired on Polygon mouseover.
mouseupPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Polygon.
rightclickPolyMouseEvent|MouseEvent2DThis event is fired when the Polygon is right-clicked on.

zhupiter.CoStr.PolygonOptions object

Properties

PropertiesTypeDescription
clickablebooleanIndicates whether this Polygon handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Polygon over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Polygon by dragging the control points shown at the vertices (and on each segment). Defaults to false.
fillColorstringThe fill color. All CSS3 colors are supported except for extended named colors.
fillOpacitynumberThe fill opacity between 0.0 and 1.0
pathMVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>The ordered sequence of coordinates of the Polygon.
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Polygon is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Polygon.

zhupiter.CoStr.Line class

Constructor

ConstructorDescription
Line(opts?:LineOptions)Create a line using the passed LineOptions.

Methods

MethodsReturn ValueDescription
getDraggable()booleanReturns whether this Line can be dragged by the user.
getEditable()booleanReturns whether this Line can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Line is attached.
getVisible()booleanReturns whether this Line is visible on the map/canvas.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Line over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Line by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Line on the specified CoString map/canvas. If Map is set to null, the Line will be removed.
setOptions(options:LineOptions)None
setVisible(visible:boolean)NoneHides this Line if set to false.

Events

EventsArgumentsDescription
clickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Line.
dblclickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Line.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Line.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Line.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging theLine.
mousedownPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Line.
mousemovePolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Line.
mouseoutPolyMouseEvent|MouseEvent2DThis event is fired on Line mouseout.
mouseoverPolyMouseEvent|MouseEvent2DThis event is fired on Line mouseover.
mouseupPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Line.
rightclickPolyMouseEvent|MouseEvent2DThis event is fired when the Line is right-clicked on.

zhupiter.CoStr.LineOptions object

Properties

PropertiesTypeDescription
clickablebooleanIndicates whether this Line handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Line over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Line by dragging the control points shown at the vertices (and on each segment). Defaults to false.
pathMVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>The ordered sequence of coordinates of the Line.
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Line is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Line.

zhupiter.CoStr.Triangle class

Constructor

ConstructorDescription
Triangle(opts?:TriangleOptions)Create a triangle polygon using the passed TriangleOptions.

Methods

MethodsReturn ValueDescription
getDraggable()booleanReturns whether this Triangle can be dragged by the user.
getEditable()booleanReturns whether this Triangle can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Triangle is attached.
getPath()MVCArray.<LatLng|Point2D>Retrieves the first path.
getVisible()booleanReturns whether this Triangle is visible on the map/canvas.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Triangle over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Triangle by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Triangle on the specified CoString map/canvas. If Map is set to null, the Triangle will be removed.
setOptions(options:TriangleOptions)None
setPath(path:MVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>)NoneSets the first path.
setVisible(visible:boolean)NoneHides this Triangle if set to false.

Events

EventsArgumentsDescription
clickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Triangle.
dblclickPolyMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Triangle.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Triangle.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Triangle.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging theTriangle.
mousedownPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Triangle.
mousemovePolyMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Triangle.
mouseoutPolyMouseEvent|MouseEvent2DThis event is fired on Triangle mouseout.
mouseoverPolyMouseEvent|MouseEvent2DThis event is fired on Triangle mouseover.
mouseupPolyMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Triangle.
rightclickPolyMouseEvent|MouseEvent2DThis event is fired when the Triangle is right-clicked on.

zhupiter.CoStr.TriangleOptions object

Properties

PropertiesTypeDescription
clickablebooleanIndicates whether this Triangle handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Triangle over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Triangle by dragging the control points shown at the vertices (and on each segment). Defaults to false.
fillColorstringThe fill color. All CSS3 colors are supported except for extended named colors.
fillOpacitynumberThe fill opacity between 0.0 and 1.0
pathMVCArray.<LatLng|Point2D>|Array.<LatLng|LatLngLiteral|Point2D>The ordered sequence of coordinates of the Triangle.
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Triangle is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Triangle.

zhupiter.CoStr.Rectangle class

Constructor

ConstructorDescription
Rectangle(opts?:RectangleOptions)Create a rectangle using the passed RectangleOptions, which specify the bounds and style.

Methods

MethodsReturn ValueDescription
getBounds()LatLngBounds|Bounds2DReturns the bounds of this rectangle.
getDraggable()booleanReturns whether this Rectangle can be dragged by the user.
getEditable()booleanReturns whether this Rectangle can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Rectangle is attached.
getVisible()booleanReturns whether this Rectangle is visible on the map/canvas.
setBounds(bounds:LatLngBounds|Bounds2D)NoneSets the bounds of this rectangle.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Rectangle over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Rectangle by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Rectangle on the specified CoString map/canvas. If Map is set to null, the Rectangle will be removed.
setOptions(options:RectangleOptions)None
setVisible(visible:boolean)NoneHides this Rectangle if set to false.

Events

EventsArgumentsDescription
bounds_changedNoneThis event is fired when the rectangle's bounds are changed.
clickMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Rectangle.
dblclickMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Rectangle.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Rectangle.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Rectangle.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging theRectangle.
mousedownMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Rectangle.
mousemoveMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Rectangle.
mouseoutMouseEvent|MouseEvent2DThis event is fired on Rectangle mouseout.
mouseoverMouseEvent|MouseEvent2DThis event is fired on Rectangle mouseover.
mouseupMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Rectangle.
rightclickMouseEvent|MouseEvent2DThis event is fired when the Rectangle is right-clicked on.

zhupiter.CoStr.RectangleOptions object

Properties

PropertiesTypeDescription
boundsLatLngBounds|Bounds2DThe bounds.
clickablebooleanIndicates whether this Rectangle handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Rectangle over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Rectangle by dragging the control points shown at the vertices (and on each segment). Defaults to false.
fillColorstringThe fill color. All CSS3 colors are supported except for extended named colors.
fillOpacitynumberThe fill opacity between 0.0 and 1.0
mapMapMap on which to display Rectangle.
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Rectangle is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Rectangle.

zhupiter.CoStr.Circle class

Constructor

ConstructorDescription
Circle(opts?:CircleOptions)Create a circle using the passed CircleOptions, which specify the center, radius, and style.

Methods

MethodsReturn ValueDescription
getBounds()LatLngBounds|Bounds2DGets the bounds of this Circle.
getCenter()LatLng|Point2DReturns the center of this Circle.
getDraggable()booleanReturns whether this Circle can be dragged by the user.
getEditable()booleanReturns whether this Circle can be edited by the user.
getMap()MapReturns the CoString map/canvas on which this Circle is attached.
getRadius()numberReturns the radius of this circle (in meters).
getVisible()booleanReturns whether this Circle is visible on the map/canvas.
setCenter(center:LatLng|LatLngLiteral|Point2D)NoneSets the center of this Circle.
setDraggable(draggable:boolean)NoneIf set to true, the user can drag this Circle over the map.
setEditable(editable:boolean)NoneIf set to true, the user can edit this Circle by dragging the control points shown at the vertices (and on each segment).
setMap(map:Map)NoneRenders the Circle on the specified CoString map/canvas. If Map is set to null, the Circle will be removed.
setOptions(options:CircleOptions)None
setRadius(radius:number)NoneSets the radius of this circle (in meters).
setVisible(visible:boolean)NoneHides this Circle if set to false.

Events

EventsArgumentsDescription
center_changedNoneThis event is fired when the circle's center is changed.
clickMouseEvent|MouseEvent2DThis event is fired when the DOM click event is fired on the Circle.
dblclickMouseEvent|MouseEvent2DThis event is fired when the DOM dblclick event is fired on the Circle.
dragMouseEvent|MouseEvent2DThis event is repeatedly fired while the user drags the Circle.
dragendMouseEvent|MouseEvent2DThis event is fired when the user stops dragging the Circle.
dragstartMouseEvent|MouseEvent2DThis event is fired when the user starts dragging theCircle.
mousedownMouseEvent|MouseEvent2DThis event is fired when the DOM mousedown event is fired on the Circle.
mousemoveMouseEvent|MouseEvent2DThis event is fired when the DOM mousemove event is fired on the Circle.
mouseoutMouseEvent|MouseEvent2DThis event is fired on Circle mouseout.
mouseoverMouseEvent|MouseEvent2DThis event is fired on Circle mouseover.
mouseupMouseEvent|MouseEvent2DThis event is fired when the DOM mouseup event is fired on the Circle.
radius_changedNoneThis event is fired when the circle's radius is changed.
rightclickMouseEvent|MouseEvent2DThis event is fired when the Circle is right-clicked on.

zhupiter.CoStr.CircleOptions object

Properties

PropertiesTypeDescription
centerLatLng|Point2DThe center
clickablebooleanIndicates whether this Circle handles mouse events. Defaults to true.
draggablebooleanIf set to true, the user can drag this Circle over the map/canvas. Defaults to false.
editablebooleanIf set to true, the user can edit this Circle by dragging the control points shown at the vertices (and on each segment). Defaults to false.
fillColorstringThe fill color. All CSS3 colors are supported except for extended named colors.
fillOpacitynumberThe fill opacity between 0.0 and 1.0
mapMapMap on which to display Circle.
radiusnumberThe radius in meters on the Earth's surface
strokeColorstringThe stroke color. All CSS3 colors are supported except for extended named colors.
strokeOpacitynumberThe stroke opacity between 0.0 and 1.0.
strokeWeightnumberThe stroke width in pixels.
visiblebooleanWhether this Circle is visible on the map. Defaults to true.
zIndexnumberThe zIndex compared to other polys.
coStrMapMapCoString map/canvas on which to display Circle.

zhupiter.CoStr.CoStrEventListener object

This class is opaque. It has no methods and no constructor. Its instances are returned from addListener(), addDomListener() and are eventually passed back to removeListener().

zhupiter.CoStr.event namespace

Static Methods

Static MethodsReturn ValueDescription
addDomListener(instance:Object, eventName:string, handler:Function, capture?:boolean)CoStrEvantListenerCross browser event handler registration. This listener is removed by calling removeListener(handle) for the handle that is returned by this function.
addDomListenerOnce(instance:Object, eventName:string, handler:Function, capture?:boolean)CoStrEvantListenerWrapper around addDomListener that removes the listener after the first event.
addListener(instance:Object, eventName:string, handler:Function)CoStrEvantListenerAdds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().
addListenerOnce(instance:Object, eventName:string, handler:Function)CoStrEvantListenerLike addListener, but the handler removes itself after handling the first event.
removeListener(listener:CoStrEvantListener)NoneRemoves the given listener, which should have been returned by addListener above.

zhupiter.CoStr.MouseEvent2D object

Properties

PropertiesTypeDescription
xyPoint2DThe x/y that was below the cursor when the event occurred.

zhupiter.CoStr.Point2D class

A Point2D is a point in two-dimensional coordinates: x and y. Used in CANVAS2D CoString type.

Constructor

ConstructorDescription
Point2D(x:number, y:number)Creates a Point2D object representing a two-dimensional point. Note the ordering of x and y.

Methods

MethodsReturn ValueDescription
equals(other:Point2D)booleanCompares two Point2D points.
x()numberReturns the x in pixels.
y()numberReturns the y in pixels.
toString()stringConverts to string representation.
update(point:Point2D)NoneUpdates the x/y values according to the input point.
updateXY(x:number, y:number)NoneUpdates the x/y values for this Point2D.

Properties

PropertiesTypeDescription
fXnumberThe X coordinate
fYnumberThe Y coordinate

zhupiter.CoStr.Bounds2D class

A Bounds2D instance represents a rectangle in two-dimensional coordinates. Used in CANVAS2D CoString type.

Constructor

ConstructorDescription
Bounds2D(sw?:Point2D, ne?:Point2D)Constructs a rectangle from the points at its south-west and north-east corners.

Methods

MethodsReturn ValueDescription
contains(xy:Point2D)booleanReturns true if the given x/y is in this bounds.
equals(other:Bounds2D)booleanReturns true if this bounds approximately equals the given bounds.
getCenter()Point2DComputes the center of this Bounds2D
getNorthEast()Point2DReturns the north-east corner of this bounds.
getSouthWest()Point2DReturns the south-west corner of this bounds.
update(bounds:Bounds2D)NoneUpdates this bounds according to the input bounds.
updateXyBounds(swx:number, swy:number, nex:number, ney:number)NoneUpdates the south-west corner x/y and north-east corner x/y values for this Bounds2D.

zhupiter.CoStr.MVCArray class

Constructor

ConstructorDescription
MVCArray(array?:Array)A mutable MVC Array.

Methods

MethodsReturn ValueDescription
clear()NoneRemoves all elements from the array.
forEach(callback:function(*, number))NoneIterate over each element, calling the provided callback. The callback is called for each element like: callback(element, index).
getArray()ArrayReturns a reference to the underlying Array.
getAt(i:number)*Returns the element at the specified index.
getLength()numberReturns the number of elements in this array.
insertAt(i:number, elem:*)NoneInserts an element at the specified index.
pop()*Removes the last element of the array and returns that element.
push(elem:*)numberAdds one element to the end of the array and returns the new length of the array.
removeAt(i:number)*Removes an element from the specified index.
setAt(i:number, elem:*)NoneSets an element at the specified index.

zhupiter.CoStr.drawing.DrawingManager class

Constructor

ConstructorDescription
DrawingManager(options?:DrawingManagerOptions)Creates a DrawingManager that allows users to draw overlays on the map/canvas, and switch between the type of overlay to be drawn with a drawing control.

Methods

MethodsReturn ValueDescription
getDrawingMode()OverlayTypeReturns the DrawingManager's drawing mode.
getFillColor()stringReturns the current fill color for new overlays.
getFillOpacity()numberReturns the current fill opacity for new overlays.
getMap()MapReturns the CoString Map to which the DrawingManager is attached, which is the CoString Map on which the overlays created will be placed.
getRawMap()GMapThis method is only available for GMAP CoString type. Returns the current GMap object.
getStrokeColor()stringReturns the current stroke color for new overlays.
getStrokeOpacity()numberReturns the current stroke opacity for new overlays.
getStrokeWeight()numberReturns the current stroke weight in pixels for new overlays.
setDrawingMode(drawingMode:OverlayType)NoneChanges the DrawingManager's drawing mode, which defines the type of overlay to be added on the map/canvas. Accepted values are MARKER, POLYGON, POLYLINE, RECTANGLE, CIRCLE, INFO, LINE, TRIANGLE, HAND or DELETE.
setFillColor(color:string)NoneSets the current fill color for new overlays.
setFillOpacity(opacity:number)NoneSets the current fill opacity for new overlays.
setMap(map:Map)NoneAttaches the DrawingManager object to the specified CoString Map.
setOptions(options:DrawingManagerOptions)NoneSets the DrawingManager's options.
setStrokeColor(color:string)NoneSets the current stroke color for new overlays.
setStrokeOpacity(opacity:number)NoneSets the current stroke opacity for new overlays.
setStrokeWeight(weight:number)NoneSets the current stroke weight in pixels for new overlays.

zhupiter.CoStr.drawing.DrawingManagerOptions object

Properties

PropertiesTypeDescription
continuousDrawingbooleanIf set to false, the frawing mode is changed to HAND operation after drawing a shape.
coStrDmDivDIVCoString DrawingManaer DIV HTML container
coStrDrawingControlsarray.<ControlType>The drawing controls that want to be enabled are added into the array. Accepted values are MODES, STROKE, FILL, and WEIGHT. All controls are enabled if this property is not set.
coStrDrawingModesayyay.<OverlayType>The drawing modes that want to be enabled are added into the array. Accepted values are MARKER, POLYLINE, POLYGON, RECTANGLE, CIRCLE, INFO, LINE, TRIANGLE, HAND, and DELETE. All modes are enabled if this property is not set.
coStrDrawingModeOverlayTypeInitial selected drawing mode of DrawingManager. Defaults to HAND operation.
coStrLangstringThe language used in the DrawingManager. Accepted values are 'en': English, 'cht': Tranditional Chinese, 'chs': Simple Chinese
coStrMapMapThe CoString Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed. Required.
draggablebooleanIf set to true, the user can drag this DrawingManager. Defaults to false.
fillColorstringInitial fill color of DrawingManager
fillOpacitynumberInitial fill opacity of DrawingManager
strokeColorstringInitial stroke color of DrawingManager
strokeOpacitynumberInitial stroke opacity of DrawingManager
strokeWeightnumberInitial stroke weight of DrawingManager

zhupiter.CoStr.drawing.OverlayType class

Constant

ConstantDescription
MARKERMaerker overlay
POLYLINEPolyline overlay
POLYGONPolygon overlay
RECTANGLERectenagle overlay
CIRCLECircle overlay
INFOInfoWindow Marker overlay
LINELine overlay
TRIANGLETriangle overlay
HANDHand operation
DELETEDelete operation

zhupiter.CoStr.drawing.ControlType class

Constant

ConstantDescription
MODESDrawingModes control of OverlayType
STROKEStroke control
FILLFill Control
WEIGHTStroke weight control

座標物語 | 贊助比特幣: 1LX5KC19tXCPK8y72Z6LVoZjoSaCp9P6K