How do I change symbology ??

7202
10
Jump to solution
02-25-2015 02:59 AM
HassanShatnawi
New Contributor

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 ...

Tero Rönkkö

0 Kudos
1 Solution

Accepted Solutions
TeroRönkkö
Occasional Contributor

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);

View solution in original post

0 Kudos
10 Replies
TeroRönkkö
Occasional Contributor

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);

0 Kudos
HassanShatnawi
New Contributor

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 ??

0 Kudos
TeroRönkkö
Occasional Contributor

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.

0 Kudos
HassanShatnawi
New Contributor

Thanks Tero Rönkkö‌ but this will update the point to be a circle how do I change it by special symbol ???

0 Kudos
TeroRönkkö
Occasional Contributor

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.

0 Kudos
HassanShatnawi
New Contributor

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);

0 Kudos
TeroRönkkö
Occasional Contributor

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)

0 Kudos
HassanShatnawi
New Contributor

but you didn't use "g" object so why I should create it ???
and how do I change if I have FeatureLayer ???

0 Kudos
TeroRönkkö
Occasional Contributor

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.