Select to view content in your preferred language

Rest dynamic map service service does not display in Tax Parcel Viewer 10.1

5324
20
03-13-2013 03:32 PM
davidwray
Emerging Contributor
The following Rest service does not display as a operational layer when isVisible = false

http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/Z2/MapServer/0

When I change isVisible = true the service will display, but I cannot toggle on and off.

Any ideas?
0 Kudos
20 Replies
davidwray
Emerging Contributor
Thanks Mike!  It works great now.  I found that the App did not Zoom-In to the parcel so I modified the following code.  Please see
below:

Utils.js line 115 before:

//Get the extent based on the mappoint
function GetBrowserMapExtent(mapPoint) {
    var extent = map.extent;
    var width = extent.getWidth();
    var height = extent.getHeight();
    var xmin = mapPoint.x - ((2 * width) / 2.8);
    var ymin = mapPoint.y - (height / 4);
    var xmax = xmin + width;
    var ymax = ymin + height;
    return new esri.geometry.Extent(xmin, ymin, xmax, ymax, map.spatialReference);
}

Utils.js line 115 after:

function GetBrowserMapExtent(mapPoint) {
// Added code to Zoom to selected Parcel
    var extent;
    if (map.getLayer(tempParcelLayerId).graphics.length > 0) {
        extent = map.getLayer(tempParcelLayerId).graphics[0].geometry.getExtent().expand(6);
    }
    else {
        extent = map.extent;
    }
    var width = extent.getWidth();
    var height = extent.getHeight();
    var xmin = mapPoint.x - ((2 * width) / 2.8);
    var ymin = mapPoint.y - (height / 4);
    var xmax = xmin + width;
    var ymax = ymin + height;
    return new esri.geometry.Extent(xmin, ymin, xmax, ymax, map.spatialReference);
}


==============================================



All the Best,
David
0 Kudos
MikeTschudi
Esri Alum
Thanks, David--I've added your enhancement to Esri's GitHub site.

Mike
0 Kudos
davidwray
Emerging Contributor
Mike,

i have added 3 operational layers to the TPV (Residential Sales, Commercial Sales and Land Sales).  Only 2 of the operational layers show up in the legend.  can you duplicate this error with the 10.2 version from GITHUB?  I can add a 4th operational layer and 3
of the 4 layers will show up in the legend.  Also, if I only have 2 operational layers in my config.js file both layers need to be
checked in order to perform the identify function.

I have attached the config.js file that I am using for your review.  Is this a bug or am I missing something?

Thanks,
David
0 Kudos
davidwray
Emerging Contributor
Mike,

i have added 3 operational layers to the TPV (Residential Sales, Commercial Sales and Land Sales).  Only 2 of the operational layers show up in the legend.  can you duplicate this error with the 10.2 version from GITHUB?  I can add a 4th operational layer and 3
of the 4 layers will show up in the legend.  Also, if I only have 2 operational layers in my config.js file both layers need to be
checked in order to perform the identify function.

I have attached the config.js file that I am using for your review.  Is this a bug or am I missing something?

Thanks,
David


