Hello
How do I change the symbology
I've an points that represent building these symbol may green or red after finished building scan
so how do I achieve that ???
Thanks in advance ...
Solved! Go to Solution.
Is it Graphics layer?
Get the id of the symbol you want to change and:
SimpleMarkerSymbol newMarker = new SimpleMarkerSymbol(Color.BLUE, 20, SimpleMarkerSymbol.STYLE.CIRCLE);
Graphic g = mGlObservation.getGraphic(i);
mGlObservation.updateGraphic(i, newMarker);
Is it Graphics layer?
Get the id of the symbol you want to change and:
SimpleMarkerSymbol newMarker = new SimpleMarkerSymbol(Color.BLUE, 20, SimpleMarkerSymbol.STYLE.CIRCLE);
Graphic g = mGlObservation.getGraphic(i);
mGlObservation.updateGraphic(i, newMarker);
no it is an FeatureLayer
Get the id of the symbol you want to change and:
the id is that point id or id for symbol ???
if it is for symbol not point how do I get the symbols and ID's
Graphic g = mGlObservation.getGraphic(i);
mGlObservation.updateGraphic(i, newMarker);
what is the mGlObservation ??
It is the id of the point - and mGLObservation was something I forgot to mention, it is the name of the Graphicslayer.
That example changes symbol of single item.
Thanks Tero Rönkkö but this will update the point to be a circle how do I change it by special symbol ???
use PictureMarkerSymbol
I haven't got acvtual use for that myself so I don't know - there is working sample of it in the samples so lok there if you can't make it work.
Or you could use simple marker with dirrent shape symbol if you like symbols.
Tero Rönkkö what should I do if I have FeatureLayer not GraphicLayer ????
and what is the purpose of this statement
Graphic g = mGlObservation.getGraphic(i);
The purpose is to get the single graphics object from the graphics layer. For featurelayer it is something like:
Feature f = yourfeaturelayer.getFeature(i) (I suppose)
but you didn't use "g" object so why I should create it ???
and how do I change if I have FeatureLayer ???
Good point! There is actually no need for that. I copy pasted the example from my own code and I alsop change some of the attributes. Sorry for misguiding you.