Select to view content in your preferred language

Get feature template used for a specific feature

942
2
Jump to solution
08-10-2012 07:25 PM
JeffGiesler
Deactivated User
Hi everyone,I am trying to get the specific feature template for a feature selected through a popup.  Specifically what I am trying to do is after I use the cut geometry function I want each resulting feature to have the the same symbology as the original feature.  If anyone has a good way to do this I would be eternally greatful.  Cheers,Jeff
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
You can get the symbol of popup's graphic and set it to result features of cut. If graphic does not have symbol then you can get the symbol from renderer like this...

AGSSymbol *symbol = [graphic.layer.renderer symbolForGraphic:graphic timeExtent:nil];
NSLog(@"symbol: %@",[symbol encodeToJSON]);

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
2 Replies
NimeshJarecha
Esri Regular Contributor
You can get the symbol of popup's graphic and set it to result features of cut. If graphic does not have symbol then you can get the symbol from renderer like this...

AGSSymbol *symbol = [graphic.layer.renderer symbolForGraphic:graphic timeExtent:nil];
NSLog(@"symbol: %@",[symbol encodeToJSON]);

Hope this helps!

Regards,
Nimesh
0 Kudos
JeffGiesler
Deactivated User
Nimesh,
Thanks for pointing me in the right direction again.  Creating a graphic from the sketch solved my problem and helped with others as well.
Cheers,
Jeff
0 Kudos