English

How To: Place text on a map

Summary

Instructions provided are for placing text on a map using the MarkerDesc object with a label parameter and without an iconDataSource parameter.

Procedure

By leaving the iconDataSource parameter value null, a text-only label is placed on the map.

Note:
Parameter names are slightly different in v2.

Follow the steps below to create a MarkerDesc object with defined values for label and location parameters.

  1. Create a MarkerDesc object.
  2. Set the value of the label parameter with the text wanted on the map. For example, "My coffee shop".
  3. Set the value of the location parameter with the coordinates of where the text should appear.
  4. Do not set the value of the iconDataSource parameter (leave it null). This places the text on the map without an accompanying icon.
  5. Assign the MarkerDesc object to a MapImageOptions object.
  6. Create a LabelDesc object if customizing text.