3

I'm attempting to query a parcel layer and display the information in a popup infoWindow when I click on a parcel, and I'm having some issues dealing with different datatypes.

var content = "<b>Address</b>: ${ADDR}" + "<br /><b>Owner Name</b>: ${OWNER}" + "<br /><b>Parcel ID</b>: ${APN}" + "<br /><b>City</b>: ${CITY}" + "<br /><b>Acres</b>: ${TOTAL_ACRES:NumberFormat}" + " <br /><a href='${COUNTY_LIN}'>County Assessor Site</a>"   
var popUpTemplate = new esri.InfoTemplate("Parcel", content);

The ADDR, OWNER, APN and CITY datatypes are all string so they appear in the infoWindow without issue, but I'm having trouble getting TOTAL_ACRES and COUNTY_LIN to appear.

TOTAL_ACRES is a double, and i thought that using the dojo.number.format method as outlined on the esri website would help, but it doesn't seem to do anything.

COUNTY_LIN is a url, and has a data type of text, but it isn't appearing and I'm not exactly sure why. I've included screenschot of the relevant data info from inside ArcGIS, hopefully they are helpful. Any help is appreciated! I'm new at this and very stuck as to what I'm doing wrong.

APN TOTAL_ACRES COUNTYLINK

0

2 Answers 2

1

For acres, do you have dojo.number.format loaded? Per the link you provided, it is done by specifying dojo.require("dojo.number").

Since acres is a decimal value, you may have to specify the number of decimal places to include by TOTAL_ACRES:NumberFormat(places:2).

For the link, it appears that you're missing a "K" in the field name. Shouldn't it be COUNTY_LINK instead of COUNTY_LIN?

3
  • Ah! I don't know how I missed that type for the County link. Now that one is working. I do have dojo.require("dojo.number") at the top of my script along with the rest of the dojo.require statements I'm using for this map, but I'm still unable to see the parcel acres. Commented Mar 4, 2013 at 20:32
  • please see my edit re: decimal places
    – user3461
    Commented Mar 4, 2013 at 20:35
  • Yeah, I tried that previous to posting this question, did again just in case, still nothing. Commented Mar 4, 2013 at 20:38
0

Try dojo.number.format(${TOTAL_ACRES}, {places:2}).toString() in your code and see if that helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.