. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Webtrees\I18N; /** * Class OrdnanceSurvey - use maps within webtrees */ class OrdnanceSurveyHistoricMaps extends AbstractModule implements ModuleMapProviderInterface { use ModuleMapProviderTrait; /** * Name of the map provider. * * @return string */ public function title(): string { // I18N: Ordnance Survey is the UK government mapping service. return I18N::translate('Ordnance Survey historic maps'); } /** * Name of the map provider. * * @return string */ public function description(): string { $link = 'maps.nls.uk/projects/api'; // I18N: %s is a link/URL return I18N::translate('Create maps using %s.', $link); } /** * Should this module be enabled when it is first installed? * * @return bool */ public function isEnabledByDefault(): bool { return false; } /** * Parameters to create a TileLayer in LeafletJs. * * @return array */ public function leafletJsTileLayers(): array { return [ (object) [ 'attribution' => 'Historical Maps Layer, 1919-1947 from the NLS Maps API', 'bounds' => [[49.852539, -7.793077], [60.894042, 1.790425]], 'default' => true, 'label' => 'Historic map of Great Britain', 'maxZoom' => 15, 'minZoom' => 2, 'subdomains' => ['0', '1', '2', '3'], 'url' => 'https://nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg', ], ]; } }