<\/A>https:\/\/community.esri.com\/people\/EPolle_TensingInternational\/blog\/2019\/06\/02\/aan-de-slag-met-arcgis-javascript-inleiding<\/A><\/P><\/P>
<\/P>
V tomto cvičení používáme tento nový Locator v
Takže pokud použijete vyhledávací funkci v této webové mapové aplikaci, můžete hledat nejen adresy, ale také katastrální parcely v Nizozemsku: <\/P>
Více informací o této nové službě Esri Nederland naleznete v tomto blogu
<!DOCTYPE html><\u200c>\n<<\u200c>/SPAN>html><\u200c>/SPAN>\n<<\u200c>/SPAN>head><\u200c>/SPAN>\n <<\u200c>/SPAN>metacharset=<</SPAN>"utf-8" ;<\/SPAN>left<\/SPAN>:<\/SPAN> 0;<\/SPAN>padding<\/SPAN>:<\/SPAN> 0;<\/SPAN>margin<\/SPAN>:<\/SPAN> 0;<\/SPAN>}<\/SPAN>td<\/SPAN> {<\/SPAN>padding<\/SPAN>:<\/SPAN> 15px;<\/SPAN>}<\/SPAN>.dialogDiv<\/SPAN> {<\/SPAN>background-color<\/SPAN>:<\/SPAN> bílá;<\/SPAN>width<\/SPAN>:<\/SPAN> 480px;<\/SPAN>}<\/SPAN>.dialogHeader<\/SPAN> {<\/SPAN>color<\/SPAN>:<\/SPAN> bílá;<\/SPAN>font-weight<\/SPAN>:<\/SPAN> tučnější;<\/SPAN>width<\/SPAN>:<\/SPAN> auto;<\/SPAN>background-color<\/PAN>:<\/span> #113395;<\/span>padding<\/span>:<\/span> 5px;<\/span>}<\/span>.esri-basemap-gallery__item-thumbnail<\/span> {<\/span>width<\/span>:<\/span> auto;<\/span>}<\/span><\/<\/span>style><\/span><\/span><\/span><\/span><script><\/span><\/span> 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 jako základní mapa let brtachtergrondkaart = new Basemap({ baseLayers: [ new WMTSLayer({ url: "https://geodata.nationaalgeoregister.nl/tiles/service/wmts?request=GetCapabilities&service=WMTS", copyright: "BRT Achtergrondkaart od PDOK", activeLayer: { id: "brtachtergrondkaart" } }) ], title: "BRT Achtergrondkaart (PDOK)", id: "brtachtergrondkaart_pdok", thumbnailUrl: "images/map.jpg" }); // Základní mapy Esr Nederland let lightGrayCanvas_RD_EsriNL = new Basemap({portalItem: {id: "9ff6521e85d24df1aa9cd4aebfef748b"}}); // Světle šedé plátno RD let darkGrayCanvas_RD_EsriNL = new Basemap({portalItem: {id: "62a3befb579e4d9f9c5c51576c8a7c25"}}); // Tmavě šedé plátno RD let topo_RD_EsriNL = new Basemap({portalItem: {id: "7aea6fa913a94176a1074edb40690318"}}); // Topo RD let open_Topo_RD_EsriNL = new Basemap({portalItem: {id: "0698b71eb7cf47898086d072e574ac32"}}); // Otevřený Topo RD let stratenkaart_RD_EsriNL = new Basemap({portalItem: {id: "9fe1a753955f418fa1cbaf1c47610a47"}}); // Mapa ulic RD let luchtfoto_RD_EsriNL = new Basemap({portalItem: {id: "38e1a1c6ee2c421290622400d22ecf57"}}); // Letecká fotografie 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: "Digitální katastrální mapa", sublayers: [{ id: 5, title: "Parcelu", popupTemplate: { title: "Parcelu {kadastraleaanduiding}", content:[ { type: "fields", fieldInfos: [ { fieldName: "kadastralegemeente", label: "Katastrální obec" }, { fieldName: "sectie", label: "Sekce" }, { fieldName: "perceelnummer", label: "Číslo parcely", format: { digitSeparator: false } }, { fieldName: "oppervlak", label: "Katastrální plocha (v m2)", format: { digitSeparator: true, places: 0 } } ] } ] }}, {id: 0, title: "Číslo parcely" } ] });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 view.ui.components = [ 'attribution' ];'t let aboutDlg = document.getElementById('aboutDiv');'t let aboutExpand = new Expand({'t expandIconClass': 'esri-icon-lightbulb','t expandTooltip': 'O této aplikaci','t view': view,'t expanded': true,'t content': aboutDlg,'t group': 'top-left''t });'t let searchWidget = new Search({'t view': view,'t allPlaceholder': 'Adresa nebo katastrální parcela','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 od Esri Nederland't singleLineFieldName': 'SingleLine', // Tato možnost umožňuje hledat podle kombinace PSČ / čísla domu, například: 4181 AE 38't name': 'Adresa v Nizozemsku',t placeholder': 'Hledat adresu't },{'t locator': new Locator({ url': 'https://geocoder.arcgisonline.nl/arcgis/rest/services/Geocoder_DKK/GeocodeServer'}), // DKK GeocodeServer od Esri Nederland't singleLineFieldName': 'SingleLine',t name': 'Katastrální parcely v Nizozemsku',t placeholder': 'Hledat katastrální parcelu (například 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' \/\/ viz 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") { \/\/ Pokud je spuštěna akce informace, otevře se stránka s podrobnostmi o službě vrstvy. 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"); \/\/ Ujistěte se, že kliknutý parcel je zvýrazněný - ukázkový kód poskytl Robert Scheitlin, GISP na GeoNet view.popup.watch('selectedFeature', function(gra){ if(gra){ view.graphics.removeAll(); let h = view.highlightOptions; gra.symbol = { type: "simple-fill", \/\/ automaticky vytvoří nový SimpleFillSymbol() color: [h.color.r,h.color.g, h.color.b, h.fillOpacity], outline: { \/\/ automaticky vytvoří nový 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>script<\/SPAN>><\/<\/SPAN><\/SPAN><\/<\/SPAN>head<\/SPAN>><\/<\/SPAN><\/SPAN><<\/SPAN>body<\/SPAN>><\/<\/SPAN><\/SPAN><<\/SPAN>div<\/SPAN> id<\/SPAN>=<\/SPAN>"<\/SPAN>header"<\/SPAN><\/SPAN>><\/<\/SPAN><\/SPAN><<\/Span>div<\/Span> id<\/Span>=<\/Span>"<\/Span>headertext"<\/Span><\/Span> class<\/Span>=<\/Span>"<\/Span>stretch"<\/Span><\/Span>><\/<\/span>Kadastrale Percelen in Nederland<\/<\/span>div><\/<\/span><\/span><\/div><\/<span><div id=\"viewDiv\"><\/<span><\/div>Percelen Zoeken DKK Geocoder V říjnu 2019 spustila Esri Nederland novou službu pro vyhledávání katastrálních parcel: DKK Geocoder. Více informací o DKK Geocoder naleznete v tomto blogu. Vyzkoušet Zde si můžete vyzkoušet tuto novou vyhledávací službu:<\/p><\/SPAN><\/SPAN><\/p><\/SPAN><\/SPAN><\/div class="esri-widget--button"<\/SPAN>><\/SPAN><\/SPAN><\/span title="Klikněte na tlačítko hledání vedle a vyhledejte parcelu, například RTD06 S 4403."<\/SPAN> class="esri-icon-search"<\/SPAN>><\/SPAN><\/SPAN><\/<\/span> Tato aplikace byla sestavena společností:Tensing GIS Consultancy B.V..... (truncated for brevity) ...
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Nový zde? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.