Select to view content in your preferred language

FeatureLayer symbol rotation question

3603
6
03-10-2011 11:25 AM
CraigGallant
Deactivated User
I am using a point featureLayer on my map that has symbols matched to a style and rotated on a field. I can see all the symbols just fine on my map but they are not rotated like they were in ArcMap. Does the FeatureLayer not support the rotation on the Rest service? I really dont want to create images of all my fonts in my style to create a unique value renderer.

Thanks,
Craig
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
Can you share your symbol here? Check Angle property.

For example the following: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/M...

"symbol" :  

"type" : "esriPMS",  
"url" : "3E661CE7",  
"imageData" : "iVBORw0KGgoAAAANSUhEUgAAABcAAAAQCAYAAAD9L+QYAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAANpJREFUOI210r0NgzAQBeB3FlOk5iSGCRIb0GUDpsgGKSKxARKZgY4eYeqscSmQwYD5MUleZeuk7+TzBfhjAgAQkRuA+CwSRRGaphnuIvJQSpUGvxDR1QdkZnRJ3l/i57xcA+jxU6iBN+KFU1YdQr1xyqrNOjNDa+2P78EA0CX5osEufgQGgLBIAfQvaNvWjdvd12ADTcZwH88issTt9ZrDYZGO2H0627VMcBc8oAdBJ87MXmvmhXcO2P6k+Zp54ZOZmpwYhQuvtdavryQrRPQecKVUCaD8FW7yAdk6WIJ8dhZ/AAAAAElFTkSuQmCC",  
"contentType" : "image/png",  
"color" : null,  
"width" : 17,  
"height" : 12,  
   "angle" : 0,
"xoffset" : 0,  
"yoffset" : 0 


0 Kudos
CraigGallant
Deactivated User
I copy this from my FeatureLayer.

{
          "value" : "R1-1",
          "label" : "R1-1",
          "description" : "",
          "symbol" :
          {
            "type" : "esriPMS",
            "url" : "D94E722A",
            "imageData" : "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAABSZJREFUWIXt2GtQlFUcx/HveZb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3vJmjUol5umi7/hPnu+a4CG2Gh6vTWFmys/QZZXYN23H9PcOffcPy7vQdEPMqGPjKT5LhxAw66cFuAuAUpHI71HjcJVU0v1t98RHj+S5lu37rl/PJaruBsaCI2Pp8ewJ2kqKwsI0yGg+8JFynNy6PvqK/Sb+Bpuh4Nr69e3Wm89dpz+b06+fQ+u/fT+AwEqFi+jauP3GIYOwVn8C7LCCkDD5q2cPXQYWV7hq72ZlkHdwTxkXT3NhcUA2Lfv5Gz+sYAfb7vAkDcmYt+yHQDPFQuNVywtC9yeFrg7aTpw0K86gJD4+I4BlVJro9JS51uUwr51R5uDdDRh7yYzIHlaMdDqT6VWgZqmpUopVdSCtFSLVNi37+xa3IxpmFJmF2l6/QtCiPqAgV5kmpRSRqWnLShREseO3V2Em4opZXahptcntIVrF+hFpksp1eCM9PQSpXDszO4cbvpUTCkppzSDIUEI0e6p8esUa5qWIaWUgxdmLCxRCseunA7i3sGUMttvnN9AL3KRlFINXpixqAQCRoYlv40pJaVAMxoThBAN/vYL6H+xpmmLvSv5YYlSOHbn+tUvdOoUBs6Zc1IzGscGggsY6EUukVKqoZnmJWSa/e2WD7wkhLAHOl+Hvs1omrYUWNqRvoHmwfy69W/mIbCzeQjsbP4CD1NBYhK6YDwAAAAASUVORK5CYII=",
            "contentType" : "image/png",
            "color" : null,
            "width" : 30,
            "height" : 30,
            "angle" : 0,
            "xoffset" : 0,
            "yoffset" : 0
          }
        },


I also opened the original MXD document and the symbols are rotate plus I attached the service layer to ArcMap and the symbols show up rotated there too.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I don't think that the arcmap renderers with the rotation attached to a field are taken into account by the SL API (nor by the REST API).

If you create your own symbols, you can bind an attribute to the rotation but I don't see how to do that with the automatically generated symbols.

Perhaps by creating a wrapper symbol managing the rotation and encapsulating another symbol. But not sure, this can work...
If nobody has better idea, I'll test a wrapper symbol...
0 Kudos
JenniferNery
Esri Regular Contributor
The symbol's angle property is not set on the service, this is why it was rendered without the rotation. You might need to check how you defined your symbology: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Authoring_fea...

If you need to change symbol rotation on your application, you can look at this related thread: http://forums.arcgis.com/threads/4461-Symbol-rotation-change-by-attribute-update

UPDATE:
You must have used Advanced section in ArcMap to set the rotation of the symbol based on a field value. I checked with the server team and they currently do not support this. If you need this feature enhancement, you can make a request to their forum: http://forums.arcgis.com/forums/11-ArcGIS-Server-REST-API
0 Kudos
CraigGallant
Deactivated User
Thank you Jennifer that is exactly how i set my symbol rotation. I'm sorry to hear its not supported because i use it alot, but thanks for looking into it for me.

Craig
0 Kudos
JennyTrevisan
Deactivated User
I have the same problem, not with the silverlight API, but with the Javascript API.
But it seems that using a DynamicLayer instead of a FeatureLayer for the symbolization solve the problem. The DynamicLayer manage the rotation and also the proportional size of a symbol from a specific field.
What I did is to superimpose a featureLayer (to allow the selection operations) and a dynamicLayer (for the symbolization). It's a bit heavy-handed, but it works...
Jenny
0 Kudos