Customizing Tax Parcel Viewer

1294
4
01-31-2013 10:03 AM
by Anonymous User
Not applicable
Original User: jrnoyes

We have published the Tax Parcel Viewer and all of the out of the box required services to get the app running internally. I am attempting to tweak it a little more because I know there are things our constituents will want.
However I have having a hard time with the first item at hand.
When you Search it will only display the ParcelID and Address.
I am trying to add OwnerName to this dialog box.

The Basemap and Topo map are working and functioning. The info window is working. I just don't know what I am doing wrong.
Can someone help?

Attached are my java config/html files

Other things I would like to accomplish are adding additional layers users can turn on and off, a scale bar and the ability to print the map I am looking at. But I will save them for later.
0 Kudos
4 Replies
JohnGravois
Frequent Contributor
if OWNERNAME is another field in the same feature layer, you should be able to update the SQL query near line 323 of config.js to make sure that searches on that field result in hits.

ie:
ParcelQuery: "UPPER(PARCELID) LIKE '%${0}%' OR UPPER(SITEADDRESS) LIKE '%${0}%' OR UPPER(CNVYNAME) LIKE '%${0}% OR UPPER(OWNERNAME) LIKE '%${0}%'",


with regard to having the basemap in the printout match what is currently displayed in the map, i wrote some hack code for testing current basemap layer visibility and using the information to make the printout more dynamic, but i know the LocalGovernment team is planning on correcting the problem in the app template down the road.

in utils.js (near line 1292)
if (reportType == 'PropertyMap') {
  var visibleBasemapUrl;
  if (map._layers.parcelMap.visible == true)
    visibleBasemapUrl = map._layers.parcelMap.url
  else
    visibleBasemapUrl = map._layers.imageryMap.url 
..........
"baseMap": {
                "title": "Shared Imagery Basemap",
                "baseMapLayers": [
                {
                    "url": visibleBasemapUrl
0 Kudos
by Anonymous User
Not applicable
Original User: kenburcham

To get the OWNERNAME field to display in the search table you'd also need to add it to the "DisplayFields" and "OutFields". This might work:

...snip...
ServiceURL: "http://yoursite/arcgis/rest/services/TaxParcelQuery/MapServer/0",
          OutFields: "PARCELID, OWNERNAME",
          ParcelQuery: "PARCELID LIKE '%${0}%' OR OWNERNAME LIKE '%${0}%'",    
          LocateParcelQuery: "PARCELID = '${0}'",
          DisplayFields: ["PARCELID", "OWNERNAME"],
          UseColor: true,
...snip...


This kind of thing worked for us.  I think the template only supports showing two columns, as adding a third seemed to be ignored.

ken.
0 Kudos
JohnNoyes
New Contributor II
As to fields to search and fields to display i finally got the code to working. We are still going to have to work with the font sizes and such but the basic functionality is there for us now.
Below is code for the search itself

 Key: "taxParcelLayer",
ServiceURL: "http://gisvision/ArcGIS/rest/services/TaxParcelQuery/MapServer/0",
OutFields: "PARCELID, SITEADDRESS, CNVYNAME,OWNERNME1,LOWPARCELID",
ParcelQuery: "UPPER(PARCELID) LIKE '%${0}%' OR UPPER(SITEADDRESS) LIKE '%${0}%' OR UPPER(CNVYNAME) LIKE '%${0}%' OR UPPER(OWNERNME1) LIKE '%${0}%' OR UPPER(OWNERNME2) LIKE '%${0}%'",
LocateParcelQuery: "PARCELID = '${0}'",
DisplayFields: ["PARCELID", "SITEADDRESS", "OWNERNME1", "LOWPARCELID"],


And this is the code I had to add to various functions in the locator.js file to make it display in the results

var tdOwnerId = document.createElement("td");
trHeader.appendChild(tdOwnerId);
tdOwnerId.innerHTML = "Owner Name";
var td2 = document.createElement("td");
td2.innerHTML = ownerName;


Thank you for the posts.
Now on to adding an overview map, scale bar and a layer list.
If anyone has suggestions on how to do these I would be more than willing to listen.
SallieVaughn
Occasional Contributor

This information is extremely helpful! Would you be willing to share your locator.js? I can't seem to get the placement of the code correct. Thanks!

0 Kudos