arcasolutions/google-map
Laravel package providing Google Maps integration for your app, with helpers to generate map views and include the required scripts. Useful for quickly embedding maps and configuring markers or map options within Laravel projects.
This object defines the marker shape to use in determination of a marker's clickable region. The shape consists of two properties "type" and "coordinates" which define the general type of marker and coordinates specific to that type of marker.
The format of this attribute depends on the value of the type and follows the w3 AREA coords specification found at http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords. The coordinates attribute is an array of integers that specify the pixel position of the shape relative to the top-left corner of the target image. The coordinates depend on the value of type as follows:
use Ivory\GoogleMap\Overlays\MarkerShape;
$markerShape = new MarkerShape();
// Configure your marker shape options
$markerShape->setPrefixJavascriptVariable('marker_shape_');
$markerShape->setType('poly');
$markerShape->setCoordinates(array(1, 1, 1, -1, -1, -1, -1, 1));
// If the marker shape type is "poly", you can add coordinate one by one
$markerShape->addPolyCoordinates(1, 1);
Now you have configurated your marker shape, you need to add it to your marker.
use Ivory\GoogleMap\Overlays\MarkerShape;
$markerShape = new MarkerShape();
// Add your marker shape to the marker
$marker->setShape($markerShape);
How can I help you explore Laravel packages today?