Download the PHP package genealabs/laravel-maps without Composer

On this page you can find all versions of the php package genealabs/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

Travis Scrutinizer Coveralls GitHub (pre-)release Packagist GitHub license

Prerequisites

This package is the continuation of GeneaLabs/Phpgmaps. The move to the more appropriately-named package namespace is in preparation for a complete rewrite of the package, optimizing it for Laravel.

PhpGmaps

This repo aims to keep appitventures/phpgmaps alive, hopefully filling in temporarily until they make their repo available again, or else continuing its maintenance going forward and keeping it working with future versions of Laravel.

Installation

Add the repo to composer.json under this new namespace:

Add an environment variable with your Google Maps API Key in your .env file:

Lastly, add the following entry to your \config\services.php config file:

Example

The following code will prompt the user for access to their geolocation and then creates a map centered on their lat/lng

Route::get('/', function(){
    $config = array();
    $config['center'] = 'auto';
    $config['onboundschanged'] = 'if (!centreGot) {
            var mapCentre = map.getCenter();
            marker_0.setOptions({
                position: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng())
            });
        }
        centreGot = true;';

    app('map')->initialize($config);

    // set up the marker ready for positioning
    // once we know the users location
    $marker = array();
    app('map')->add_marker($marker);

    $map = app('map')->create_map();
    echo "<html><head><script type="text/javascript">var centreGot = false;</script>".$map['js']."</head><body>".$map['html']."</body></html>";
});

More Examples

BIOINSTALL has a great website showing how to do all the things with the class. No reason to reinvent the wheel, so here it is. The only thing to note is that $this->googlemaps is now either the facade Map:: or the app variable app('map').


All versions of laravel-maps with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^8.0|^9.0|^10.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 genealabs/laravel-maps contains the following files

Loading the files please wait ....