Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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?

share|improve this answer
    
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. –  AlexGilvarry Mar 4 '13 at 20:32
    
please see my edit re: decimal places –  user3461 Mar 4 '13 at 20:35
    
Yeah, I tried that previous to posting this question, did again just in case, still nothing. –  AlexGilvarry Mar 4 '13 at 20:38

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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