A Circle is a visual representation of a circular shaped surface on a map.
| Name | Type | Description |
|---|---|---|
center |
H.geo.IPoint |
The geographical coordinates of the center of the circle |
radius |
number |
The radius of the circle in meters |
opt_options |
H.map.Circle.Options |
optional
An object that specifies the initialization options of the circle (among these,
|
Extends
Members
-
draggable boolean inherited
-
Indicates whether the map object will be considered as target for drag events. The default value is
false
Methods
-
addEventListener (type, handler, opt_capture, opt_scope) inherited
-
This method adds a listener for a specific event.
Note that to prevent potential memory leaks, you must either call
removeEventListenerordisposeon the given object when you no longer need it.Name Type Description typestring The name of the event
handlerfunction An event handler function
opt_captureboolean optional trueindicates that the method should listen in the capture phase (bubble otherwise)opt_scopeObject optional An object defining the scope for the handler function
-
addOnDisposeCallback (callback, opt_scope) inherited
-
This method adds a callback which is triggered when the
EventTargetobject is being disposed.Name Type Description callbackfunction The callback function.
opt_scopeObject optional An optional scope for the callback function
-
compareZOrder (other)number inherited
-
This method compares the rendering z-order of the given object with another object. (The 'given object' mean the object on which the method has been invoke.)
Name Type Description otherH.map.Object The map object with which to compare the given object.
Returns:
Type Description number A value lower than 0indicates that the given object has a lower z-order.0indicates that both objects have the same z-order. A value greater than0, indicates that the given object has a higher z-order. -
contains (object)boolean inherited
-
This method checks whether the received object is an inclusive descendant of the given object.
Name Type Description object* The object to check.
Returns:
Type Description boolean trueif the given object is contained in the given object, otherwisefalse -
dispatchEvent (evt) inherited
-
This method dispatches an event on the
EventTargetobject.Name Type Description evtH.util.Event | string An object representing the event or a string with the event name
-
dispose () inherited
-
This method removes listeners from the given object. Classes that extend
EventTargetmay need to override this method in order to remove references to DOM Elements and additional listeners. -
getArrows ()H.map.ArrowStyle | undefined inherited
-
This method retrieves the arrow style of the given spatial object or
undefinedif the style is not defined. The returned arrow style is treated as immutable and must not be modified afterwards to prevent inconsistencies!Returns:
Type Description H.map.ArrowStyle | undefined An object encapsulating information about the arrow style or undefinedif the arrow style is not defined. -
getBoundingBox ()H.geo.Rect inherited
-
Returns the smallest rectangle which encloses the whole geometry of the GeoShape.
Returns:
Type Description H.geo.Rect -
getCenter ()H.geo.IPoint
-
This method retrieves the center of the circle. You must not modify the returned object without calling without calling
setCenter()immediately afterwards.Returns:
Type Description H.geo.IPoint An object containing the geographical coordinates of the center of the circle -
getData ()* inherited
-
To retrieve arbitrary data associated with the given object.
Returns:
Type Description * The associated data. -
getElevation ()number inherited
-
Returns elevation of the polygon in meters.
Returns:
Type Description number -
getExtrusion ()number inherited
-
Returns extrusion of the polygon in meters.
Returns:
Type Description number -
getGeometry ()H.geo.Polygon | H.geo.MultiPolygon inherited overrides
-
To obtain the polygon's geometry. If you modify the obtained geometry, you must call
setGeometryafterwards to not violate the integrity of the polygon.Returns:
Type Description H.geo.Polygon | H.geo.MultiPolygon -
getId ()* inherited
-
This method retrieves the ID of the given object.
Returns:
Type Description * The identifier of the given object. -
getInvalidations ()H.map.provider.Invalidations inherited
-
This method retrieves the invalidation states for the given object.
Returns:
Type Description H.map.provider.Invalidations An object containing the invalidation states -
getParentGroup ()H.map.Group inherited
-
This method retrieves the parent group which contains the given object or
nullif the object is not contained in any group.Returns:
Type Description H.map.Group An object representing the containing group object or nullif the given object is not contained in any group. -
This method retrieves the precision of the given circle.
Returns:
Type Description number A value representing the precision of the given circle. -
getProvider ()H.map.provider.ObjectProvider inherited
-
This method obtains the current provider of the given object.
Returns:
Type Description H.map.provider.ObjectProvider An object representing the provider -
This method retrieves the length of the radius of the circle in meters.
Returns:
Type Description number A value representing the length of the circle radius in meters. -
getRemoteId ()number | string | undefined inherited
-
This method retrieves the remote ID of the given object.
Returns:
Type Description number | string | undefined The remote identifier of the given object. -
getRootGroup ()H.map.Object inherited
-
The root object to which the given object is attached or the object itself if it is not attached to another.
Returns:
Type Description H.map.Object An object representing the root group for the given object or the given object if it is not part of a group. -
getStyle ()H.map.SpatialStyle inherited
-
This method retrieves the drawing style of the given spatial object. The returned style is treated as immutable and must not be modified afterwards to prevent inconsistencies!
Returns:
Type Description H.map.SpatialStyle The given spatial object -
getVisibility (opt_effective)boolean inherited
-
This method retrieves a value indicating the visibility of the given object.
Name Type Description opt_effectiveboolean optional Indicates whether the effective visibility is requested, defaults to
false. If set totruethe visibility of all nesting parent groups on the ancestor axis are also taken into account: The object is only visible if the object itself and all of its nesting parent groups are visible.Returns:
Type Description boolean A value indicating whether the object is visible -
getVolatility (opt_effective)boolean inherited
-
To obtain the volatility indicator of the object.
Name Type Description opt_effectiveboolean optional Indicates whether the effective volatility is requested, defaults to
false. If set totruethe volatility of all nesting parent groups on the ancestor axis are also taken into account: The object is volatile if the object itself or at least one of its nesting parent groups is volatile.Returns:
Type Description boolean -
getZIndex ()number | undefined inherited
-
This method retrieves the z-index of the given object.
Returns:
Type Description number | undefined A value reflecting the z-index of the given object. -
invalidate (flags)boolean inherited
-
This method invalidates the given map object.
Name Type Description flagsH.math.BitMask.<!H.map.provider.Invalidations.Flag> The value indicates the types of invalidations to the given object.
Returns:
Type Description boolean Indicates whether a validation was executed (only if the object has a provider) -
isClosed ()boolean inherited
-
This method indicates whether this spatial object represents a closed shape.
Returns:
Type Description boolean trueif the given spatial object is a closed shape,falseotherwise -
removeEventListener (type, handler, opt_capture, opt_scope) inherited
-
This method removes a previously added listener from the
EventTargetinstance.Name Type Description typestring The name of the event
handlerfunction A previously added event handler
opt_captureboolean optional trueindicates that the method should listen in the capture phase (bubble otherwise)opt_scopeObject optional An object defining the scope for the handler function
-
setArrows (opt_arrows)H.map.Spatial inherited
-
This method sets the arrow style of the given spatial object.
Valid only when using map engine type
H.Map.EngineType['P2D'].With engine type
H.Map.EngineType['WEBGL'], an arrows style for the given spatial object can be set within thestyleproperty in the configuration options object passed to the constructor or in the style object argument provided to thesetStylemethod.
See propertieslineDash,lineDashOffset,lineTailCapandlineHeadCapinH.map.SpatialStyle.Optionsfor more details.Name Type Description opt_arrowsH.map.ArrowStyle | H.map.ArrowStyle.Options optional The arrow style to be applied
Returns:
Type Description H.map.Spatial The given spatial object -
This method sets the geographical center of the circle. If the specified center is an instance of
H.geo.Point, you must not modify it without callingsetCenter()immediately afterwards.Name Type Description centerH.geo.IPoint An object defining the geographical coordinates of the center of the circle
-
setData (data)H.map.Object inherited
-
This method stores arbitrary data associated with the given object.
Name Type Description data* The data to be stored
Returns:
Type Description H.map.Object The given map object itself -
setElevation (elevation) inherited
-
Sets elevation of the polygon in meters.
Name Type Description elevationnumber The elevation in meters. Must be greater than or equal to
0. The maximum supported cumulative height (elevation + extrusion) isH.map.Polygon.MAX_EXTRUDE_HEIGHT.Throws:
-
-
If the specified value is invalid.
-
-
-
If cumulative height is out of range
[0, H.map.Polygon.MAX_EXTRUDE_HEIGHT].
-
-
-
setExtrusion (extrusion) inherited
-
To set the extrusion of the polygon in meters.
Name Type Description extrusionnumber The extrusion in meters. Must be greater than or equal to
0. The maximum supported cumulative height (elevation + extrusion) isH.map.Polygon.MAX_EXTRUDE_HEIGHT.Throws:
-
-
If the specified value is invalid.
-
-
-
If cumulative height is out of range
[0, H.map.Polygon.MAX_EXTRUDE_HEIGHT].
-
-
-
setGeometry (geometry)H.map.Polygon inherited overrides
-
To set the polygon's geometry. If the given geometry is modified afterwards, it must be set via
setGeometryagain to not violate the integrity of the polygon.Name Type Description geometryH.geo.Polygon | H.geo.MultiPolygon Returns:
Type Description H.map.Polygon -
This method sets the precision of the circle (see
H.map.Circle.Options#precision).Name Type Description precisionnumber A value indicating precision
-
This method sets the length of the radius of the circle in meters. The value is restricted to the range of [0 ... 20015089.27787877] (half of WGS84 mean circumference).
Name Type Description radiusnumber -
setRemoteId (id)H.map.Object inherited
-
This method sets the ID that identifies the given object in a remote service.
Name Type Description idnumber | string The identifier to assign to the given object.
Returns:
Type Description H.map.Object The given map object itself -
setStyle (opt_style)H.map.Spatial inherited
-
This method sets the drawing style of the given spatial object. If the argument
opt_styleis an instance ofH.map.SpatialStyle, it is treated as immutable and must not be modified afterwards to prevent inconsistencies! .Name Type Description opt_styleH.map.SpatialStyle | H.map.SpatialStyle.Options optional The style to set. If it evaluates to a
false, theH.map.SpatialStyle.DEFAULT_STYLEis used.Returns:
Type Description H.map.Spatial The given spatial object -
setVisibility (opt_visibility)H.map.Object inherited
-
This method sets the visibility of the given object.
Name Type Description opt_visibilityboolean optional Indicates whether the map object should be visible, the default value is
false.Returns:
Type Description H.map.Object The given object -
setVolatility (opt_volatility)H.map.Object inherited
-
To set the volatility indicator of the object
Name Type Description opt_volatilityboolean optional The volatility value to set,
truemeans volatile,falsemeans non-volatile. The default value isfalse.Returns:
Type Description H.map.Object The given object -
setZIndex (zIndex)H.map.Object inherited
-
This method sets the z-index of the given object.
Name Type Description zIndexnumber | undefined A value indicating the new z-index
Returns:
Type Description H.map.Object The given object -
toGeoJSON (opt_callback)Object inherited
-
To obtain a GeoJSON
Featureobject representing the given map object.Name Type Description opt_callbackfunction(*) optional Callback called with the object's data as argument. It must return either a valid JSON object or
nullwhich will be set as value for the Feature's properties key.- See:
Throws:
-
-
If the provided callback is not a function.
-
-
-
If the callback (if provided) returns an invalid JSON object/null or (if not) the object's data is an invalid JSON object.
- Type
- Error
-
Returns:
Type Description Object A GeoJSON FeatureorFeatureCollectionobject representing the given map object.
Type Definitions
-
This object encapsulates the initialization options for a circle.
Properties:
Name Type Argument Description styleH.map.SpatialStyle <optional>
The style to be used when tracing the polyline (circle)
visibilityboolean <optional>
Indicates whether the map object is visible, the default is
trueA map object is only treated as visible, if it self and all of its nesting parent groups are visible.volatilityboolean <optional>
Indicates whether the map object is volatile, the default is
false. A volatile map object has frequently invalidations (for example geometry or style changes). A map object is already treated as volatile, if it self or one of its nesting parent groups is volatile.precisionnumber <optional>
The precision of the circle as a number of segments to be used when rendering the circle. The value is restricted to the range between [4 ... 360], where 60 is the default. Note that the lower the value the more angular and the less circle-like the shape appears and, conversely, the higher the value the smoother and more rounded the result. Thus, starting at the extreme low end of the possible values, 4 produces a square, 6 a hexagon, while 30 results in a circle-like shape, although it appears increasingly angular as the zoom level increases (as you zoom in), and finally 360 produces a smooth circle.
zIndexnumber <optional>
The z-index value of the circle object, the default is
undefined.minnumber <optional>
The minimum zoom level at which the circle is visible, the default is
-Infinitymaxnumber <optional>
The maximum zoom level at which the circle is visible, the default is
InfinityproviderH.map.provider.Provider <optional>
The provider of the circle object. This property is needed only if a custom implementation of
ObjectProviderwants to instantiate the circle object.data* Optional arbitrary data to be stored with this circle. This data can be retrieved by calling
getData()extrusionnumber <optional>
The extrusion height for the circle in meters, default is
0. The rendering order of the extruded object follows the logic of the regular 2D objects and is defined by the zIndex and the order in which objects are added to the map. Maximum supported "height" (elevation + extrusion) isH.map.Polygon.MAX_EXTRUDE_HEIGHT.elevationnumber <optional>
The elevation height of the circle in meters, default is
0. It can be combined with theextrusionparameter. Maximum supported "height" (elevation + extrusion) isH.map.Polygon.MAX_EXTRUDE_HEIGHT.