From 73e83945649026875b02edc12aa21f21229c9c13 Mon Sep 17 00:00:00 2001 From: conemint Date: Mon, 21 Dec 2015 18:15:50 -0500 Subject: [PATCH 1/9] Update TestMult.html Update on multi search panel, search on cd unit bbl, to fix: buttons --- TestMult.html | 155 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 100 insertions(+), 55 deletions(-) diff --git a/TestMult.html b/TestMult.html index 88ef501..ecafc0f 100644 --- a/TestMult.html +++ b/TestMult.html @@ -76,6 +76,30 @@ z-index: 45; } .esriPopup .action.zoomTo { display: none; } + + .searchIcon { + width: 0px; + height: 0px; + line-height: 0px; + display: hide; + } + + /*.searchIcon{ + color:#0052A3; + font-size:1px; + }*/ + .arcgisSearch { + color:#0052A3; + font-size:20px; + } + + /* .arcgisSearch .searchGroup .searchInput, + .arcgisSearch .searchBtn, + .arcgisSearch .noResultsMenu, + .arcgisSearch .suggestionsMenu { + border: 1px solid #003300; + background-color: #E5E5E5; + }*/ #headtable { border: 0px solid #0052A3; background-color: #0052A3; @@ -146,7 +170,30 @@ parser.parse(); - + var curCDkey, curCDkey_s; + + /* + registry.byId("searchValue").on("click", doSearchValue); + function doSearchValue() { + + //highlight symbol + var sms = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 12, + new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, + new Color([255, 0, 0]), 0.8), + new Color([0, 0, 0, 0.35])); + + //label text symbol + var ls = new TextSymbol().setColor(new Color([0, 0, 0, 0.9])).setFont(new Font("16px", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLD, "Arial")).setOffset(15, -5).setAlign(TextSymbol.ALIGN_START); + + s.sources[0].highlightSymbol = sms; //set the symbol for the highlighted symbol + s.sources[0].labelSymbol = ls; //set the text symbol for the label + + //If multiple results are found, it will default and select the first. + s.search("New York"); + } + */ + + var map = new Map("map", { basemap: "streets", center: [-74.005941, 40.712784], // lon, lat @@ -159,19 +206,6 @@ maxScale:500, minScale:5000, id:'noncd' - /*infoTemplate: new InfoTemplate("Parcel: ${BORO}/${BLOCK}/${LOT}", - "
DOF Value 2016 Tentative: $${fmv:NumberFormat}
" - +"
Adress:${Street_Num}, ${Street_Nam}, New York, NY
" - +"
Total Units:${resunit}
" - +"
Gross SQFT:${ttlsqft} SQFT
" - +"
Stories:${story:NumberFormat}
" - +"
Year Built:${AYB}
" - +"
Residential SQFT:${ressqft} SQFT

" - +"
View Property Tax Bills
" - +"
Exemptions and Abatements
" - +"
Request Data Correction
" - +"

Search on Google Map
" - )*/ }); layer.maxScale=500; layer.minScale=5000; @@ -185,13 +219,7 @@ maxScale:500, minScale:5000, id:'cd' - /*infoTemplate: new InfoTemplate("Parcel: ${Boro}/${Block}/${Lot}", - "
Adress:${Street_Num}, ${Street_Nam}, New York, NY
" - +"
View Property Tax Bills
" - +"
Exemptions and Abatements
" - +"
Request Data Correction
" - +"

Search on Google Map
" - )*/ + }); //Add layers to map @@ -215,6 +243,8 @@ //Info Window: set size map.infoWindow.resize(245,300); + + //4.a. Hover popup window set up dialog = new TooltipDialog({ id: "tooltipDialog", @@ -285,17 +315,21 @@ //map.graphics.clear(); if (hovergraph){ hovergraph.clear(); + //graphicsLayer1.clear(); + //map.graphicsLayer.clear(); } + map.setMapCursor("default"); //set mouse pointer back dijitPopup.close(dialog); } //Search - var s = new Search({ + var searchvar = new Search({ enableButtonMode: false, //this enables the search widget to display as a single button - enableLabel: true, + enableLabel: false, enableInfoWindow: true, showInfoWindowOnSelect: true, + /*hasButtonMode: false,*/ zoomScale: 1000, allPlaceholder: "Choose search type", activeSourceIndex:'cd', @@ -338,8 +372,8 @@ sources.push({ featureLayer: new FeatureLayer("//services3.arcgis.com/aD88pT4hjL80xq0F/arcgis/rest/services/MHcdmain/FeatureServer/0"), - searchFields: ["bl_sp"], - displayField: "bl_sp", + searchFields: ["CONDO_KEY"], + displayField: "CONDO_KEY", exactMatch: true, name: "Search on Condo main", outFields: ["*"], @@ -362,11 +396,11 @@ }); //Set the sources above to the search widget - s.set("sources", sources); - s.set("activeSourceIndex", 1); + searchvar.set("sources", sources); + searchvar.set("activeSourceIndex", 1); var searchcd; - s.on("search-results", function (e) { + searchvar.on("search-results", function (e) { var rs, h; rs = e.results; h = ""; @@ -376,15 +410,6 @@ return; }else{//NON CONDO ([0]) var resultItems = []; - - /*if (titlePane11){ - var ch=1; - titlePane11.destroyRecursive(); - }; - var widgets = dijit.findWidgets("toolsPane"); - dojo.forEach(widgets, function(w) { - w.destroyRecursive(false); - });*/ dijit.byId("toolsPane").destroyDescendants(false); domConstruct.empty("toolsPane"); var containerNode = dojo.byId("toolsPane"); @@ -410,9 +435,42 @@ }); - s.startup(); + searchvar.startup(); + on(dom.byId("execute3"), "click", dosearchtest); + function dosearchtest() { + //If multiple results are found, it will default and select the first. + searchvar.search('1536'); + } + //Query--condounit + //Initiate Query + var queryTaskunit = new QueryTask("//services3.arcgis.com/aD88pT4hjL80xq0F/arcgis/rest/services/tc2MH_unitlist1_12212015/FeatureServer/0"); + var queryunit = new Query(); + queryunit.returnGeometry = false; + queryunit.outFields = ["*"] + //Execute Query + on(dom.byId("execute2"), "click", executeunit); + function executeunit () { + queryunit.where = "BL = 18461233"; + queryTaskunit.execute(queryunit, showResultsUnit,function(error){console.log(error);}); + } + function showResultsUnit (results) { + var resultItems = []; + var resultCount = results.features.length; + if (resultCount==1){ + var featureAttributes = results.features[0].attributes; + curCDkey = featureAttributes.CONDO_KEY; + searchvar.set("activeSourceIndex", 1); + curCDkey_s = curCDkey.toString(); + searchvar.set("value", curCDkey_s); + searchvar.search(); + }else{ + return; + }; + + }; + //Query1216 //Initiate Query var queryTask = new QueryTask("//services3.arcgis.com/aD88pT4hjL80xq0F/arcgis/rest/services/MHcdsuffix/FeatureServer/0"); @@ -422,7 +480,6 @@ //Execute Query on(dom.byId("execute"), "click", execute); function execute () { - //dojo.empty("toolsPane"); query.where = "CONDO_KEY = "+searchcd ; queryTask.execute(query, showResults,function(error){console.log(error);}); } @@ -430,7 +487,6 @@ var resultItems = []; var resultCount = results.features.length; dijit.byId("toolsPane").destroyDescendants(false); - //domConstruct.empty("toolsPane"); var containerNode = dojo.byId("toolsPane"); for (var i = 0; i < resultCount; i++) { var featureAttributes = results.features[i].attributes; @@ -456,26 +512,13 @@ content: resultItems }, domConstruct.create('div', {}, containerNode)); } - //"titlePane"+i); - /*var titlePane1= new dijit.TitlePane({ - title:"This is a title pane", - content: new ContentPane({ - content:resultItems, - }) - }, domConstruct.create('div', {}, containerNode));*/ + } /*dom.byId("toolsPane").innerHTML = "
"*/ }; - /*var layerList = new LayerList({ - map: map, - showLegend: true, - showOpacitySlider: true, - showSublayers: true - }, "layerList"); - layerList.startup();*/ - + }); @@ -510,6 +553,8 @@
+ + Loading...
From 0ffb213981d2fce813fd327863560a91d3333b5f Mon Sep 17 00:00:00 2001 From: conemint Date: Tue, 22 Dec 2015 08:49:33 -0500 Subject: [PATCH 2/9] Update TestMult.html hide search button --- TestMult.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/TestMult.html b/TestMult.html index ecafc0f..964d00d 100644 --- a/TestMult.html +++ b/TestMult.html @@ -9,7 +9,7 @@ @@ -192,7 +193,7 @@ parser.parse(); - var curCDkey, curCDkey_s; + var curCDkey, curCDkey_s, curCDunit; /* registry.byId("searchValue").on("click", doSearchValue); @@ -426,6 +427,10 @@ var rs, h; rs = e.results; h = ""; + if (rs == null){ + document.getElementById("alerttext").innerHTML = "BBL cannot be find\nPlease enter a valid block and lot."; + return; + } if (rs[1] == null){ if( rs[0]==null){ h = "
rs is null
"; @@ -462,6 +467,7 @@ //Search NonCD on(dom.byId("execute3"), "click", dosearchtest); function dosearchtest() { + document.getElementById("alerttext").innerHTML=""; document.getElementById("execute").disabled = true; //If multiple results are found, it will default and select the first. searchvar.set("activeSourceIndex", 0); @@ -481,31 +487,34 @@ //Execute Query on(dom.byId("execute2"), "click", executeunit); function executeunit () { + document.getElementById("alerttext").innerHTML=""; var search_block = dom.byId("searchtext_Block").value; var search_lot = dom.byId("searchtext_Lot").value; var searchx = search_block + "/" + search_lot; //var searchx= dom.byId("searchtext").value; queryunit.where = "bl_sp = '"+searchx+"'"; - queryTaskunit.execute(queryunit, showResultsUnit,function(error){console.log(error);}); + queryTaskunit.execute(queryunit, GetResultsUnit,function(error){console.log(error);}); document.getElementById("execute").disabled = false; } - function showResultsUnit (results) { + function GetResultsUnit (results) { var resultItems = []; var resultCount = results.features.length; if (resultCount==1){ var featureAttributes = results.features[0].attributes; curCDkey = featureAttributes.CONDO_KEY; + curCDunit = featureAttributes.unit; searchvar.set("activeSourceIndex", 1); curCDkey_s = curCDkey.toString(); searchvar.set("value", curCDkey_s); searchvar.search(); }else{ + document.getElementById("alerttext").innerHTML = "BBL cannot be find\nPlease enter a valid block and lot for Condominium Unit."; return; }; }; - //Query1216 + //Query--Get detail for Condo //Initiate Query var queryTask = new QueryTask("//services3.arcgis.com/aD88pT4hjL80xq0F/arcgis/rest/services/MHcdsuffix/FeatureServer/0"); var query = new Query(); @@ -514,7 +523,7 @@ //Execute Query on(dom.byId("execute"), "click", execute); function execute () { - query.where = "CONDO_KEY = "+searchcd ; + query.where = "CONDO_KEY = "+searchcd +" and Unit='"+curCDunit+"'"; queryTask.execute(query, showResults,function(error){console.log(error);}); } function showResults (results) { @@ -594,19 +603,13 @@
- + - +
+

- - - - -
Loading...
From ea016cbff34378b4f9e8ca1aa84a34075f76fbdc Mon Sep 17 00:00:00 2001 From: conemint Date: Tue, 22 Dec 2015 16:36:07 -0500 Subject: [PATCH 6/9] Update TestMult.html --- TestMult.html | 164 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 125 insertions(+), 39 deletions(-) diff --git a/TestMult.html b/TestMult.html index c7805d9..bcc8940 100644 --- a/TestMult.html +++ b/TestMult.html @@ -23,7 +23,7 @@ } #toolsPane { - width: 250px; + width: 350px; } #tablePane { @@ -37,12 +37,12 @@ bottom: 2em; left: 0; } - + .esriPopup .action.zoomTo { display: none; } /* Hide the progress bar when map is not updating */ #map:not([data-updating]) progress { display: none; } - #feedback { + #SearchBox { background: #fff; color: #444; position: absolute; @@ -60,10 +60,16 @@ border-radius: 4px; background-color: #fcfcfc; } - .shadow { + .shadow { box-shadow: 0 0 5px #888; - } - /*#search { + } + #BasemapToggle { + position: absolute; + bottom: 20px; + left: 20px; + z-index: 45; + } + /*#search { display: block; position: absolute; z-index: 40; @@ -88,40 +94,23 @@ background-color: #f2f2f2; }*/ - #BasemapToggle { - position: absolute; - bottom: 20px; - left: 20px; - z-index: 45; - } - .esriPopup .action.zoomTo { display: none; } + + - .searchIcon { +/* .searchIcon { width: 0px; height: 0px; line-height: 0px; display: hide; } - /*.searchIcon{ - color:#0052A3; - font-size:1px; - }*/ .arcgisSearch .searchBtn { display: none; } - /*.arcgisSearch { - color:#0052A3; - font-size:20px; - }*/ - - /* .arcgisSearch .searchGroup .searchInput, - .arcgisSearch .searchBtn, - .arcgisSearch .noResultsMenu, - .arcgisSearch .suggestionsMenu { - border: 1px solid #003300; - background-color: #E5E5E5; - }*/ +*/ + #intro{ + padding: 10px; + } #headtable { border: 0px solid #0052A3; background-color: #0052A3; @@ -140,6 +129,26 @@ font-weight: bold; color: white; } + #tableheadtext{ + font-family: arial; + font-weight: bold; + color:#003366; + text-shadow:1px 1px 2px #b3d9ff; + margin: 0px; + } + /*table, th, td { + border: 1px solid black; + border-collapse: collapse; + }*/ + .tg {border-collapse:collapse;border-spacing:0;border-color:#ccc;} + .tg td{ + font-family:Arial, sans-serif;font-size:14px;padding:1px 17px; + border-style:solid;border-width:0px;overflow:hidden;word-break:normal; + border-top-width:1px;border-bottom-width:0px;} + .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:1px 17px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-top-width:1px;border-bottom-width:0px;} + .tg .tg-qmme{font-family:Arial, Helvetica, sans-serif !important;;vertical-align:top} + .tg .tg-yw4l{vertical-align:top} + .tg:hover {background-color:#e5f2ff;} a:link { text-decoration: none; } @@ -152,7 +161,7 @@ text-decoration: none; color: #ff6600; } - .button:hover { background-color: #66b3ff; } + .button:hover { background-color: #b5d7e3; } @@ -179,6 +188,7 @@ "dojo/number", "dojo/dom-style", "dojo/parser", + "dojo/number", "dijit/TooltipDialog", "dijit/popup", "dijit/TitlePane", @@ -187,7 +197,7 @@ "dijit/layout/ContentPane", "dijit/form/ToggleButton", "dojo/domReady!" - ], function(Map, BasemapToggle, FeatureLayer, FeatureTable, LayerList, Search,InfoTemplate,domConstruct, dom, on, Query, QueryTask, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Color, Graphic, esriLang,number, domStyle, parser,TooltipDialog,dijitPopup, TitlePane,registry, + ], function(Map, BasemapToggle, FeatureLayer, FeatureTable, LayerList, Search,InfoTemplate,domConstruct, dom, on, Query, QueryTask, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Color, Graphic, esriLang,number, domStyle, parser,localeNumber,TooltipDialog,dijitPopup, TitlePane,registry, ToggleButton) { @@ -244,6 +254,10 @@ id:'cd' }); + layercdm.maxScale=500; + layercdm.minScale=5000; + var renderer = new SimpleRenderer(symbol1); + layercdm.setRenderer(renderer); //Add layers to map map.addLayers([layer,layercdm]); @@ -442,8 +456,40 @@ var containerNode = dojo.byId("toolsPane"); var featureAttributes = rs[0][0].feature.attributes; - for (var attr in featureAttributes) { + /*for (var attr in featureAttributes) { resultItems.push("" + attr + ": " + featureAttributes[attr] + "
"); + }*/ + resultItems.push("

Building Information

"); + setNullValue("Address", featureAttributes.Street_Number + " "+ featureAttributes.Street_Name , "--"); + setNullValue("Neighborhood", featureAttributes.NBHD, "--"); + setNullValue("Property Type", featureAttributes.Structure, "--"); + setNullValue("Total Gross SQFT", localeNumber.format(featureAttributes.ttlsqft), "--"); + setNullValue("Total Gross SQFT", featureAttributes.ttlsqft, "--"); + setNullValue("Total Gross SQFT", localeNumber.format(featureAttributes.ttlsqft), "--"); + setNullValue("Residential SQFT", localeNumber.format(featureAttributes.ressqft), "--"); + setNullValue("Commercial SQFT", localeNumber.format(featureAttributes.comsqft), "--"); + setNullValue("Total Units", localeNumber.format(featureAttributes.ttlunit), "--"); + setNullValue("Residential Units", localeNumber.format(featureAttributes.resunit), "--"); + setNullValue("Commercial Units", localeNumber.format(featureAttributes.comunit), "--"); + setNullValue("Total Story", localeNumber.format(featureAttributes.story), "--"); + setNullValue("Year Built", featureAttributes.AYB, "--"); + setNullValue("Zoning", featureAttributes.Zone_1, "--"); + resultItems.push("
"); + + resultItems.push("

Tax Information

"); + resultItems.push("
"); + setNullValue("fmv", "$"+localeNumber.format(featureAttributes.fmv), "--"); + setNullValue("Agi_Pgsf", "$"+localeNumber.format(featureAttributes.Agi_Pgsf), "--"); + setNullValue("Exp_Pgsf", "$"+localeNumber.format(featureAttributes.Exp_Pgsf), "--"); + setNullValue("Noi_Pgsf", "$"+localeNumber.format(featureAttributes.Noi_Pgsf), "--"); + resultItems.push("

Guideline Information

"); + function setNullValue(varName, value, defaultValue){ + if (value == 0 || value ==""||value == "0" ||value == "$0") { + resultItems.push("
"+varName+":
"+defaultValue+"
"); + } + else { + resultItems.push("
"+varName+":
"+value+"
"); + } } resultItems.push("
"); var titlePane1 = new TitlePane({ @@ -533,13 +579,45 @@ var containerNode = dojo.byId("toolsPane"); for (var i = 0; i < resultCount; i++) { var featureAttributes = results.features[i].attributes; - for (var attr in featureAttributes) { - resultItems.push("
"+attr +":
"+featureAttributes[attr]+"
"); - //resultItems.push("" + attr + ": " + featureAttributes[attr] + "
"); - } + resultItems.push("

Building Information

"); + + setNullValue("Address", featureAttributes.Street_Number + " "+ featureAttributes.Street_Name , "--"); + setNullValue("Neighborhood", featureAttributes.NBHD, "--"); + setNullValue("Property Type", featureAttributes.Structure, "--"); + setNullValue("Total Gross SQFT", localeNumber.format(featureAttributes.ttlsqft), "--"); + setNullValue("Total Gross SQFT", featureAttributes.ttlsqft, "--"); + setNullValue("Total Gross SQFT", localeNumber.format(featureAttributes.ttlsqft), "--"); + setNullValue("Residential SQFT", localeNumber.format(featureAttributes.ressqft), "--"); + setNullValue("Commercial SQFT", localeNumber.format(featureAttributes.comsqft), "--"); + setNullValue("Total Units", localeNumber.format(featureAttributes.ttlunit), "--"); + setNullValue("Residential Units", localeNumber.format(featureAttributes.resunit), "--"); + setNullValue("Commercial Units", localeNumber.format(featureAttributes.comunit), "--"); + setNullValue("Total Story", localeNumber.format(featureAttributes.story), "--"); + setNullValue("Year Built", featureAttributes.AYB, "--"); + setNullValue("Zoning", featureAttributes.Zone_1, "--"); + + resultItems.push("

Tax Information

"); resultItems.push("
"); + setNullValue("fmv", "$"+localeNumber.format(featureAttributes.fmv), "--"); + setNullValue("Agi_Pgsf", "$"+localeNumber.format(featureAttributes.Agi_Pgsf), "--"); + setNullValue("Exp_Pgsf", "$"+localeNumber.format(featureAttributes.Exp_Pgsf), "--"); + setNullValue("Noi_Pgsf", "$"+localeNumber.format(featureAttributes.Noi_Pgsf), "--"); + resultItems.push("

Guideline Information

"); + /*for (var attr in featureAttributes) { + resultItems.push("
"+attr +":
"+featureAttributes[attr]+"
"); + //resultItems.push("" + attr + ": " + featureAttributes[attr] + "
"); + }*/ + resultItems.push("
"); + function setNullValue(varName, value, defaultValue){ + if (value == 0 || value ==""||value == "0" ||value == "$0") { + resultItems.push("
"+varName+":
"+defaultValue+"
"); + } + else { + resultItems.push("
"+varName+":
"+value+"
"); + } + } if (i==0){ var titlePane1 = new TitlePane({ id: "titlePane"+i, @@ -559,6 +637,7 @@ } /*dom.byId("toolsPane").innerHTML = "
"*/ }; + @@ -582,7 +661,14 @@
-

Search for a property to display details
+
+

This is an interactive map for Tax Class 2 Properties in New York City.

+

You are currently in the Borough Map of Manhattan.

+

Enter a Block and Lot number in the box and click "Get Non Condo" to search for rental buildings or Coop buildings .

+

Or click "Get Condo Unit" to search for units in Condominium Buidlings or Development .

+

Then click on "Get Condo Suffix Details" for information on the Condominium Buidlings or Development.

+
Search for a property to display details +
@@ -594,7 +680,7 @@
For Example: 1845/7501
-
+