## Name HTML::OSM - Generate an interactive OpenStreetMap with Leaflet.js ## Version Version 0.14 ## Synopsis ```perl use HTML::OSM; my $map = HTML::OSM->new( coordinates => [ [37.7749, -122.4194, 'San Francisco'], [undef, undef, 'Paris'], ], zoom => 10, ); my ($head, $body) = $map->onload_render(); ``` - Caching Geocode results are cached via [CHI](https://metacpan.org/pod/CHI) (default: in-memory, 1-day TTL). Supply your own `cache` object to persist across processes. - Rate-Limiting Set `min_interval` (seconds) to throttle outbound Nominatim calls and comply with the API fair-use policy. - Tile server `tile_url` replaces the OpenStreetMap tile layer, so a map can use an internal tile server or run on an air-gapped network. It accepts the same Leaflet placeholders as the default, for example `http://tiles.internal/{z}/{x}/{y}.png`. The attribution remains the OpenStreetMap credit, which is the usual requirement for OSM-derived tiles. The in-page search box still calls Nominatim when a reader uses it; set `search => 0` to leave it out. - Maximum zoom `max_zoom` (0 to 28) stops readers zooming in further than the tile server has tiles for. Without it, Leaflet allows zooming past the server's coverage and the map shows empty grey tiles. When it is not given, no limit is set. - Tile attribution `tile_attribution` replaces the credit shown in the corner of the map. Set it when the tiles come from a provider that asks for a different credit. The value is HTML that Leaflet renders as it is, so pass only trusted text. - Nominatim contact address `email` is added to every Nominatim request the module makes, as the Nominatim usage policy asks of heavy users. It is not put into the rendered page, so the in-page search box sends no address. - Content-Security-Policy `nonce` puts `nonce="..."` on every `