I tried attaching the config.js file, but it was too large to upload.  Below is the code snippet of the operational layers configuration from the config.js file.  is anyone else experienciong a problem with the operational layers?

    // Layer data is shown in the info window for parcel,sales and foreclosures.
    // Key is used as an layerId while adding this layer to the map and has to be unique
    // Title will set the layer name of the infowindow
    // ServiceUrl is the mapservice URL for the layer
    // isVisible is the boolean parameter to check if the layer is a currently visible or not
    // isDynamicMapService is the boolean parameter to check if the layer is a dynamic map service or not

    Layers: [{
        Key: "parcelSales",
        Title: "Qualified Residential Sales (Past 6 Months)",
        ServiceURL: "http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/LGM/homesales/MapServer/2",
        isVisible: false,
        isDynamicMapService: false,
        Fields: [{
            DisplayText: "Parcel ID:",
            FieldName: "${PARCELID}",
            DataType: "string"
        }, {
            DisplayText: "Site Address:",
            FieldName: "${SITEADDRESS}",
            DataType: "string"
        }, {
            DisplayText: "Structure Type:",
            FieldName: "${RESSTRTYPE}",
            DataType: "string"
        }, {
            DisplayText: "Transaction Date:",
            FieldName: "${TRANSDT}",
            DataType: "string",
            isDate: true
        }, {
            DisplayText: "Grantor:",
            FieldName: "${GRANTOR}",
            DataType: "string"
        }, {
            DisplayText: "Sale Amount:",
            FieldName: "${SALEAMNT}",
            DataType: "double"
        }]
    }, {
        Key: "commercialSale",
        Title: "Qualified Commercial Sales (Past 6 Months)",
        ServiceURL: "http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/LGM/homesales/MapServer/0",
        isVisible: false,
        isDynamicMapService: false,
        Fields: [{
            DisplayText: "Parcel ID:",
            FieldName: "${PARCELID}",
            DataType: "string"
        }, {
            DisplayText: "Site Address:",
            FieldName: "${SITEADDRESS}",
            DataType: "string"
        }, {
            DisplayText: "Structure Type:",
            FieldName: "${RESSTRTYPE}",
            DataType: "string"
        }, {
            DisplayText: "Transaction Date:",
            FieldName: "${TRANSDT}",
            DataType: "string",
            isDate: true
        }, {
            DisplayText: "Grantor:",
            FieldName: "${GRANTOR}",
            DataType: "string"
        }, {
            DisplayText: "Sale Amount:",
            FieldName: "${SALEAMNT}",
            DataType: "double"
        }]
    }, {
        Key: "landSale",
        Title: "Qualified Land Sales (Past 12 Months)",
        ServiceURL: "http://arcgisweb.roanokecountyva.gov/arcgisweb/rest/services/LGM/homesales/MapServer/1",
        isVisible: false,
        isDynamicMapService: false,
        Fields: [{
            DisplayText: "Parcel ID:",
            FieldName: "${PARCELID}",
            DataType: "string"
        }, {
            DisplayText: "Site Address:",
            FieldName: "${SITEADDRESS}",
            DataType: "string"
        }, {
            DisplayText: "Structure Type:",
            FieldName: "${RESSTRTYPE}",
            DataType: "string"
        }, {
            DisplayText: "Transaction Date:",
            FieldName: "${TRANSDT}",
            DataType: "string",
            isDate: true
        }, {
            DisplayText: "Grantor:",
            FieldName: "${GRANTOR}",
            DataType: "string"
        }, {
            DisplayText: "Sale Amount:",
            FieldName: "${SALEAMNT}",
            DataType: "double"
        }]
    }, {
        Key: "taxParcelLayer",
        ServiceURL: "http://arcgisweb.roanokecountyva.gov/ArcGISweb/rest/services/LGM/TaxParcelQuery/MapServer/0",
        OutFields: "PARCELID, SITEADDRESS, OWNERNAME",
        ParcelQuery: "UPPER(PARCELID) LIKE '%${0}%' OR UPPER(SITEADDRESS) LIKE '%${0}%' OR UPPER(OWNERNAME) LIKE '%${0}%'",
        LocateParcelQuery: "PARCELID = '${0}'",
        DisplayFields: ["OWNERNAME", "SITEADDRESS"],
        UseColor: true,
        Color: "#00ff00",
        Alpha: 0.25,
        Fields: [{
            DisplayText: "Tax Parcel ID:",
            FieldName: "${PARCELID}",
            DataType: "string",
            isLink: true,
            href: "Photo.htm?ParcelId=${PARCELID}&SiteAddress=${SITEADDRESS}"
        }, {
            DisplayText: "Owner Name:",
            FieldName: "${OWNERNAME}",
            DataType: "string"
        }, {
            DisplayText: "Neighborhood:",
            FieldName: "${NGHBRHDCD}",
            DataType: "string"
        }, {
            DisplayText: "Deeded Acreage:",
            FieldName: "${Deeded_AC_Char}",
            DataType: "string"
        }, {
            DisplayText: "Estimated Acreage:",
            FieldName: "${CALACREAGE}",
            DataType: "string"
        }, {
            DisplayText: "Legal Description:",
            FieldName: "${PRPRTYDSCRP}",
            DataType: "string"
        }, {
            DisplayText: "Year Built:",
            FieldName: "${YEARBUILT}",
            DataType: "string"
        }, {
            DisplayText: "Structure Type:",
            FieldName: "${RESSTRTYP}",
            DataType: "string"
        }, {
            DisplayText: "Total Fin Sq Ft:",
            FieldName: "${TotalFinSqFt}",
            DataType: "long"
        }, {
            DisplayText: "Land Value:",
            FieldName: "${LNDVALUE}",
            DataType: "double"
        }, {
            DisplayText: "Building Value:",
            FieldName: "${BuildingValue_s_}",
            DataType: "double"
        }, {
            DisplayText: "Total Market Value:",
            FieldName: "${CNTASSDVAL}",
            DataType: "double"
        }, {
            DisplayText: "Trash Service:",
            FieldName: "${TRASH}",
            DataType: "string"
        }, {
            DisplayText: "Bulk Service:",
            FieldName: "${BULK_}",
            DataType: "string"
        }, {
            DisplayText: "Elementary School:",
            FieldName: "${ELEMENTARY}",
            DataType: "string"
        }, {
            DisplayText: "Middle School:",
            FieldName: "${MIDDLE}",
            DataType: "string"
        }, {
            DisplayText: "High School:",
            FieldName: "${HIGH}",
            DataType: "string"
        }, {
            DisplayText: "Site Address:",
            FieldName: "${SITEADDRESS}",
            DataType: "string"
        }, {
            DisplayText: "Tax Map Link:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "http://imsweb.roanokecountyva.gov/GIS/Roanoke2/parcelID_taxmaps/${TAXMAPLINK}.PDF"
        }, {
            DisplayText: "More Property Data:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "http://webpro.roanokecountyva.gov/Landing.asp?ParcelID=${PARCELID}"
        }, {
            DisplayText: "More Zoning Data:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "http://webpro.roanokecountyva.gov/ZoningLanding.asp?ParcelID=${PARCELID}"
        }, {
            DisplayText: "3-D Pictures:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "https://picolsvr.roanokecountyva.gov/efs/login.php?user=public%40pol.com&pass=5f4dcc3b5aa765d61d8327...{LATITUDE}&lon=${LONGITUDE}&v=p&o=s&type=ob&level=n"
        }, {
            DisplayText: "Google StreetView:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "http://maps.google.com/?cbll=${Y_COOR},${X_COOR}&cbp=12,${SV_DEGREE},,0,5&layer=c"
        }, {
            DisplayText: "Tri-View:",
            FieldName: "Click Here",
            DataType: "string",
            isLink: true,
            href: "http://data.dualmaps.com/dualmaps4/map.htm?x=${X_COOR}&y=${Y_COOR}&z=16&gm=0&ve=4&gc=0&bz=1&bd=0&mw=1&sv=1&sva=0&svb=${SV_DEGREE}&svp=0&svz=0&svm=2&svf=0&sve=1"
        }]
    }],

