Download the PHP package survos/place-map-bundle without Composer

On this page you can find all versions of the php package survos/place-map-bundle. 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 place-map-bundle

Place Map Bundle

An open-source place library + map view. Two things:

  1. Place library — a Place entity (a precise point, a general area as a GeoJSON polygon, or both), imported from OpenStreetMap/Nominatim with place:import "Geneva, Switzerland".
  2. Map rendering enhancement — a small Stimulus controller that adds clustered, thumbnail-on-zoom item markers to a Symfony UX Map (ux_map()) map.

This bundle deliberately does not ship its own map component or its own Leaflet wrapper. Rendering — tiles, the place polygon, the place marker, InfoWindows — is entirely symfony/ux-map + a renderer bridge (e.g. symfony/ux-leaflet-map). This bundle only adds the place-library data layer and the one thing ux-map doesn't do out of the box: clustered markers whose icon changes (dot → photo thumbnail) as you zoom in.

Requirements

Why this split (and not a bespoke Leaflet wrapper)

Symfony\UX\Map\Marker supports a per-marker extra payload explicitly documented for "greater flexibility... via a custom Stimulus controller" — but the installed Leaflet bridge (ux-leaflet-map) does not round-trip that payload back onto the Leaflet marker instance it creates, so it can't drive an icon swap on zoom. Rather than fork/patch the bridge, item (photo) markers are built directly in assets/controllers/place_map_enhance_controller.js, on the same raw Leaflet map instance ux-map exposes via its ux:map:connect event — full control over clustering and icon swapping, zero forked bridge code, and the place-library layer (polygon + place marker, a small fixed set) still goes through ux-map normally via PlaceMapBuilder.

Commands

Command What
place:import "<query>" [--code=] [--label=] Search OpenStreetMap/Nominatim for <query>, store its point (and GeoJSON polygon boundary, when OSM has one) as a Place. --code defaults to a slug of <query>. Safe to re-run — updates the existing row.

Configuration

Fetch strategy (cache/retry)

NominatimClient fetches through survos/fetch-bundle's PersistentFetcherInterface. This matters more here than for most APIs: Nominatim's usage policy caps unauthenticated use at ~1 request/second, so caching isn't just a performance nicety, it's what keeps repeat place:import runs (e.g. re-importing during development) from tripping the rate limit at all.

If a place import looks stuck on stale data, check the fetch-bundle cache pool before assuming Nominatim's data changed — forget() the specific query URL to force a fresh lookup.

Before 2026-08-08 this used a raw HttpClientInterface with no caching at all.

Usage

Build ux-map value objects from the place library with PlaceMapBuilder, then render with ux_map(). Add the enhancement controller to the same element via the attributes array so it can merge onto ux-map's own data-controller and listen for its ux:map:connect event:

ux_map()'s own attributes['data-controller'] handling normalizes whatever string you pass the same way stimulus_controller() does — that's why survos_stimulus('place-map-bundle', 'place-map-enhance') (which returns the friendly @survos/place-map-bundle/place-map-enhance form, never hand-derived) works directly there. The Stimulus value attribute names, however, are passed straight through unnormalized, so they must spell out the resolved identifier (survos--place-map-bundle--place-map-enhance) explicitly — the same identifier survos_stimulus()'s output normalizes to.

Data model

Place (table place_map_place): code (PK), label, lat/lng (nullable), geojson (nullable — a GeoJSON Polygon/MultiPolygon), boundingBox (nullable [south, north, west, east], cheap for map fit-bounds without parsing geojson), source/sourceId (provenance, e.g. osm / relation/1685488), meta (free-form, e.g. OSM's display_name/address parts).

Related bundles

This bundle imports and renders individual OSM/Nominatim places one query at a time (place:import "<query>") — a curated point/polygon library, not a name-resolution authority or a bulk matcher. Two companions cover the rest of the "what place is this?" problem:

See survos/mono#28 for how the split was decided.


All versions of place-map-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
symfony/config Version ^8.1
symfony/console Version ^8.1
symfony/dependency-injection Version ^8.1
symfony/framework-bundle Version ^8.1
symfony/http-kernel Version ^8.1
doctrine/orm Version ^3.6
survos/kit-bundle Version ^2.5
survos/fetch-bundle Version ^2.5
symfony/ux-map Version ^3.2
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 survos/place-map-bundle contains the following files

Loading the files please wait ...