{ "id": "57", "displayName": "Survey Control (Destroyed)", "shortDisplayName": null, "description": "", "connectionString": "url=https://gis.maps.mississauga.ca:6443/arcgis/rest/services/SurveyControl_MaintPublication/MapServer/0", "copyright": "", "hasAttributionData": false, "serviceType": "Dynamic", "serviceFunction": "Operational", "baseMapGroup": null, "baseMapGroupIndex": "", "baseMapGroupIsMutuallyExclusive": false, "opacity": 1, "visible": true, "initiallyVisible": true, "drawingBehavior": "FeatureLayer", "iconUri": null, "includeInLayerList": false, "defaultAllowSymbolization": true, "isExpanded": true, "updateInterval": null, "dataProvider": null, "disableClientCaching": null, "serviceTag": "nleeGr31c8za4fKxIMI7x8AGKVmpMcAiXQ9Aw/btD/o=", "identifiable": null, "includeMosaicDatasetValues": null, "includeCatalogItems": null, "includeInLegend": null, "startTime": null, "endTime": null, "serverVersion": "10.91", "failureAction": "Warn", "failureTimeout": null, "requestEncoding": null, "supportsDynamicLayers": false, "hasLayerCatalog": false, "autoSave": null, "color": null, "geometry": null, "objectIds": null, "onDemandCacheSize": null, "outFields": "*", "queryMode": "OnDemand", "tileHeight": null, "tileWidth": null, "selectionColor": null, "where": null, "editVerticesEnabled": true, "moveEnabled": true, "rotateEnabled": true, "scaleEnabled": true, "featureClustering": { "userCanToggle": true, "enabled": false, "radius": 50, "backgroundColor": [ 255, 0, 0, 255 ], "labelColor": [ 255, 255, 255, 255 ], "maximumFeatures": 10, "clusterSize": 0 }, "featureHeatMap": { "userCanToggle": true, "enabled": false, "intensity": 30, "field": null, "gradient": [ [ 255, 255, 255, 0 ], [ 0, 0, 255, 255 ], [ 255, 0, 0, 255 ], [ 255, 255, 0, 255 ] ], "offset": [ 0, 0.5, 0.75, 0.85 ], "respectScaleRange": false }, "themeSettings": [], "layerHyperlinks": [], "tileInfo": {}, "instantSearch": false, "layers": [ { "id": "0", "name": "Survey Control (Destroyed)", "nativeID": "0", "displayName": "Destroyed Monuments", "description": "", "defaultVisibility": true, "featureType": "Point", "type": "DynamicFeatureLayer", "maxScale": 0, "minScale": 0, "visible": true, "initiallyVisible": true, "showMapTips": true, "identifiable": true, "queryable": true, "searchable": true, "supportsIdentify": true, "supportsQuery": true, "canCopyFeature": true, "snappable": true, "snappingEnabled": true, "hasAttachments": true, "featureZoomFactor": null, "featureZoomScale": null, "featureBorderColor": null, "featureBorderWidth": null, "featureFillColor": null, "showFeatureHyperlinks": "ShowAll", "iconUri": null, "includeInLayerList": true, "includeInLegend": true, "allowSymbolization": true, "legendUrl": null, "styleName": null, "drawIndex": null, "canToggleLabels": false, "showLabels": true, "dataProvider": null, "timeZoneId": "Etc/UTC", "featureLabel": "{MonDesc} (Destroyed)", "featureDescription": "
Monument Number: {PDF}
Status: {Status}
{ToUTCDate}

Agency: {AgencyDesc}
{Scale}
Order: {OrderDesc}

{GeoData}

{Comments}
{Nearest}
", "featureLongDescription": "
Monument Number: {PDF}
Agency: {AgencyDesc}
Status: {Status} | {LastFoundUTC}

{GeoData}

{Comments}
{Attachments}
{Nearest}
", "displayField": "Monument", "primaryKeyField": "OBJECTID", "fullExtent": { "xmin": -79.822082871738161, "ymin": 43.463760362824544, "xmax": -79.537477249698185, "ymax": 43.761591545993369, "spatialReference": { "wkid": 4326 } }, "parentLayerId": null, "subLayerIds": [], "hasReports": false, "hasDataLinks": false, "fields": [ { "name": "OBJECTID", "visible": true, "dataType": "Int32", "displayName": "OBJECTID", "alias": "OBJECTID" }, { "displayName": "Monument Number", "name": "Monument", "alias": "Monument Number", "visible": true, "dataType": "String", "searchable": true }, { "name": "MonType", "visible": true, "dataType": "String", "displayName": "Monument Type", "alias": "Monument Type" }, { "name": "Agency", "visible": true, "dataType": "String", "displayName": "Agency", "alias": "Agency" }, { "name": "Easting", "visible": true, "dataType": "Double", "displayName": "Easting", "alias": "Easting" }, { "name": "Northing", "visible": true, "dataType": "Double", "displayName": "Northing", "alias": "Northing" }, { "name": "Latitude", "visible": true, "dataType": "String", "displayName": "Latitude", "alias": "Latitude" }, { "name": "Longitude", "visible": true, "dataType": "String", "displayName": "Longitude", "alias": "Longitude" }, { "name": "ScaleFactor", "visible": true, "dataType": "Double", "displayName": "Scale Factor", "alias": "Scale Factor" }, { "name": "Easting_CSRS", "visible": true, "dataType": "Double", "displayName": "Easting_CSRS", "alias": "Easting_CSRS" }, { "name": "Northing_CSRS", "visible": true, "dataType": "Double", "displayName": "Northing_CSRS", "alias": "Northing_CSRS" }, { "name": "Latitude_CSRS", "visible": true, "dataType": "String", "displayName": "Latitude_CSRS", "alias": "Latitude_CSRS" }, { "name": "Longitude_CSRS", "visible": true, "dataType": "String", "displayName": "Longitude_CSRS", "alias": "Longitude_CSRS" }, { "name": "ScaleFactor_CSRS", "visible": true, "dataType": "Double", "displayName": "ScaleFactor_CSRS", "alias": "ScaleFactor_CSRS" }, { "name": "CSRS_Version", "visible": true, "dataType": "Int16", "displayName": "CSRS_Version", "alias": "CSRS_Version" }, { "name": "HorizontalOrder", "visible": true, "dataType": "Int16", "displayName": "Horizontal Control Order", "alias": "Horizontal Control Order" }, { "name": "Elevation", "visible": true, "dataType": "Double", "displayName": "Elevation", "alias": "Elevation" }, { "name": "VerticalOrder", "visible": true, "dataType": "Int16", "displayName": "Vertical Control Order", "alias": "Vertical Control Order" }, { "name": "Description", "visible": true, "dataType": "String", "displayName": "Description", "alias": "Description" }, { "name": "Status", "visible": true, "dataType": "Int16", "displayName": "Status", "alias": "Status" }, { "name": "LastFound", "visible": true, "dataType": "DateTime", "displayName": "Last Found", "alias": "Last Found" }, { "name": "LastPrinted", "visible": true, "dataType": "DateTime", "displayName": "Last Printed", "alias": "Last Printed" }, { "name": "Notes", "visible": true, "dataType": "String", "displayName": "Notes", "alias": "Notes" }, { "name": "Actionable", "visible": true, "dataType": "Int16", "displayName": "Actionable", "alias": "Actionable" }, { "name": "Easting74", "visible": true, "dataType": "Double", "displayName": "Easting74", "alias": "Easting74" }, { "name": "Northing74", "visible": true, "dataType": "Double", "displayName": "Northing74", "alias": "Northing74" }, { "name": "ScaleFactor74", "visible": true, "dataType": "Double", "displayName": "Scale Factor74", "alias": "Scale Factor74" }, { "name": "Shape", "visible": true, "dataType": "Object", "displayName": "Shape", "alias": "Shape" }, { "name": "GlobalID", "visible": true, "dataType": "Guid", "displayName": "GlobalID", "alias": "GlobalID" }, { "name": "created_user", "visible": true, "dataType": "String", "displayName": "created_user", "alias": "created_user" }, { "name": "created_date", "visible": true, "dataType": "DateTime", "displayName": "created_date", "alias": "created_date" }, { "name": "last_edited_user", "visible": true, "dataType": "String", "displayName": "last_edited_user", "alias": "last_edited_user" }, { "name": "last_edited_date", "visible": true, "dataType": "DateTime", "displayName": "last_edited_date", "alias": "last_edited_date" } ], "featureHyperlinks": [], "layerHyperlinks": [], "arcadeExpressions": [ { "expression": "return Count(Attachments($feature));", "token": "AttachCount" }, { "expression": "var a = Attachments($feature);\r\nif (Count(a) > 0) {\r\n var server = \"https://gis.maps.mississauga.ca:6443/arcgis/rest/services/SurveyControl_MaintPublication/MapServer/0/\";\r\n var attachUrl;\r\n var result = \"<\" + \"br/><\" + \"span style='font-weight: bold; text-decoration-line: underline;'>Attachments:<\" + \"/span><\" + \"br/>\";\r\n for (var i in a) {\r\n attachUrl = server + $feature.OBJECTID + \"/attachments/\" + a[i].id;\r\n result += \"<\" + \"a href='\" + attachUrl + \"' target=_'blank'><\" + \"img width='300' height='300' align='center' src='\" + attachUrl + \"'/><\" + \"/a>\" + TextFormatting.NewLine;\r\n }\r\n result += \"<\" + \"span style='font-style: italic;'>Click to enlarge<\" + \"/span>\";\r\n return result;\r\n}", "token": "Attachments" }, { "expression": "var searchDist = 2000;\r\nvar searchUnit = \"m\";\r\n\r\nvar monuments = FeatureSetByName($map, \"Survey Control (Existing)\");\r\nvar monEligible = Decode($feature.MonType, \"CM\", \" And MonType In ('CM', 'HCM', 'BM')\", \"HCM\", \" And MonType In ('HCM', 'CM')\", \"BM\", \" And MonType In ('BM', 'CM')\", \"\");\r\nvar monFilter = Filter(monuments, \"Monument <> \" + $feature.Monument + \" And Status = 1\" + monEligible);\r\nvar monNearby = Intersects(monFilter, Buffer($feature, searchDist, searchUnit));\r\n\r\nvar dct = {};\r\nvar monDist;\r\nvar key;\r\nvar val;\r\nfor (var mon in monNearby) {\r\n monDist = DistanceGeodetic($feature, mon, searchUnit);\r\n key = Text(monDist, \"0000.00\"); // set the key to the formatted distance, so keys are in ascending order\r\n val = \"<\" + \"li>\" + mon.MonType + \" <\" + \"a href='https://www6.mississauga.ca/BMHCM/\" + Decode(mon.MonType, \"BM\", \"Benchmarks\", \"HorizontalControl\") + \"/\" + mon.Monument + \".pdf'>\" + mon.Monument + \"<\" + \"/a> (~\" + Round(monDist, 0) + \" \" + searchUnit + \" away)<\" + \"/li>\";\r\n // In case of identical distances, append an extra digit to the end to create a unique key\r\n for (var i = 0; i < 3; i++) {\r\n if (HasKey(dct, key)) {\r\n key += Text(i);\r\n }\r\n }\r\n dct[key] = val;\r\n}\r\n\r\nvar results = \"<\" + \"br/><\" + \"span style='font-weight: bold; text-decoration-line: underline;'>Closest Compatible Monuments (still active):<\" + \"/span>\";\r\nvar mx = Min([Count(monNearby), 4]);\r\nif (mx > 0) {\r\n results += \"<\" + \"ol style='margin-top: 5px; margin-bottom: 0px;' type='1'>\";\r\n var i = 0;\r\n for (var key in dct) {\r\n if (i < mx) {\r\n var val = dct[key];\r\n results += val;\r\n }\r\n i++;\r\n }\r\n results += \"<\" + \"/ol>\";\r\n} else {\r\n results += \" None within a \" + Text(searchDist, \"#,###\") + \" \" + searchUnit + \" radius.\";\r\n}\r\n\r\nreturn results;", "token": "Nearest" }, { "expression": "var monDesc = DomainName($feature, 'MonType');\r\n\r\nreturn IIf(IsEmpty(monDesc), $feature.MonType, monDesc);", "token": "MonDesc" }, { "expression": "return DomainName($feature, 'ControlOrder');", "token": "OrderDesc" }, { "expression": "return DomainName($feature, 'Agency');", "token": "AgencyDesc" }, { "expression": "//return IIf($feature.Status == 0 || IsEmpty($feature.Status), $feature.Monument, \"<\" + \"a href='https://www6.mississauga.ca/BMHCM/\" + Decode($feature.MonType, \"BM\", \"Benchmarks\", \"HorizontalControl\") + \"/\" + $feature.Monument + \".pdf'>\" + $feature.Monument + \"<\" + \"/a>\");\r\nreturn $feature.Monument + \" (<\" + \"a href='https://www6.mississauga.ca/BMHCM/\" + Decode($feature.MonType, \"BM\", \"Benchmarks\", \"HorizontalControl\") + \"/\" + $feature.Monument + \".pdf'>PDF<\" + \"/a>)\";", "token": "PDF" }, { "expression": "var coordinates = \"\";\r\nIf ($feature.MonType == \"CM\" || $feature.MonType == \"HCM\") {\r\n coordinates += \"<\" + \"div><\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Latitude:<\" + \"/span> \" + Replace($feature.Latitude, \"^\", \"°\") + \"<\" + \"/div>\";\r\n coordinates += \"<\" + \"div><\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Longitude:<\" + \"/span> \" + Replace($feature.Longitude, \"^\", \"°\") + \"<\" + \"/div>\";\r\n}\r\n\r\nvar elevation = \"\";\r\nIf ($feature.MonType == \"CM\" || $feature.MonType == \"BM\") {\r\n elevation += \"<\" + \"div><\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Elevation:<\" + \"/span> \" + $feature.Elevation + \" m<\" + \"/div>\";\r\n}\r\n\r\nvar datum = \"<\" + \"div><\" + \"span style='font-size: 8px;'>VERTICAL DATUM: CANADIAN GEODETIC DATUM, 1928 (NOT 1978 SOUTHERN ONTARIO READJUSTMENT<\" + \"/span><\" + \"/div>\";\r\n\r\nreturn coordinates + elevation + datum;", "token": "GeoData" }, { "expression": "var result = \"\";\r\n\r\nIf ($feature.MonType == \"CM\" || $feature.MonType == \"HCM\") {\r\n result = \"<\" + \"div><\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Scale Factor:<\" + \"/span> \" + $feature.ScaleFactor + \"<\" + \"/div>\";\r\n}\r\n\r\nreturn result;", "token": "Scale" }, { "expression": "If (!IsEmpty($feature.LastFound)) {\r\n return \"<\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Last Found:<\" + \"/span> \" + Text(ToUTC($feature.LastFound), \"MMMM DD, Y\");\r\n}", "token": "ToUTCDate" }, { "expression": "if (!IsEmpty($feature.Description)) {\r\n return $feature.Description; //\"<\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Description:<\" + \"/span> \" + $feature.Description;\r\n} else {\r\n return \"No Description Available\";\r\n}", "token": "Comments" }, { "expression": "var last = \"<\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Last Seen:<\" + \"/span> \";\r\n\r\nif (!IsEmpty($feature.LastFound)) {\r\n last += Text(ToUTC($feature.LastFound), \"MMMM DD, Y\");\r\n} else {\r\n last += \"Unknown\";\r\n}\r\n\r\nreturn last;", "token": "LastFoundUTC" } ], "isDynamic": false, "dynamicDefinition": null, "themeSettings": [], "tileLevelLimits": [] } ], "tables": [], "fullExtent": { "xmin": 595280.20710000023, "ymin": 4813345.4001, "xmax": 617731.87210000027, "ymax": 4846074.6731, "spatialReference": { "wkid": 26917 } }, "spatialReference": { "wkid": 26917 }, "properties": [], "extensions": [] }