Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

leaflet_esri_basemaps()

Description

Generates ESRI basemaps for use in a Leaflet map.

This function defines various tile layers from ESRI, setting properties such as caching,
retina display support, maximum zoom levels, and attribution for each layer.

Parameters

ColumnTypeDefaultDescription
ESRI //
{
DeLorme
NAVTEQ
USGS
Intermap
iPC
NRCAN
Japan Esri
METI
China Esri
Thailand Esri
TomTom
'" detectRetina:
esri_street_attribute attribution:
1 minZoom:
11 maxZoom:
esri_delorme_attribute attribution: 'Tiles © Esri — Esri
FAO
NPS
GeoBase
NL Kadaster
Survey Ordnance
the and L.tileLayer.provider'Esri.WorldImagery'
esri_topo_attribute attribution: 'Tiles © Esri — Source: Esri
i-cubed
USDA
AEX
GeoEye
Getmapping
Aerogrid
IGN
IGP
UPR-EGP
esri_imagery_attribute attribution: 'Tiles © Esri — Source: USGS
Esri
TANA
NPS'; and L.tileLayer.provider'Esri.WorldTerrain'
13 maxZoom:
esri_terrain_attribute attribution:
esri_relief_attribute attribution:
8 maxZoom:
esri_physical_attribute attribution: 'Tiles © Esri — Sources: GEBCO
NOAA
CHS
OSU
UNH
CSUMB
Geographic National
Esri'; and L.tileLayer.provider'Esri.OceanBasemap'
esri_ocean_attribute attribution: 'Tiles © Esri — National Geographic
UNEP-WCMC
NASA
ESA
GEBCO
16 maxZoom:
esri_natgeo_attribute attribution: 'Tiles © Esri — Esri
esri_gray_attribute attribution:
href
0 minZoom:
20 maxZoom:
'png' ext:
stamen_attribute attribution:
18 maxZoom:
'jpg' format:
hydda_attribute attribution:
by operated
9 maxZoom:
nasa_attribute attribution:
usgstnm_attribute attribution:
$map_retina
©
22 maxZoom:
tf_attribute attribution:
$map_mapboxid
$map_mapboxtoken
' attribution:
an requiring
display retina
attribution. and

Return

string JavaScript code that initializes the ESRI basemaps for Leaflet.

Location

include/map_functions.php lines 98 to 180

Definition

 
function leaflet_esri_basemaps() // ESRI basemaps.
    
{
    global 
$map_default_cache$map_retina;

    return 
"<!--ESRI basemap group-->
        var esri_street_attribute = 'Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012';
        var esri_street = L.tileLayer.provider('Esri.WorldStreetMap', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            attribution: esri_street_attribute
        });

        var esri_delorme_attribute = 'Tiles &copy; Esri &mdash; Copyright: &copy;2012 DeLorme';
        var esri_delorme = L.tileLayer.provider('Esri.DeLorme', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            minZoom: 1,
            maxZoom: 11,
            attribution: esri_delorme_attribute
        });

        var esri_topo_attribute = 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community';
        var esri_topo = L.tileLayer.provider('Esri.WorldTopoMap', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            attribution: esri_topo_attribute
        });

        var esri_imagery_attribute = 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community';
        var esri_imagery = L.tileLayer.provider('Esri.WorldImagery', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            attribution: esri_imagery_attribute
        });

        var esri_terrain_attribute = 'Tiles &copy; Esri &mdash; Source: USGS, Esri, TANA, DeLorme, and NPS';
        var esri_terrain = L.tileLayer.provider('Esri.WorldTerrain', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 13,
            attribution: esri_terrain_attribute
        });

        var esri_relief_attribute = 'Tiles &copy; Esri &mdash; Source: Esri';
        var esri_relief = L.tileLayer.provider('Esri.WorldShadedRelief', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 13,
            attribution: esri_relief_attribute
        });

        var esri_physical_attribute = 'Tiles &copy; Esri &mdash; Source: US National Park Service';
        var esri_physical = L.tileLayer.provider('Esri.WorldPhysical', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 8,
            attribution: esri_physical_attribute
        });

        var esri_ocean_attribute = 'Tiles &copy; Esri &mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri';
        var esri_ocean = L.tileLayer.provider('Esri.OceanBasemap', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 13,
            attribution: esri_ocean_attribute
        });

        var esri_natgeo_attribute = 'Tiles &copy; Esri &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC';
        var esri_natgeo = L.tileLayer.provider('Esri.NatGeoWorldMap', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 16,
            attribution: esri_natgeo_attribute
        });

        var esri_gray_attribute = 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ';
        var esri_gray = L.tileLayer.provider('Esri.WorldGrayCanvas', {
            useCache: '" 
. ( $map_default_cache "true" "false" ) . "',
            detectRetina: '" 
. ( $map_retina "true" "false" ) . "',
            maxZoom: 16,
            attribution: esri_gray_attribute
        }); "
;
    }

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 22nd November 2024 15:35 Europe/London time.