Download the PHP package forup/easy-leaflet without Composer

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

easy-leaflet

Simple, universal PHP library for rendering Leaflet.js maps — markers, custom icons, popups, one configurable tile layer, auto-fit-bounds. Works from PHP 5.6 up to the latest release, no framework required.

Install

Usage

render() prints a <div> and a single inline <script> that boots the map via the shared easy-leaflet.js runtime. With 2+ markers the map auto-fits its bounds; with exactly 1 marker it centers on it; with 0 markers you must call setCenter($lat, $lng) explicitly or render() throws EasyLeafletException.

In bounds mode (2+ markers), setMaxZoom($zoom) caps how far Leaflet's fitBounds() is allowed to zoom in — useful when markers sitting close together would otherwise end up on an overly tight view:

Loading Leaflet itself

easy-leaflet does not bundle Leaflet's core CSS/JS or force a specific way to load them. Include them however your project already loads assets, or use the optional helper:

This prints <link>/<script> tags for Leaflet's CDN build plus your copy of vendor/forup/easy-leaflet/resources/js/easy-leaflet.js (you decide where to serve that file from — pass its public URL as the constructor argument).

Tile layers

Pick exactly one per map with Map::setTileLayer(). There is no runtime layer switcher in this version.

Popups and escaping

Popup::text($string) HTML-escapes its input — use it for anything derived from user/CMS data. Popup::html($trustedHtml) skips escaping — only pass content you fully trust.

Multiple maps per page

Each Map::create() generates a unique container id automatically. Pass your own with setContainerId() if you need a specific one.

Design

See docs/specs/2026-08-11-easy-leaflet-design.md for the full architecture rationale.


All versions of easy-leaflet with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 forup/easy-leaflet contains the following files

Loading the files please wait ...