How do I combine TextSymbol and a picture marker symbol in ArcGIS for javascript API

1.3k views Asked by At

I have searched so many blogs and also ArcGIS API for JavaScript but i didn't found anything that can solve my problem. How to combine Text Symbol with Picture Marker Symbol.? Is there any way to combine this?

This is what i want to do

What you are looking into above picture is my requirement.

1

There are 1 answers

2
Vikash Pandey On BEST ANSWER

Well, As I can understand your query you want to apply a symbol which will have a picture marker symbol and a text number (runtime generated number).

Well this is impossible to combine two symbols.

However there is a work around to achieve similar look & feel.

Approach -

Below are the steps to achieve this-

  1. Create a feature layer and add a renderer which will have all vehicle symbol.
  2. Add above layer to the map and on update End (find suitable event) add another symbol layer.
  3. To create a text symbol layer first create a graphics layer and add text symbol on each location of feature layer.

It will look same as you have mentioned in picture.

Hoping this will help you :)