-
Notifications
You must be signed in to change notification settings - Fork 34
classes_lib_controls_leaflet.class
HTML anchor element Wraped as control to allow to inherit from this class and add code for AJAX handling in that derivered classes.
Extends: Control » Renderable
Adds an address to the map. Will use geolocation API to resolve the address to a marker.
Definition: public function AddAddress($address, $title=false, $report_back_url=false)
Returns: static
Parameters:
-
string $address
The address as string -
string $title
An optional title -
bool|string $report_back_url
URL to post detection results to (from Javascript) or false to disable
Adds a marker to the map.
Definition: public function AddMarker($lat, $lng, $options)
Returns: static
Parameters:
-
float $lat
Latitute -
float $lng
Longitude -
array $options
Optional options
Shortcut for a named marker.
Definition: public function AddMarkerTitled($lat, $lng, $title, $options)
Returns: static
Parameters:
-
float $lat
Latitude -
float $lng
Longitude -
string $title
Marker title -
array $options
Optional options
Add a polygon.
Definition: public function AddPolygon($color, $points)
Returns: static
Parameters:
-
string $color
HTML color -
array $points
Array of points
Find a location using the OpenStreetMap API.
Definition: static public function FindGeoLocation($search, $sRef=false)
Returns: bool|stdClass
Parameters:
-
string $search
Search text -
string $sRef
Optional referrer string to send with the query
Sets or gets an option
if you specify a $value will set it and retunr $this
. else will return the option value
Definition: public function opt($name, $value=null)
Returns: mixed
If setting an option returns $this
, else returns the option value
Parameters:
-
string $name
option name -
mixed $value
option value or null
OVERRIDE Control::PreRender
En-/Disables auto zooming.
Definition: public function setAutoZoom($on)
Returns: static
Parameters:
-
bool $on
If true on, else off
Sets the maps center point.
Definition: public function setCenterPoint($lat, $lng)
Returns: static
Parameters:
-
float $lat
Latitude -
float $lng
Longitude
Sets the tile provider.
Definition: public function setTileProvider($name)
Returns: static
Parameters:
-
string $name
The provider name
DEPRECATED (2020/10) This method does nothing. It's just there to be compatible with the gMap control.
Disables UI controls.
Definition: public function setUiDisabled($disabled=false)
Returns: static
Parameters:
-
bool $disabled
If true disabled, else not
Sets the maps zoom level.
Definition: public function setZoom($zoomlevel)
Returns: static
Parameters:
-
int $zoomlevel
The initial zoom level