Select to view content in your preferred language

Feature layer publish, Display in WPF app

4293
30
06-13-2010 10:55 PM
xariaD
by
Occasional Contributor
We have a feature layer, which we intend to publish using ArcGIS Server.
We have a WPF application which displays maps. This feature layer is to be overlayed upon the map.
The feature layers represents certain units installed at particular locations. We have the co-ordinates of these units.

The units have different state eg Enabled/disabled. We wish to represent the enabled units with different icon and disabled with different icon. Obviously the state is obtained dynamically. How to achieve this?
Also, Upon clicking these units on the map some function should be performed.
How do we determine which unit has been clicked?
0 Kudos
30 Replies
DominiqueBroux
Esri Frequent Contributor
Strange. I haven't a clue.

The only way I know to change the orientation of a dynamic layer is to change the rotation of the map.
I guess you didn't do that?

Do you get the same result by using a dynamiclayer coming from arcgisonline instead of your own server?
0 Kudos
xariaD
by
Occasional Contributor
I did rotate the map.
When I use our ArcGIs server, and create web application, the feature layer displays fine.

I have not used arcgisonline , I'll give it a try.
What else should I be looking at?
0 Kudos
xariaD
by
Occasional Contributor

Do you get the same result by using a dynamiclayer coming from arcgisonline instead of your own server?


I cannot use arcgisonline, we are hosting the map internally

I rotated the map again to 0degreee and the layer displays vertically, which it should then I rotated the map to 270 degree and the north was to the right, but still the layer displayed the same, vertically

😞
0 Kudos
xariaD
by
Occasional Contributor
The following is the code snippet from the web app
sri:MapResourceManager ID="MapResourceManager1" runat="server" style="position: absolute; left: 344px; top: 130px; z-index: 1503;" OnResourceInit="ResourceManager_ResourceInit">            
       
<ResourceItems>
<esri:MapResourceItem DisplaySettings="visible=True:transparency=0:mime=True:imgFormat=PNG8:height=350:width=600:dpi=96:color=-16710905:transbg=True:displayInToc=True:dynamicTiling=False" LayerDefinitions="" Definition="&lt;Definition DataSourceDefinition=&quot;10.1.3.127&quot; DataSourceType=&quot;ArcGIS Server Local&quot; Identity=&quot;&quot; ResourceDefinition=&quot;(default)@BaseMap1&quot; /&gt;" Name="BaseMap1" />

<esri:MapResourceItem DisplaySettings="visible=True:transparency=0:mime=True:imgFormat=PNG8:height=350:width=600:dpi=96:color=:transbg=False:displayInToc=True:dynamicTiling=False" LayerDefinitions="" Definition="&lt;Definition DataSourceDefinition=&quot;10.1.3.127&quot; DataSourceType=&quot;ArcGIS Server Local&quot; Identity=&quot;&quot; ResourceDefinition=&quot;(default)@FeatureLayer1&quot; /&gt;" Name="FeatureLayer1" />
</ResourceItems>
</esri:MapResourceManager>


The web application displays the feature layer data correctly, but WPF displays it vertically no matter the rotation of the Map.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Are you rotating the map on the client or in the service? WebADF and WPF are two very different beasts, and uses two very different ways of talking to the map services, so the way you do it in one API could be very different from another.
0 Kudos
xariaD
by
Occasional Contributor
I rotated the map in arcMap, before publishing.
0 Kudos
dotMorten_esri
Esri Notable Contributor
You need to rotate the map in the Silverlight application, not in ArcMap.
<esri:Map Rotation="90" />
0 Kudos
xariaD
by
Occasional Contributor
You need to rotate the map in the Silverlight application, not in ArcMap.
<esri:Map Rotation="90" />


Even rotating the map in WPF application rather than in ArcMap does not help. It is the same.
0 Kudos
xariaD
by
Occasional Contributor
Now I have tried everything I could. This just can not be happening. How is it that feature layer is displayed the way it is.

I converted the polygon to point yet the same issue. The layer displays perfectly in a web app and displays vertically in WPF/Silverlight App.
Rotation of Map does not effect alignment in WPF. Whether I rotate the map in ArcMap or not.
How can it be that the same layer is displayed in web application without issues and WPF cannot.
This seriously makes me think that the issue lies with the API.

Is there any solution to this?
0 Kudos
dotMorten_esri
Esri Notable Contributor
I just noticed that your layer doesn't have a valid spatial reference. This is a requirement to blend with other layers.

Also just because it works in ArcMap doesn't mean it works the same way in the Client APIs. As I mentioned these are two very different beasts, and they talk to the server in different ways. ArcMap uses either local DCOM or SOAP to talk to the server, whereas the client API's uses a much simpler REST interface, the latter which ignores any rotation you have in the service (thus you wont see any rotation in the client api's when you set it in the map document). As mentioned, using the rotation property of the map control in the client api allows you to rotate the map on the fly.
0 Kudos