Lands ArcGIS Geocode-ALL (DEV)

Lands ArcGIS Geocode-ALL

by LandsD Map API

HTML

<link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/css/esri.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.20/dijit/themes/nihilo/nihilo.css">
<script src="https://js.arcgis.com/3.20/"></script>
<div id="search"></div>
<div id="map-area"></div>
<div id="landsdlogo" class="landsdlogo"></div>

CSS

#search {
   display: block;
   position: absolute;
   z-index: 2;
   top: 30px;
   left: 75px;
 }

.logo-med {
    width: 46px !important;
    height: 22px !important;
    background-image: url(https://js.arcgis.com/3.20/esri/images/map/logo-sm.png) !important;
    }

#landsdlogo {
  display: inline-block;
  vertical-align: bottom;
  width: 25px;
  height: 25px;
  background: url(https://mapapis01.blob.core.windows.net/images/landsdlogo.jpg);
  background-repeat: no-repeat;
  background-size: 25px 25px;
}

.esriAttribution {
  background: transparent;
}

JavaScript

// resize map
const mapdiv = window['map-area'];
var margin;
if (document.all) {
  margin = parseInt(document.body.currentStyle.marginTop, 10) + parseInt(document.body.currentStyle.marginBottom, 10);
} else {
  margin = parseInt(document.defaultView.getComputedStyle(document.body, '').getPropertyValue('margin-top')) + parseInt(document.defaultView.getComputedStyle(document.body, '').getPropertyValue('margin-bottom'));
}
mapdiv.style.height = (window.innerHeight - margin) + 'px';

/////
var map
var apikey = 'f4d3e21d4fc14954a1d5930d4dde3809' //landsd.azure-api.net starter key

require([
  "dojo/dom",
  "esri/tasks/locator",
  "esri/dijit/Search",
  "esri/symbols/PictureMarkerSymbol",
  "esri/InfoTemplate",
  "esri/layers/ArcGISTiledMapServiceLayer",
  "esri/SpatialReference",
  "esri/geometry/Point",
  "esri/dijit/Popup",
  "esri/dijit/PopupTemplate",
  "esri/layers/FeatureLayer",
  "esri/map",
  "esri/dijit/Scalebar",
  "dijit/layout/BorderContainer",
  "dijit/layout/ContentPane",
  "dijit/TitlePane",
  "dijit/form/CheckBox",
  'dojo/_base/json',
  "dojo/domReady!"
], function(
  dom, Locator, Search, PictureMarkerSymbol, InfoTemplate,
  ArcGISTiledMapServiceLayer, SpatialReference, Point,
  Popup,
  PopupTemplate,
  FeatureLayer, Map, 
  Scalebar
) {

  var locatorUrls = [
  {
    name: 'AddressPoint',
    placeholder: 'Composite Locator',
    url: 'https://landsd.azure-api.net/dev/ags/gc/composite'
    } 
    ];

  var bLayer = new ArcGISTiledMapServiceLayer('https://landsd.azure-api.net/dev/ags/map/basemap/HK80?key=' + apikey, {
    showAttribution: true
  });
  var bLabelLayer = new ArcGISTiledMapServiceLayer('https://landsd.azure-api.net/dev/ags/map/label-sc/HK80?key=' + apikey);

  var _map = new Map("map-area", {
    center: new Point(823100,831200, new SpatialReference({ wkid: 2326 })),
    showAttribution: true,
    zoom: 11,
    minZoom: 10,
    maxZoom: 19
  });
  /*
  var attrib = new Attribution({map:_map},"attributionDiv");
     attrib.itemDelimiter...