All the Best,
David
0 Kudos
MikeTschudi
Esri Alum
Hi David,

You've found some interesting issues, but I cannot determine the causes yet. 

Missing legend items:  I've narrowed it down to an operational layer claiming to not have a symbol even though the symbol has been clearly transmitted over the network as part of the layer.  In the version of the software that you're using, that missing symbol prevents the layer from appearing in the legend and the symbols from appearing on the map.  Especially odd is that, if I configure the app to have multiple copies of a service, it's possible for one copy to have a symbol and the other to be missing one.

Identify problem:  I can reproduce it easily using your services.

I also see that the latest version of the software does not gracefully handle layer names long enough to wrap onto a second line.

I don't have solutions for you yet, but I wanted to let you know that I've been working on it.  Your configuration has been extremely useful--thank you for supplying it.

Regards,
Mike
0 Kudos
davidwray
Emerging Contributor
Mike,

Thanks for the update.  Also, I am unable to perform the identify function when I have only the first layer in the legend checked.  If I check the 2nd or 3rd layer in the legend the identify functionality is enabled.  Are you able to reproduce this issue?  If so, do you think it is related to the symbology passing thru the service?  Please let me know if I can be of any assistance.

All the Best,
David
0 Kudos
MikeTschudi
Esri Alum
Hi David,

My very-short "Identify problem" stood for a bunch of problems with identify, including the one that you mentioned. 😞

You've been very helpful by pointing out the problem and providing the services--the challenges so far have been to figure out what's happening; the next challenges are to figure out how to solve them!

Thanks,
Mike
0 Kudos
davidwray
Emerging Contributor
Hi Mike,

I thought I would check on the status of the identify issue.  Any updates?

All the Best,
David
0 Kudos
MikeTschudi
Esri Alum
Hi David,

Progress has been stalled due to both technical challenges and time assignments, but I very much want to solve this one.

Regards,
Mike
0 Kudos
JayGeisen
Regular Contributor
David,

I sent you a PM, but not sure you will see it so I'll post here too.

How were you able to add a dynamic service to the application? I've tried everything I can think of, but I can't get anything to display. Would you mind posting your config file, please? Ideally, I'd like to be able to add a dynamic service that doesn't appear in the basemaps list.

Thanks,
Jay
0 Kudos