Adding Longitude/Latitude-Based Items to a Map

If you have data that needs to be plotted at specific latitude-longitude points, add the data items to the map using ITXML or PCScript. For this to work, first be sure the map was derived from latitude/longitude-based data. Maps not derived from latitude/longitude source files cannot correctly locate latitude/longitude data items.

Most Corda-supplied maps are based on latitude/longitude information. To determine if this is the case for a given map, use the following procedure:

To find out if a map supports latitude-longitude data items

  1. Open the .itxml file in a text editor.

  2. Look in the <Coords> tag near the top of the file.

  3. Set the Source attribute to LatLong when plotting lat/long points on the map.

This section includes the following topics:

Adding a Data Item

To add a data item, specify it's longitude and latitude. For acceptable formats for latitude and longitude, see Acceptable Formats for Coordinates below.

Add a data item using either ITXML or PCScript.

ITXML

To add a data item using ITXML, add a new map-point object. More information about this object is available in the Corda® 7 Object Reference in Corda Builder™.

PCScript

Add a data item in PCScript with the map.addPoint method.

Adding a Line Between Data Items

To dynamically add a line between two latitude/longitude coordinate pairs, use the PCScript map.addLine method.

Acceptable Formats for Coordinates

Specify latitude/longitude coordinates in one of two formats: decimal or degree/minute/second. For example, all the following coordinate specifications are valid: