hiteshvala / google-map-marker
A Laravel package for Google Map API Collection. You can use all google map features in laravel.
v1.4.0
2023-05-09 06:01 UTC
Requires
- php: ^8.0|^8.1|^8.2
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0
README
Install package
composer require hiteshvala/google-map-marker
Once the package is installed, you can use it in your Laravel application by creating a new instance of the GoogleMapMarker
class and calling the getLocationDetails
method with the latitude and longitude parameters.
use HiteshVala\GoogleMapMarker\GoogleMapMarker; $apiKey = 'YOUR_GOOGLE_MAPS_API_KEY'; $marker = new GoogleMapMarker($apiKey); $location = $marker->getLocationDetails($lat, $lng);
To get address details based on full address of location calling the getAddressDetails
method with the address parameters.
$address = $marker->getAddressDetails($address);
To get a timezone based on location calling the getTimezone
method with the latitude and longitude parameters, make sure your map key have timezone API access.
$timezone = $marker->getTimezone($lat, $lng);