Select to view content in your preferred language

DBGrid Question

3884
5
Jump to solution
05-28-2015 01:00 PM
ChrisHolmes
Occasional Contributor III

Hello everyone,

I am trying to take the following sample code: DataGrid with zoom button | ArcGIS API for JavaScript

and get it to work with my own feature layer. What's happening though is that the data is being loaded into the grid but the points are not displaying on the map. Nor does the functionality work when you click the zoom icon on one of the rows. I'm quite certain that my proxy is set up and working correctly. Appreciate any help.

Thanks,

Chris

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
thejuskambi
Regular Contributor

The reason you are not see any point(at first), the loading is based on selection. check out the code below, I just used another one of the FeatureServer from the same server, and this works for me heres the code below.

View solution in original post

0 Kudos
5 Replies
thejuskambi
Regular Contributor

Hi Chris,

I am not able to access the service. Is the feature layer correct???

Thejus

0 Kudos
thejuskambi
Regular Contributor

The code you provided worked perfectly for me. Except for 2 things.

1. the Layer you have provided was not accessible to me so, I had to use another one, so different Layer and names.

2. I do not have a proxy setup. So, I had to check the alwaysUseProxy = false. (and this is not something you are worried about)

I main guess would be, some issue with the service itself. Check if you are trying to access a secured service.

0 Kudos
ChrisHolmes
Occasional Contributor III

Hi, thank you for your feedback.

What I find if I change always use proxy to false, then when the page loads it asks me to log into arcgis. I log in and then the attribute data loads into the dbgrid but no points display on the map. If I set always use proxy to true then the data will load without requiring me to log in (as I assume the proxy handles that).

Where I’m getting lost is that it loads data into the grid but not the points onto the map.

The service is secured. Maybe should I has my IT group to share the service publicly then I can test it that way and see if the page loads the same way as I’m seeing it now?

Thanks again

0 Kudos
thejuskambi
Regular Contributor

The reason you are not see any point(at first), the loading is based on selection. check out the code below, I just used another one of the FeatureServer from the same server, and this works for me heres the code below.

0 Kudos
ChrisHolmes
Occasional Contributor III

Thanks for your help. Reviewing the code you posted helped me notice that since the data I'm using is point data, I needed to change the selection symbol to be a SimpleMarkerSymbol (duh).

Cheers, your help is much appreciated!

Chris

0 Kudos