Click or drag to resize

ShieldMap Objects

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release

ShieldMap objects are used to map a street to a Shield object, or another ShieldMap based on the street name and location.

Shield objects and ShieldMap objects may be used interchangeably.

Nesting ShieldMap objects allow multiple predicates to be tested in order to determine which shield (if any) to use.

ShieldMap objects are typically used in Street Render Blocks, to mark a highway or freeway with an appropriate shield.

Syntax
cam
SHIELDMAP<shieldMapEntry1[, ..., shieldMapEntryN]>
Example

Often you would create a number of Shields or ShieldMap objects. For example:

cam
!mexicoShield = Shield<num_only, !whiteText, icon<mexico_hwy>>

Then you would use a ShieldMap object to map each shield to a particular street type, or country. For example:

cam
!shields = SHIELDMAP<
  [ COUNTRY "USA", !usShield ],
  [ COUNTRY "Canada", !canadaShield ],
  [ COUNTRY "Mexico", !mexicoShield ]
>

Alternatively, more complex ShieldMap objects may be constructed, as in the example below:

cam
SHIELDMAP<
  [ STARTS_WITH "I-", SHIELDMAP<
    [ LENGTH < 3, SHIELD<NUM_ONLY,!whiteText,ICON<us_interstate>> ],
    [ DEFAULT, SHIELD<NUM_ONLY,!whiteTextWee,ICON<us_interstate>> ]
  > ],
  [ STARTS_WITH "US-", SHIELD<NUM_ONLY, !blackText,ICON<us_hwy>> ],
  [ STARTS_WITH "..-", SHIELD< NUM_ONLY, !blackText, BOX<PEN<!black,1>, BRUSH<!white>,20,8>>],
  [ RAMP, Shield<NUM_WORD, !whiteText, BOX<PEN<!white,1.6>, BRUSH<!white>,20,12>>] ]
>
Parameters

ShieldMapEntry

A ShieldMap consists of one or more ShieldMapEntries.

ShieldMapEntry

Syntax

cam
[predicate, object]

Example

See ShieldMap, above.

Parameters

predicate

A string specifying a conditional function. The available predicates are:

CONTAINS <string>

True if the street name contains the given string.

CONTAINS "Road" // only for streets with "Road" in their name

COUNTRY <country>

True if the street is located in the given country.

COUNTRY "USA" // only true in the US

COUNTRY "France" // only true in France

LENGTH [ < | > | <= | >= | == | != ] <value>

True if the length of the street name has the specified relationship with value.

LENGTH > 5 // only true for street names with more than 5 characters

STARTS_WITH <string>

True for streets with names beginning with string.

STARTS_WITH "I-" // only true for interstates

ENDS_IN <string>

True for streets with names ending with string.

ENDS_IN "FED" // true for Mexican federal highways

MATCHES <string>

True for streets matching the regex string.

MATCHES "[A-Za-z]{2}\-[0-9]+" // only true for US State Highways

DEFAULT <shield>

This will evaluate to true only when all other predicates evaluate to false.

DEFAULT Shield<num_only, !whiteText, icon<canada_hwy>> // this Shield will be used in the absence of any others being available

RAMP <shield>

This will evaluate to true when the street is a highway ramp.

[ RAMP, !rampShield] // this Shield will be used to mark ramps

object

Either a Shield or ShieldMap object.