Skip to content

Latest commit

 

History

History
138 lines (58 loc) · 2.41 KB

File metadata and controls

138 lines (58 loc) · 2.41 KB

Markers

DantSu\OpenStreetMapStaticAPI\Markers display markers on the map.

  • Full name: \DantSu\OpenStreetMapStaticAPI\Markers

See Also:

Constants

Constant Value
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_LEFT 'left'
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_CENTER 'center'
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_RIGHT 'right'
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_TOP 'top'
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_MIDDLE 'middle'
\DantSu\OpenStreetMapStaticAPI\Markers::ANCHOR_BOTTOM 'bottom'

Methods

->__construct

Parameters:

Parameter Type Description
pathImage mixed

->addMarker

Add a marker on the map.

Parameters:

Parameter Type Description
coordinate \DantSu\OpenStreetMapStaticAPI\LatLng Latitude and longitude of the marker

Return Value:

$this : Fluent interface


->setAnchor

Define the anchor point of the image marker.

Parameters:

Parameter Type Description
horizontalAnchor int|string Horizontal anchor in pixel or you can use Markers::ANCHOR_LEFT, Markers::ANCHOR_CENTER, Markers::ANCHOR_RIGHT
verticalAnchor int|string Vertical anchor in pixel or you can use Markers::ANCHOR_TOP, Markers::ANCHOR_MIDDLE, Markers::ANCHOR_BOTTOM

Return Value:

$this : Fluent interface


->draw

Draw markers on the image map.

Parameters:

Parameter Type Description
image \DantSu\PHPImageEditor\Image The map image (An instance of DantSu\PHPImageEditor\Image)
mapData \DantSu\OpenStreetMapStaticAPI\MapData Bounding box of the map

Return Value:

$this : Fluent interface

See Also:



Automatically generated from source code comments on 2022-05-31 using phpDocumentor