Is it possible to only hide or display individual graphics in Feature Layer and Graphic Layer?

408
3
03-15-2019 01:45 AM
Bai_ShiWang
New Contributor

There is a requirement from customer that displaying different security channels on map depend on different people log into system.

I make a feature layer to display channels, but in the case, it is impossible that all user operate the same feature layer at the same time.

So,  I need a solution about that case!

The functions from feature layer include updating channels info, add channel on map, highlight channel feature, measure distance between two channels..........

0 Kudos
3 Replies
EvelynHernandez
Occasional Contributor III

Use a logic behind ur data to thisplay channels only with user permissions. So in that way u put a field with the username and then u make a query filtering what channels the username needs to see.

Something like that.

0 Kudos
Bai_ShiWang
New Contributor

Firstly, many thanks for your reply! 

1. I can get all security channels that belong to users currently logged into system.....

2. I can make a Layer including all channels and get individaul channels by queryFeatures() method......and then highlight them......I have tried that method.....but, I want to only display those channels belong to user and hide other channels. Is there any way to do that?

3.   let's do it by the other way.   as we known,  we can do some operation on Feature Layer, such as updating, deleting, adding.........and next,  we query some channels belong to user by Feature Layer and draw them into Graphic Layer....If we do this,  it is sure to display individual channels,, but  we can't do these operation on Graphic Layer, like hightlight() and get form by FeatureForm()?

0 Kudos
EvelynHernandez
Occasional Contributor III

Yea, thats why you need some parameter in the service to filter what channels belongs to its user. With that u can use some definitionExpression to filter them in some way. But again u need to try te logic behind that.

Any add, modify, delete u need to do it is only over feature layer service. 

0 Kudos