Locate the user, and optionally follow them.
<HoloMap.Control.Geolocate track_user_location show_user_heading />Props
| Prop | Type | Notes |
|---|---|---|
position | string | Corner to place the control in. Default "top-right" |
track_user_location | boolean | Keep following after the first fix |
show_user_location | boolean | Draw a dot at the users position. Default true |
show_accuracy_circle | boolean | Draw the accuracy radius. Default true |
show_user_heading | boolean | Draw a heading arrow on the dot |
position_options | map | Passed to the browser Geolocation API |
fit_bounds_options | map | Camera options used when zooming to the user |
position_options takes enableHighAccuracy, timeout and maximumAge.
Geolocation requires a secure context and the users permission, and the browser prompt only appears when they click the button. Nothing happens on page load, by design.
Summary
Functions
Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).
Returns the list of property definitions for the compiled component.
Functions
@spec __is_hologram_component__() :: boolean()
Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).
Examples
iex> __is_hologram_component__()
true
Returns the list of property definitions for the compiled component.