How do you access point display logic?

621
3
11-10-2020 07:07 AM
OrrinThomas
New Contributor

I would like to find access through the Android SDK to the logic that determines how symbols are drawn.  I imagine this would take the form of a Map<Object, Symbol> and the related Field.  I know the symbol can be a function of multiple fields so it may be more complex.

Tags (2)
0 Kudos
3 Replies
MarkBaird
Esri Regular Contributor

Orrin,

Can you explain what your app is needing to do?  From your description it sounds like you want to draw some dots on a map.  Where do you intend the data for these dots to come from?

There are lots of ways of doing this depending on your workflow.  Are you for example collecting data and do you want to store it somewhere?

We've got solutions but I need to know a little more about what you are trying to achieve.

If you are literally wanting to draw your own dots on a map and you are going to control the location of these through your own app logic, then Graphics Overlays may be a good solution.  There are good documents about these:

Add graphics overlays to your app—ArcGIS Runtime SDK for Android | ArcGIS for Developers 

Add graphics and text to graphics overlays—ArcGIS Runtime SDK for Android | ArcGIS for Developers 

And if you wanted to see a working app doing something similar there are plenty of samples in a git repository.   This one shows the use of graphics overlays:

arcgis-runtime-samples-android/java/add-graphics-with-symbols at master · Esri/arcgis-runtime-sample... 

The sample above is a Java sample, but the same sample exists for Kotlin too.

Does this help?  If this doesn't achieve what you want, then can you explain exactly what you need?

Mark

0 Kudos
OrrinThomas
New Contributor

Thank you getting back to me. We are drawing dots using a graphics overlay. The dots are augmented reality in a drone real-time video feed. We hoped to move beyond simple dots by mimicking how the features are drawn in the ESRI maps (Our AR app allows users to create, edit, and sync their geodatabases). If the ESRI apk does doesn't provide a way to mimic their feature graphics, at a minimum we wanted to draw point features distinctly if ESRI would have drawn them distinctly. For example, if features with attribute "condition" that has the domain of {new, good, average, bad} is drawn four different ways according to those values we at least wanted to draw it four different ways.

0 Kudos
MarkBaird
Esri Regular Contributor

I'm not completely sure I've understood your question yet.  I'm wondering if a renderer is what you are after.  You can apply something called a UniqueValueRender to your graphic overlay which would draw different symbols according to the value of an attribute in your graphics.  

This is explained in this topic here:

Symbolize data—ArcGIS Runtime SDK for Android | ArcGIS for Developers 

Although its not using a graphics overlay there is a sample showing a basic unique value renderer in action :

arcgis-runtime-samples-android/java/unique-value-renderer at master · Esri/arcgis-runtime-samples-an... 

The rendering pipeline for graphics and features is the same essentially.

Also as you are writing an AR app (Scene View), you've got lots more options for the style of the symbols available to you.  The document above has a section on 3D symbols which have lots of possibilities.

Is this getting closer to helping?

Mark

0 Kudos