Problem adapting Tax Parcel Viewer to my services

642
3
05-04-2012 01:26 PM
LeeBrannon
New Contributor III
I am adapting the Tax Parcel Viewer from the link below to my map services.  The basics are working fine, but the problem appears to be with the InfoWindow. 

Tax Parcel Viewer

The problem is that when I click on a record in the Search (FindTask) results table, the target feature is highlighted on the map (which is good) but the app does not zoom to the feature or show the InfoWindow for that feature as it is supposed to.  All this works perfectly fine though if I just click directly on a feature on the map.  The problem only occurs when selecting a record in the Search results table.  Furthermore, it will work fine from the Search results table if I 'hard code' in the InfoWindow Title text, as opposed to what I want which is to pass in a variable attribute value from the Graphics object.

When using Firebug to debug, the app code halts at line 183 - the map.infoWindow.setTitle statement.  So something about the infoWindow or infoTemplate, plus the passing of a variable, is not working properly with the results table click event.

Any insight would be welcomed. Thanks much.
Lee

Code attached as Zip files - one Zip has the Index.html and the other Zip has the Common.js and Config.js.
0 Kudos
3 Replies
danbecker
Occasional Contributor III
it's hard to say for sure what the problem is, but it looks like something's wrong with your config.js fields & aliases objects.

Browse to the rest endpoint of this feature layer: MontroseCOfeatures/MapServer/10 and have a look at what the actual field names & aliases, then directly copy/paste these into the fields & aliases objects in config.js

I know that a dojox.grid.datagrid store requires that keyField,  also defined in config.js be a field with unique values




I am adapting the Tax Parcel Viewer from the link below to my map services.  The basics are working fine, but the problem appears to be with the InfoWindow. 

Tax Parcel Viewer

The problem is that when I click on a record in the Search (FindTask) results table, the target feature is highlighted on the map (which is good) but the app does not zoom to the feature or show the InfoWindow for that feature as it is supposed to.  All this works perfectly fine though if I just click directly on a feature on the map.  The problem only occurs when selecting a record in the Search results table.  Furthermore, it will work fine from the Search results table if I 'hard code' in the InfoWindow Title text, as opposed to what I want which is to pass in a variable attribute value from the Graphics object.

When using Firebug to debug, the app code halts at line 183 - the map.infoWindow.setTitle statement.  So something about the infoWindow or infoTemplate, plus the passing of a variable, is not working properly with the results table click event.

Any insight would be welcomed. Thanks much.
Lee

Code attached as Zip files - one Zip has the Index.html and the other Zip has the Common.js and Config.js.
0 Kudos
by Anonymous User
Not applicable
Original User: lbrannon

Thanks for the suggestion dbecker88.  My field names in Config are good, but my key field does not have all unique values...I should have realized that before, so maybe that is the problem.  Anyway, I hope to have a test environment setup soon and some results on this posted before too long.

Thanks,
Lee
0 Kudos
LeeBrannon
New Contributor III
In response to Dan's suggestion about making sure the dojox.grid.datagrid store keyField contains unique values, I setup a new map service for my Parcel Viewer application in which the parcel id's are all unique.  I performed the test and checked the Search tool for proper functionality, but no luck.  The problem is still there (explained in original post above).  Troubleshooting continues.

Further suggestions are welcomed. 

Lee
0 Kudos