-
Notifications
You must be signed in to change notification settings - Fork 5
/
basemap_resources
1440 lines (1420 loc) · 22.4 KB
/
basemap_resources
1
// ################################# //// ###### Customized ###### //// ###### Base Map ###### //// ################################# ///** * This is a resource for visualizing customized basemaps on * earth engine app * * ## Map Options: ## * VintageOldGoldenBrown * MidnightCommander * MutedMonotone * Navigation * RedAlert * Discreet * NolabelBrightColors * simpleLight * * Usage: addCustomBasemap(basemap_name) * * credits: https://thegeoict.com/blog/2021/08/15/custom-basemaps-gee/ */// map definitionsvar simpleLight = [ { "featureType": "administrative", "elementType": "labels.text.fill", "stylers": [ { "color": "#444444" } ] }, { "featureType": "administrative.province", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative.locality", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#f2f2f2" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.attraction", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.business", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": -100 }, { "lightness": 45 } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#5fb8dd" }, { "visibility": "on" } ] }]var NolabelBrightColors = [ { "featureType": "all", "elementType": "all", "stylers": [ { "saturation": "32" }, { "lightness": "-3" }, { "visibility": "on" }, { "weight": "1.18" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape.man_made", "elementType": "all", "stylers": [ { "saturation": "-70" }, { "lightness": "14" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "saturation": "100" }, { "lightness": "-14" } ] }, { "featureType": "water", "elementType": "labels", "stylers": [ { "visibility": "off" }, { "lightness": "12" } ] }]var Discreet = [ { "featureType": "administrative", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "on" }, { "color": "#716464" }, { "weight": "0.01" } ] }, { "featureType": "administrative.country", "elementType": "labels", "stylers": [ { "visibility": "on" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "landscape.natural.landcover", "elementType": "geometry", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "geometry.fill", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "labels.text.fill", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "labels.text.stroke", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi.attraction", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" }, { "color": "#a05519" }, { "saturation": "-13" } ] }, { "featureType": "road.local", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "transit", "elementType": "geometry", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "transit.station", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "visibility": "simplified" }, { "color": "#84afa3" }, { "lightness": 52 } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }]var RedAlert = [ { "featureType": "water", "elementType": "geometry", "stylers": [ { "color": "#ffdfa6" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "color": "#b52127" } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "color": "#c5531b" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#74001b" }, { "lightness": -10 } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "color": "#da3c3c" } ] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [ { "color": "#74001b" } ] }, { "featureType": "road.arterial", "elementType": "geometry.stroke", "stylers": [ { "color": "#da3c3c" } ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ { "color": "#990c19" } ] }, { "elementType": "labels.text.fill", "stylers": [ { "color": "#ffffff" } ] }, { "elementType": "labels.text.stroke", "stylers": [ { "color": "#74001b" }, { "lightness": -8 } ] }, { "featureType": "transit", "elementType": "geometry", "stylers": [ { "color": "#6a0d10" }, { "visibility": "on" } ] }, { "featureType": "administrative", "elementType": "geometry", "stylers": [ { "color": "#ffdfa6" }, { "weight": 0.4 } ] }, { "featureType": "road.local", "elementType": "geometry.stroke", "stylers": [ { "visibility": "off" } ] }]var Navigation = [ { "featureType": "all", "elementType": "geometry", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "gamma": 0.01 }, { "lightness": 20 } ] }, { "featureType": "all", "elementType": "labels.text.stroke", "stylers": [ { "saturation": -31 }, { "lightness": -33 }, { "weight": 2 }, { "gamma": 0.8 } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative.locality", "elementType": "labels.text.fill", "stylers": [ { "color": "#050505" } ] }, { "featureType": "administrative.locality", "elementType": "labels.text.stroke", "stylers": [ { "color": "#fef3f3" }, { "weight": "3.01" } ] }, { "featureType": "administrative.neighborhood", "elementType": "labels.text.fill", "stylers": [ { "color": "#0a0a0a" }, { "visibility": "off" } ] }, { "featureType": "administrative.neighborhood", "elementType": "labels.text.stroke", "stylers": [ { "color": "#fffbfb" }, { "weight": "3.01" }, { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "lightness": 30 }, { "saturation": 30 } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "saturation": 20 } ] }, { "featureType": "poi.attraction", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "lightness": 20 }, { "saturation": -20 } ] }, { "featureType": "road", "elementType": "geometry", "stylers": [ { "lightness": 10 }, { "saturation": -30 } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "saturation": 25 }, { "lightness": 25 } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" }, { "color": "#a1a1a1" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "color": "#292929" } ] }, { "featureType": "road.highway", "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" }, { "color": "#202020" } ] }, { "featureType": "road.highway", "elementType": "labels.text.stroke", "stylers": [ { "visibility": "on" }, { "color": "#ffffff" } ] }, { "featureType": "road.highway", "elementType": "labels.icon", "stylers": [ { "visibility": "simplified" }, { "hue": "#0006ff" }, { "saturation": "-100" }, { "lightness": "13" }, { "gamma": "0.00" } ] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" }, { "color": "#686868" } ] }, { "featureType": "road.arterial", "elementType": "geometry.stroke", "stylers": [ { "visibility": "off" }, { "color": "#8d8d8d" } ] }, { "featureType": "road.arterial", "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" }, { "color": "#353535" }, { "lightness": "6" } ] }, { "featureType": "road.arterial", "elementType": "labels.text.stroke", "stylers": [ { "visibility": "on" }, { "color": "#ffffff" }, { "weight": "3.45" } ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ { "color": "#d0d0d0" } ] }, { "featureType": "road.local", "elementType": "geometry.stroke", "stylers": [ { "lightness": "2" }, { "visibility": "on" }, { "color": "#999898" } ] }, { "featureType": "road.local", "elementType": "labels.text.fill", "stylers": [ { "color": "#383838" } ] }, { "featureType": "road.local", "elementType": "labels.text.stroke", "stylers": [ { "color": "#faf8f8" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "lightness": -20 } ] }]var MutedMonotone =[ { "stylers": [ { "visibility": "on" }, { "saturation": -100 }, { "gamma": 0.54 } ] }, { "featureType": "road", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "stylers": [ { "color": "#4d4946" } ] }, { "featureType": "poi", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road", "elementType": "geometry.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "road.local", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "water", "elementType": "labels.text.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "transit.line", "elementType": "geometry", "stylers": [ { "gamma": 0.48 } ] }, { "featureType": "transit.station", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "gamma": 7.18 } ] }]var MidnightCommander = [ { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "all", "elementType": "labels.text.stroke", "stylers": [ { "color": "#000000" }, { "lightness": 13 } ] }, { "featureType": "administrative", "elementType": "geometry.fill", "stylers": [ { "color": "#000000" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "color": "#144b53" }, { "lightness": 14 }, { "weight": 1.4 } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#08304b" } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "color": "#0c4152" }, { "lightness": 5 } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#000000" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "color": "#0b434f" }, { "lightness": 25 } ] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [ { "color": "#000000" } ] }, { "featureType": "road.arterial", "elementType": "geometry.stroke", "stylers": [ { "color": "#0b3d51" }, { "lightness": 16 } ] }, { "featureType": "road.local", "elementType": "geometry", "stylers": [ { "color": "#000000" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "color": "#146474" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#021019" } ] }]var VintageOldGoldenBrown =[ { "featureType": "all", "elementType": "all", "stylers": [ { "color": "#ff7000" }, { "lightness": "69" }, { "saturation": "100" }, { "weight": "1.17" }, { "gamma": "2.04" } ] }, { "featureType": "all", "elementType": "geometry", "stylers": [ { "color": "#cb8536" } ] }, { "featureType": "all", "elementType": "labels", "stylers": [ { "color": "#ffb471" }, { "lightness": "66" }, { "saturation": "100" } ] }, { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "gamma": 0.01 }, { "lightness": 20 } ] }, { "featureType": "all", "elementType": "labels.text.stroke", "stylers": [ { "saturation": -31 }, { "lightness": -33 }, { "weight": 2 }, { "gamma": 0.8 } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "lightness": "-8" }, { "gamma": "0.98" }, { "weight": "2.45" }, { "saturation": "26" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "lightness": 30 }, { "saturation": 30 } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "saturation": 20 } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "lightness": 20 }, { "saturation": -20 } ] }, { "featureType": "road", "elementType": "geometry", "stylers": [ { "lightness": 10 }, { "saturation": -30 } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "saturation": 25 }, { "lightness": 25 } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "lightness": -20 }, { "color": "#ecc080" } ] }]var baseDict = { "VintageOldGoldenBrown":VintageOldGoldenBrown, "MidnightCommander":MidnightCommander, "MutedMonotone":MutedMonotone, "Navigation":Navigation, "RedAlert":RedAlert, "Discreet":Discreet, "NolabelBrightColors":NolabelBrightColors, "simpleLight":simpleLight,}function addCustomBasemap(base){ var map = baseDict[base] Map.setOptions(undefined, {'Custom' : map })}function getCustomBasemap(base){ var map = baseDict[base] return map;}var avalible = Object.keys(baseDict);function help(){ print("addCustomBasemap (base) \n Add a custom basemap to map. \n args: \n -base(string) \\n A string name of an available basemap theme.\nreturns: \n basemap\n\nAvailable themes are :", avalible)}exports = { addCustomBasemap : addCustomBasemap, getCustomBasemap : getCustomBasemap, help :help}