Locate Address Sample 99% done... just the last step.. help please

735
3
09-06-2012 10:35 PM
AlexCrothers
New Contributor III
Hi All,

I have the addin working with our locator in an existing application created by the builder up to a point.

IE. The JSON is being returned and red graphics are being added to the map without
panning to the location or clearing previous results. I assume that there is code in the sample
viewer that needs to be added to my existing viewer since the addin side seems to be functioning.

In my DEV environment I have the sample working properly and completely.

I can deploy this DEV version but it does not show in the Builder. Is there a way I can add it?

Otherwise what are the steps to edit the application created in Builder to include this viewer functionality
to compliment the working Addin functionality?

Regards,
Richard
0 Kudos
3 Replies
AlexCrothers
New Contributor III
Ok, more info.

The sample works properly using the ASP.NET Development Server.

But once deployed the functionality for clearing previous graphics and zooming to graphics is lost...
IE the non-local assemblies referenced below don't seem to fire. Can anybody tell me why this is occuring?

                            <local:AddLayerAction TargetObject="{Binding Map}" 
                                                Layer="{StaticResource ResultsLayer}" />
                            <local:CandidatesToGraphicsAction MatchCandidates="{Binding MatchCandidates}"
                                                              MatchGraphics="{Binding MatchGraphics, Mode=TwoWay}" />
                            <esri:ClearGraphicsAction GraphicsLayerID="MatchCandidatesLayer" 
                                                      TargetObject="{Binding Map}" />
                            <local:AddGraphicsAction TargetObject="{StaticResource ResultsLayer}"
                                                     Graphics="{Binding MatchGraphics}" />
                            <esri:ZoomToLayerAction LayerID="MatchCandidatesLayer" TargetObject="{Binding Map}" />
0 Kudos
KatherineDalton
Esri Regular Contributor
Hi Richard,

Can you verify that the GraphicsLayer that is being created has a LayerID of "MatchCandidatesLayer"? There shouldn't be any problem calling the ClearGraphicsAction and ZoomToLayerAction unless maybe it can't find the layer?

Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™
0 Kudos
AlexCrothers
New Contributor III
Thanks Katy,

Turns out setting the ESRI.ArcGIS.Client, ESRI.ArcGIS.Client.Behaviours and ESRI.ArcGIS.Client.Extensibility to
copy local = True solved the problem.

Not sure why the assemblies had to be copied locally as they seemed to be in the xap already?

Regards,
Richard
0 Kudos