Download the PHP package thelia/thelia-googlemap-module without Composer

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

Thelia Google Map

author : Penalver Antony [email protected]

This module allow to integrate a google map with somes options.

1. Installation

Manually

Warning : You need to configure your google api keys for google maps in configuration form before to use it.
To get api key follow these instructions : https://developers.google.com/maps/documentation/javascript/tutorial

Composer

Add it in your main thelia composer.json file

2. Usage

Use smarty function to integrate it in you template : {google_map id="YOUR_ID"}{/google_map}

Somes options are availables:

Options Type Description Default
class String Allow to change css class theliagooglemap
zoom Integer Allow to change base map zoom 0
centerlat Float Used to set the latitude for base center map ( need centerLon to be set ) 0
centerlon Float Used to set the longitude for base center map ( need centerLat to be set ) 0
address String Used to set the center point for map null
control Boolean Used to disable default control UI false
zoom-ctrl Boolean Used to enable zoom control UI true
pan-ctrl Boolean Used to enable pan control UI true
scale-ctrl Boolean Used to enable scale control UI true
map-ctrl Boolean Used to enable map type control UI true
street-ctrl Boolean Used to enable street view control UI true
overview-ctrl Boolean Used to enable overview control UI false
mouse-ctrl Boolean Used to enable mouse control false
show-marker Boolean Used to enable showing markers true
marker-src URL Used to set an url source to show mutiples markers null
marker-src-refresh Boolean Used to refresh marker on map zoom or move false
marker-src-refresh-ttl Integer Time in ms before triggering the URL to refresh markers 100
template-name String Used to set a template on map base
pin-link URL Used to set a custom pin null
show-info Boolean Used to enable info window in map true
cluster Boolean Used to enable clustering for markers false
cluster-options-callback String Set a callback function to define custom configuration for clustering {}
geocoder-error-callback String Used to set a callback function error handler for geocoder error console log

Deprecated options in favor of cluster-options-callback (since version 1.7) :

Options Type Description Default
cluster-grid-width Integer Width size grid for cluster element 10
cluster-grid-height Integer Height size grid for cluster element 10
pin-cluster-link URL Used to set a custom pin for cluster marker null

3. Marker Source

To use marker source you need to respect a format.

Json format :

4. Templating

Template list

Some template are integrate by default :

Name Description Key
Red Demo template describe in google map documentation : https://developers.google.com/maps/documentation/javascript/examples/maptype-styled-simple red
Black Template black and white for classy map black

Create your own template

5. Info Window

To customise info window you have to modify following css classes :

6. Options

6.1 Insert Google map js

You can limitate Google Map API include to a particular Hook in module configuration. You just have to toggle configuration key and Google Map include script change binding from "main.after-javascript-include" to "theliagooglemap.front.insertjs". To insert the script in one page add the hook before main include javascript.`

Hook to add :

6.2 Example for geocoder-error-callback

6.3 Example for cluster-options-callback

To use custom cluster options, you have to use the cluster-options-callback like this :


All versions of thelia-googlemap-module with dependencies

PHP Build Version
Package Version
Requires thelia/installer Version ~1.1
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 thelia/thelia-googlemap-module contains the following files

Loading the files please wait ....