Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Google Map Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Scale control

The Scale control displays a map scale element. This control is not enabled by default.

Build your scale control

use Ivory\GoogleMap\Controls\ControlPosition;
use Ivory\GoogleMap\Controls\ScaleControl;
use Ivory\GoogleMap\Controls\ScaleControlStyle;

$scaleControl = new ScaleControl();

// Configure your scale control
$scaleControl->setControlPosition(ControlPosition::BOTTOM_LEFT);
$scaleControl->setScaleControlStyle(ScaleControlStyle::DEFAULT_);

Configure your scale control position

For configurating the pan control position, the better way is to follow the oriented object way. For that, the Ivory\GoogleMap\Controls\ControlPosition is here. It allows you to access all constants which describe control position. If you don't want to use this class, you can directly use the constant value.

use Ivory\GoogleMap\Controls\ControlPosition;
use Ivory\GoogleMap\Controls\ScaleControl;

$scaleControl = new ScaleControl();

// Sets your control position
$scaleControl->setControlPosition(ControlPosition::TOP_LEFT);
$scaleControl->setControlPosition('top_left');

$scaleControl->setControlPosition(ControlPosition::TOP_CENTER);
$scaleControl->setControlPosition('top_center');

$scaleControl->setControlPosition(ControlPosition::TOP_RIGHT);
$scaleControl->setControlPosition('top_right');

$scaleControl->setControlPosition(ControlPosition::LEFT_TOP);
$scaleControl->setControlPosition('left_top');

$scaleControl->setControlPosition(ControlPosition::LEFT_CENTER);
$scaleControl->setControlPosition('left_center');

$scaleControl->setControlPosition(ControlPosition::LEFT_BOTTOM);
$scaleControl->setControlPosition('left_bottom');

$scaleControl->setControlPosition(ControlPosition::RIGHT_TOP);
$scaleControl->setControlPosition('right_top');

$scaleControl->setControlPosition(ControlPosition::RIGHT_CENTER);
$scaleControl->setControlPosition('right_center');

$scaleControl->setControlPosition(ControlPosition::RIGHT_BOTTOM);
$scaleControl->setControlPosition('right_bottom');

$scaleControl->setControlPosition(ControlPosition::BOTTOM_LEFT);
$scaleControl->setControlPosition('bottom_left');

$scaleControl->setControlPosition(ControlPosition::BOTTOM_CENTER);
$scaleControl->setControlPosition('bottom_center');

$scaleControl->setControlPosition(ControlPosition::BOTTOM_RIGHT);
$scaleControl->setControlPosition('bottom_right');

Configure your scale control style

For configurating the scale control style, the better way is to follow the oriented object way. For that, the Ivory\GoogleMap\Controls\ScaleControlStyle is here. It allows you to access all constants which describe scale control style. If you don't want to use this class, you can directly use the constant value.

use Ivory\GoogleMap\Controls\ScaleControl;
use Ivory\GoogleMap\Controls\ScaleControlStyle;

$scaleControl = new ScaleControl();

// Sets your scale control style
$scaleControl->setScaleControlStyle(ScaleControlStyle::DEFAULT_);

Add your scale control to the map

use Ivory\GoogleMap\Controls\ControlPosition;
use Ivory\GoogleMap\Controls\ScaleControl;
use Ivory\GoogleMap\Controls\ScaleControlStyle;

$scaleControl = new ScaleControl();

// Add your scale control to the map
$map->setScaleControl($scaleControl);
$map->setScaleControl(ControlPosition::BOTTOM_LEFT, ScaleControlStyle::DEFAULT_);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky