Download the PHP package larswiegers/laravel-maps without Composer

On this page you can find all versions of the php package larswiegers/laravel-maps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-maps

Laravel maps

Latest Version on Packagist Total Downloads GitHub Actions

Laravel maps

This package allows you to easily use leaflet.js or google maps to create a map in your laravel project.

Installation

You can install the package via composer:

If you want to customize the map views more then you can publish the views:

Supported map types

What Basic map Different map types Centerpoint Basic markers Use bounds Zoomlevel Can use different tiles Can be used multiple times on the same page
Leaflet
Google maps

Tilehosts

Openstreetmap

Openstreetmap is a creative commence tile library created by volunteers. No configuration has to be set to use as it is the default tilehost for this library. More information can be found here: openstreetmap.org

Mapbox

Mapbox is a for profit company that also offers free keys. Their map can be more accurate / precise. To get your free key go to mapbox.com Once logged in you can get your free key and use it by placing it in the env file like this MAPS_MAPBOX_ACCESS_TOKEN.

Attribution

Mapbox requires you to have attribution when you use their tilehost. More information on that here: https://docs.mapbox.com/help/getting-started/attribution/ We provide a default value if you use mapbox. But if you want to customize it you can pass in the te text via the attribution attribute. Like this:

Usage

Leaflet

Do note that if you want to use multiple maps on the same page that you need to specify an id per map.

Leaflet Version

By default we use the latest version of leaflet, but if you want to use a different version just pass it in via a parameter:

Google Maps

Google maps api key

You can get an api key here: console.cloud.google.com Create an api key and enable the Maps Javascript API in the console aswell. Place the api key in the env file like this MAPS_GOOGLE_MAPS_ACCESS_TOKEN

Good to know

Double quotes need to be escaped, i.e. add a backslash followed by double quotes (/")

Usage in livewire

This library does not support livewire out of the box, but some users have found a workaround to work. Please see this issue for more information: https://github.com/LarsWiegers/laravel-maps/issues/34

Feel free to PR a livewire component if you have the time.

Testing

To run the tests just use the following component:

Testing is done through rendering the blade components and making assertions on the html outputted. While this is great for initial testing it does lack some more certainty. In the future an browser test may be needed to further make sure that the code works as intended.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-maps with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
gajus/dindent Version ^2.0.2
illuminate/support Version ^9.43|^v10.0.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package larswiegers/laravel-maps contains the following files

Loading the files please wait ....