app<\/<A> está abaixo:
<!DOCTYPE html><br><html><br><head><br> <meta charset= "utf-8"><br> <meta name= "viewport" content= "initial-scale=1, maximum-scale=1, user-scalable=no"><br> <title>Começando com ArcGIS JavaScript - DKK Geocoder</title><br> <link rel= "stylesheet" href= "https:\/ \/js.arcgis.com \/4.13 \/esri \/css \/main.css"><br> <script src= "https:\/ \/js.arcgis.com \/4.13"></script><br></head><br><style><br> html, body {<br> padding: 0;<br> margin: 0;<br> height: 100%;<br> width: 100%;<br> font-family: sans-serif;<br> }<br> #header { <br> width: 100%;<br> height: 70px;<br> background-color: #113395;<br> color:#FFFFFF;<br> margin: 0;<br> }<br> #headertext {<br> float: left;<br> font-size: 35px;<br> color: white;<br> line-height: 70px;<br> padding-left: 15px;<br> }<br> #viewDiv {<br> position: absolute;<br> top: 70px;<br> bottom: 0;<br> right: 0<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">left<\/SPAN><SPAN class="punctuation token">:<\/SPAN> 0<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">padding<\/SPAN><SPAN class="punctuation token">:<\/SPAN> 0<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">margin<\/SPAN><SPAN class="punctuation token">:<\/SPAN> 0<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="punctuation token">}<\/SPAN>
<SPAN class="selector token">td<\/SPAN> <SPAN class="punctuation token">{<\/SPAN>
<SPAN class="property token">padding<\/SPAN><SPAN class="punctuation token">:<\/SPAN> 15px<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="punctuation token">}<\/SPAN>
<SPAN class="selector token">.dialogDiv<\/SPAN> <SPAN class="punctuation token">{<\/SPAN>
<SPAN class="property token">background-color<\/SPAN><SPAN class="punctuation token">:<\/SPAN> branco<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">width<\/SPAN><SPAN class="punctuation token">:<\/SPAN> 480px<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="punctuation token">}<\/SPAN>
<SPAN class="selector token">.dialogHeader<\/SPAN> <SPAN class="punctuation token">{<\/SPAN>
<SPAN class="property token">color<\/SPAN><SPAN class="punctuation token">:<\/SPAN> branco<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">font-weight<\/SPAN><SPAN class="punctuation token">:<\/SPAN> bolder<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">width<\/SPAN><SPAN class="punctuation token">:<\/SPAN> auto<SPAN class="punctuation token">;<\/SPAN>
<SPAN class="property token">background-color<\/PAN><span class='token punctuation'>:</span> #113395<span class='token punctuation'>;</span>
<span class='property'>padding</span><span class='token punctuation'>:</span> 5px<span class='token punctuation'>;</span>
}</span>
.esri-basemap-gallery__item-thumbnail {
width: auto;
}
</style></style>
<script>
require([
"esri/Map",
"esri/widgets/Zoom",
"esri/widgets/Home",
"esri/widgets/Compass",
"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/LayerList",
"esri/layers/MapImageLayer",
"dojo/domReady!"
], function(Map, Zoom, Home, Compass, Point, MapView, WMTSLayer, Search, Locator, Basemap, BasemapGallery, LocalBasemapsSource, Expand, LayerList, MapImageLayer) {
document.getElementById("aboutDiv").style.display = "block";
// BRT Achtergrondkaart van PDOK als achtergrondkaart
let 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-'>BRT Achtergrondkaart</a> van <a target='_top' href='https://www.pdok.nl'>PDOK</a>",
activeLayer: {
id: "brtachtergrondkaart"
}
})
],
title: "BRT Achtergrondkaart (PDOK)",
id: "brtachtergrondkaart_pdok",
thumbnailUrl: "images/map.jpg"
});
// Basiskaarten Esr Nederland
let lightGrayCanvas_RD_EsriNL = new Basemap({portalItem: {id: "9ff6521e85d24df1aa9cd4aebfef748b"}}); //Lichtgrijze Canvas RD
let darkGrayCanvas_RD_EsriNL = new Basemap({portalItem: {id: "62a3befb579e4d9f9c5c51576c8a7c25"}}); //Donkergrijze Canvas RD
let topo_RD_EsriNL = new Basemap({portalItem: {id: "7aea6fa913a94176a1074edb40690318"}}); //Topo RD
let open_Topo_RD_EsriNL = new Basemap({portalItem: {id: "0698b71eb7cf47898086d072e574ac32"}}); //Open Topo RD
let stratenkaart_RD_EsriNL = new Basemap({portalItem: {id: "9fe1a753955f418fa1cbaf1c47610a47"}}); //Stratenkaart RD
let luchtfoto_RD_EsriNL = new Basemap({portalItem: {id: "38e1a1c6ee2c421290622400d22ecf57"}}); //Luchtfoto RD
let dutchBasemaps = new LocalBasemapsSource({
basemaps : [brtachtergrondkaart, topo_RD_EsriNL, open_Topo_RD_EsriNL, stratenkaart_RD_EsriNL, luchtfoto_RD_EsriNL, lightGrayCanvas_RD_EsriNL, darkGrayCanvas_RD_EsriNL]
});
let map = new Map({
basemap: topo_RD_EsriNL
});
let parcels = new MapImageLayer({
url: "https://basisregistraties.arcgisonline.nl/arcgis/rest/services/DKK/DKK/MapServer",
title: "Digitale Kadastrale Kaart",
sublayers: [{
id: 5,
title: "Perceel",
popupTemplate: {
title: "Perceel {kadastraleaanduiding}",
<!-- content: "Perceelnummer: {perceelnummer}<br>Sectie: {sectie}<br>Kadastrale gemeente: {kadastralegemeente}<br>Kaastrale oppervlakte: {oppervlak} m2" -->
content:[
{
type: "fields",
fieldInfos: [
{
fieldName: "kadastralegemeente",
label: "Kadastrale gemeente"
},
{
fieldName: "sectie",
label: "Sectie"
},
{
fieldName: "perceelnummer",
label: "Perceelnummer",
format: {
digitSeparator: false
}
},
{
fieldName: "oppervlak",
label: "Kadastrale oppervlakte (in m2)",
format: {
digitSeparator: true,
places: 0
}
}
]
}
]
}},
{
id: 0, title: "Perceelnummer"
}
]
});
mape.add(parcels);
't
let view = new MapView({
't spatialReference': 28992,
't container': 'viewDiv',
't map': map,
't center': new Point({x': 155000,' y': 463000,' spatialReference': 28992}),
't zoom': 3
't });'
't
view.ui.components = [ 'attribution' ];'
't
let aboutDlg = document.getElementById('aboutDiv');'
't
let aboutExpand = new Expand({'t
expandIconClass': 'esri-icon-lightbulb','t
expandTooltip': 'Sobre este aplicativo','t
view': view,'t
expanded': true,'t
content': aboutDlg,'t
group': 'top-left''t
});'
't
let searchWidget = new Search({'t
view': view,'t
allPlaceholder': 'Endereço ou Perceito Cadastral','t
includeDefaultSources': false't
});'
't
searchWidget.sources = [{'t
locator': new Locator({ url': 'https://services.arcgisonline.nl/arcgis/rest/services/Geocoder_BAG_RD/GeocodeServer'}), // BAG GeocodeServer da Esri Nederland't
singleLineFieldName': 'SingleLine', // Esta opção permite pesquisar por combinação de código postal/número da casa, por exemplo: 4181 AE 38't
name': 'Endereço na Holanda','t
placeholder': 'Buscar endereço''t
},{'t
locator': new Locator({ url': 'https://geocoder.arcgisonline.nl/arcgis/rest/services/Geocoder_DKK/GeocodeServer'}), // DKK GeocodeServer da Esri Nederland't
singleLineFieldName': 'SingleLine','t
name': 'Perceitos Cadastrais na Holanda','t
placeholder': 'Buscar perceito cadastral (por exemplo RTD06 S 4403)''t
}]'t
't
searchWidgetExpand = new Expand({'t
expandIconClass': 'esri-icon-search','t
expandTooltip': searchWidget.label,'t
view': view,'t
content': searchWidget,'t
group': 'top-left''t
});'
't
let basemapGallery = new BasemapGallery({view': view,' source': dutchBasemaps});'
't
basemapGalleryExpand = new Expand({'t
expandIconClass': 'esri-icon-basemap', \/\/ veja https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/esri-icon-font\/
expandTooltip: basemapGallery.label,
view: view,
content: basemapGallery,
group: "top-left"
});
let layerList = new LayerList({
view: view,
listItemCreatedFunction: function(event){
const item = event.item;
item.actionsSections = [
[
{
title: item.layer.title,
className: "esri-icon-description",
id: "information"
}
]
];
}
});
layerList.on("trigger-action", function(event) {
if (event.action.id === "information") {
\/\/ Se a ação de informação for acionada, então abra a página de detalhes do item da camada de serviço.
window.open(event.item.layer.url);
}
});
layerListExpand = new Expand({
expandIconClass: "esri-icon-layers",
expandTooltip: layerList.label,
view: view,
content: layerList,
group: "top-left"
});
let zoom = new Zoom({view: view});
let homeWidget = new Home({view: view});
let compass = new Compass({view: view});
view.ui.add([aboutExpand, searchWidgetExpand, zoom, homeWidget, compass, basemapGalleryExpand, layerListExpand], "top-left");
\/\/ Certifique-se de que o parcelamento clicado esteja destacado - código fornecido por Robert Scheitlin, GISP no GeoNet
view.popup.watch('selectedFeature', function(gra){
if(gra){
view.graphics.removeAll();
let h = view.highlightOptions;
gra.symbol = {
type: "simple-fill", \/\/ autocasts as new SimpleFillSymbol()
color: [h.color.r,h.color.g, h.color.b, h.fillOpacity],
outline: {
\/\/ autocasts as new SimpleLineSymbol()
color: [h.color.r,h.color.g, h.color.b, h.color.a],
width: 1
}
};
view.graphics.add(gra);
}else{
view.graphics.removeAll();
}
});
view.popup.watch('visible', function(vis){
if(!vis){
view.graphics.removeAll();
}
});
});
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><\/<\/SPAN>script<\/SPAN><SPAN class="punctuation token">><\/<\/SPAN><\/SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><\/<\/SPAN>head<\/SPAN><SPAN class="punctuation token">><\/<\/SPAN><\/SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/SPAN>body<\/SPAN><SPAN class="punctuation token">><\/<\/SPAN><\/SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/SPAN>div<\/SPAN> <SPAN class="attr-name token">id<\/SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=<\/SPAN><SPAN class="punctuation token">"<\/SPAN>header<SPAN class="punctuation token">"<\/SPAN><\/SPAN><SPAN class="punctuation token">><\/<\/SPAN><\/SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/Span>div<\/Span> <Span class="attr-name token">id<\/Span><Span class="attr-value token"><Span class="punctuation token">=<\/Span><Span class="punctuation token">"<\/Span>headertext<Span class="punctuation token">"<\/Span><Span class="attr-name token">class<\/Span><Span class="attr-value token"><Span class="punctuation token">=<\/Span><Span class="punctuation token">"<\/Span>stretch<Span class="punctuation token">"<\/Span><Span class="punctuation token">><\/<\/span>Kadastrale Percelen in Nederland<Span class="token tag"><Span class="token tag"><Span class="punctuation token"><\/<\/span>div<Span><Span class="punctuation token">><\/<span><\/<span>
<span class="token tag"><span class="token tag"><span class="punctuation token"><\/<span>div<Span><span class="punctuation token">><\/<span><\/<span>
<span class="token tag"><span class="token tag"><span class="punctuation token"><<span>div<Span> <span class="attr-name token">id<Span><span class="attr-value token"><span class="punctuation token">=<\/ class="punctuation token"><\/</SPAN>p<\/SPAN><SPAN class="punctuation token">><\/SPAN><\/SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/</SPAN>p<\/SPAN><SPAN class="punctuation token">><\/SPAN><\/SPAN><SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/</SPAN>div<\/SPAN> <SPAN class="attr-name token">class<\/SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=<\/</SPAN><SPAN class="punctuation token">"<\/</SPAN>esri-widget--button<SPAN class="punctuation token">"<\/</SPAN><\/SPAN><SPAN class="punctuation token">><\/SPAN><\/SPAN><SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><<\/</SPAN>span<\/SPAN> <SPAN class="attr-name token">title<\/SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=<\/</SPAN><SPAN class="punctuation token">"<\/</SPAN>Clique no botão de busca ao lado e procure por um lote, por exemplo RTD06 S 4403.<SPAN class="punctuation token">"<\/</SPAN><\/SPAN> <SPAN class="attr-name token">class<\/SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=<\/</SPAN><SPAN class="punctuation token">"<\/</SPAN>esri-icon-search<SPAN class="punctuation token">"<\/</SPAN><\/SPAN><SPAN class="punctuation token">><\/SPAN><\/SPAN><SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><\/<\/span><\/span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>