https:\/\/community.esri.com\/people\/EPolle_TensingInternational\/blog\/2019\/05\/22\/aan-de-slag-met-arcgis-javascript-widgets-inklappen<\/A>, avec lesquels la barre de recherche et la galerie de cartes de base peuvent être repliées et dépliées. <\/P><!DOCTYPE html><\/><<\/>html<\/>><\/><\/><<\/>head<\/>><\/><\/><<\/>meta<\/> charset<\/>=<\/>"<\/>utf-8"<\/><\/>><\/><\/><<\/>meta<\/> name<\/>=<\/>"<\/>viewport"<\/><\/> content<\/>=<\/>"<\/>initial-scale=<\/>1, maximum-scale=<\/>1, user-scalable=<\/>no"<\/><\/>><\/><\/><<\/>title<\/>><\/>Commencer avec ArcGIS JavaScript - Thuisknop<\/<title>title
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
require([
"esri/Map",
"esri/geometry/Point",
"esri/views/MapView",
"esri/layers/WMTSLayer",
"esri/widgets/Search",
"esri/tasks/Locator",
"esri/Basemap",
"esri/widgets/BasemapGallery",
"esri/widgets/BasemapGallery/support/LocalBasemapsSource",
"esri/widgets/Expand",
"esri/widgets/Compass",
"esri/widgets/Home"
], function(Map, Point, MapView, WMTSLayer, Search, Locator, Basemap, BasemapGallery, LocalBasemapsSource, Expand, Compass, Home) {
// Carte de fond BRT de PDOK comme carte de fond
var brtachtergrondkaart = new Basemap({
baseLayers: [
new WMTSLayer({
url: "https://geodata.nationaalgeoregister.nl/tiles/service/wmts?request=GetCapabilities&service=WMTS",
copyright:
"<a target='_top' href='https://www.pdok.nl/introductie/-/article/basisregistratie-topografie-achtergrondkaarten-brt-a-'" Carte de fond<\/a> de <a target='_top' href='https:\/\/www.pdok.nl\/'>PDOK<\/a>"<\/SPAN>,<\/SPAN>
activeLayer:<\/SPAN> {<\/SPAN>
id:<\/SPAN> "brtachtergrondkaart"<\/SPAN>
}<\/SPAN>
}<\/SPAN>)<\/SPAN>
]<\/SPAN>,<\/SPAN>
title:<\/SPAN> "BRT Carte de fond (PDOK)"<\/SPAN>,<\/SPAN>
id:<\/SPAN> "brtachtergrondkaart_pdok"<\/SPAN>,<\/SPAN>
thumbnailUrl:<\/SPAN> "images\/map.jpg"<\/SPAN>
}<\/SPAN>)<\/SPAN>;<\/SPAN>
\/\/ Cartes de base Esr Nederland<\/SPAN>
var<\/SPAN> lightGrayCanvas_RD_EsriNL =<\/SPAN> new<\/SPAN> Basemap<\/SPAN>(<\/SPAN>{<\/SPAN>portalItem:<\/SPAN> {<\/SPAN>id:<\/SPAN> "9ff6521e85d24df1aa9cd4aebfef748b"<\/SPAN>}<\/SPAN>}<\/SPAN>)<\/SPAN>;<\/SPAN> \/\/ Toile gris clair RD<\/SPAN>
var<\/SPAN> darkGrayCanvas_RD_EsriNL =<\/SPAN> new<\/SPAn> Basemap({portalItem: {id: \"62a3befb579e4d9f9c5c51576c8a7c25\"}}); // Toile gris foncé RD
var topo_RD_EsriNL = new Basemap({portalItem: {id: \"7aea6fa913a94176a1074edb40690318\"}}); // Topo RD
var open_Topo_RD_EsriNL = (< / SPAN >< SPAN classe = "ponctation jeton ">{ < / SPAN >
conteneur < SPAN classe = "poncture jeton ": < / SPAN > document < SPAN classe = "poncture jeton ". < / SPAN >< SPAN classe = "jeton fonction "> createElement < / SPAN >< SPAN classe = "poncture jeton ">( < / SPAN >< SPAN classe = "chaîne jeton "> "div " < / SPAN >< SPAN classe = "poncture jeton ") ,
vue < SPAN classe = "poncture jeton ": < / SPAN > vue < SPAN classe = "poncture jeton ",
source < SPAN classe = "poncture jeton ": < / SPAN > dutchBasemaps
} < SPAN classe = "poncture jeton ") ;
basemapGalleryExpand < SPAN classe = "opérateur jeton ": = nouveau Expand ( {
expandIconClass : "esri-icon-basemap " , // voir https://developers.arcgis.com/javascript/latest/guide/esri-icon-font/
expandTooltip : basemapGallery.label ,
vue : vue ,
contenu : basemapGallery.domNode ,
groupe : "top-right "
} ) ;
var searchWidget = nouveau Search ( {
conteneur : document.createElement ( "div " ),
vue : vue ,
includeDefaultSources : faux
} ) ;
searchWidget.sources = [ {
localisateur : nouveau Localisateur ( { url :