Map Config

Map Style

Map style config is used to apply custom map styles on a user, company, and team level.

Map Style Config

Order of Preference

Map styles can be defined on the user, company, and team level.

  1. Team
  2. Company
  3. User
  4. System

A high order of preference will override lower order of preferences. For example, a team style will override a user style definition.

Definition

Element Type

The properties of the config object represent the element type in which the styles are applied. This will be an array of style definitions

The style definitions at the top of a list will have highest preference!

Style Definition

  • item: which type of items to apply this style to. project or asset
  • name: a user friendly name for a description of this style
  • selector: used to determine which items to apply this style
  • style: definition of style to apply

Selector

The process to select a specific style to apply is as follows

  • Discard if active: false
  • Discard if name: <name> and name is not included in element name
  • Keep if drawing: true and it is a drawing element
  • Attempt to grab item: project || asset, discard if doesnt exist
  • Discard if bindPath: <bp> and bp is not bind path of element
  • Keep if none of the following selectors exists, get, or value
  • Return check for undefined of exists parameter path
  • Get value of get path and return check for equality with value

Examples

Color polygons of rated parcels

polygon:
  - item: asset
    name: Highest Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 3
    style:
      fillColor: '#d2e5b8'
      fillOpacity: 0.3
      strokeColor: '#9fc866'
      strokeOpacity: 0.95
      strokeWeight: 3
  - item: asset
    name: Middle Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 2
    style:
      fillColor: '#f7d1aa'
      fillOpacity: 0.3
      strokeColor: '#ee9b48'
      strokeOpacity: 0.95
      strokeWeight: 3
  - item: asset
    name: Lowest Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 1
    style:
      fillColor: '#e4b1b3'
      fillOpacity: 0.3
      strokeColor: '#c5575b'
      strokeOpacity: 0.95
      strokeWeight: 3

Color project search radius and completed projects differently

polygon:
  - item: project
    name: Dark red for sub search
    selector:
      bindPath: step.subs.parameter.search
    style:
      fillColor: red
      fillOpacity: 0.1
      strokeColor: red
      strokeOpacity: 0.5
      strokeWeight: 2
  - item: project
    name: Is completed
    selector:
      bindPath: step.subs.parameter.search
      get: step.start.parameter.project.completed
      value: true
    style:
      fillColor: red
      fillOpacity: 0.05
      strokeColor: blue
      strokeOpacity: 1
      strokeWeight: 5
polyline:
  - item: project
    name: Is completed
    selector:
      get: step.start.parameter.project.completed
      value: true
    style:
      strokeColor: red
      strokeWeight: 5
  - item: asset
    name: User Loaded Lines
    selector:
      bindPath: parameter.location
      get: meta.loadGroup
      value: UserLine
    style:
      strokeColor: blue

Enhanced power flow data

  • Use a different marker for power flow data set
  • User a different color for transmission lines
  • Change transmission line color based on capacity
marker:
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: meta.source
      value: EV
    style:
      url: >-
        https://static.andersonopt.io/map-icons/asset-network-substation-EV-V1.png
polyline:
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: meta.source
      value: EV
    style:
      strokeColor: blue
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: parameter.transmission.s_nom_A
      min: 750
    style:
      strokeColor: red
      strokeOpacity: 1
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: parameter.transmission.s_nom_A
      max: 750
      min: 250
    style:
      strokeColor: '#9FC866'
      strokeOpacity: 1
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: parameter.transmission.s_nom_A
      max: 250
      min: 100
    style:
      strokeColor: '#B9D68F'
      strokeOpacity: 1
  - item: asset
    name: EV Substations
    selector:
      bindPath: parameter.location
      get: parameter.transmission.s_nom_A
      max: 100
    style:
      strokeColor: '#D2E5B8'
      strokeOpacity: 1

Marker example

This example will attempt to style unstyled marker with the follow

  • All markers with googles standard pin drop
  • All elements with name tree with a pin drop with letter T
  • All elements with name frog with a pin drop letter F

The letters will override the default styling.
The drawing selector will only allow drawing elements to be styled.

marker:
  - selector:
      drawing: true
    style:
      height: 30
      url: >-
        https://mt.google.com/vt/icon/text=&psize=16&font=fonts/arialuni_t.ttf&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1
      width: 30
  - selector:
      drawing: true
      name: Tree
    style:
      height: 50
      url: >-
        https://mt.google.com/vt/icon/text=T&psize=16&font=fonts/arialuni_t.ttf&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1
      width: 50
  - selector:
      drawing: true
      name: Frog
    style:
      height: 10
      url: >-
        https://mt.google.com/vt/icon/text=F&psize=16&font=fonts/arialuni_t.ttf&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1
      width: 10

Admin settings

Map style config

polygon:
  - item: asset
    name: Highest Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 3
    style:
      fillColor: green
      fillOpacity: 0.4
      strokeColor: lawngreen
      strokeOpacity: 1
      strokeWeight: 4
  - item: asset
    name: Middle Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 2
    style:
      fillColor: yellow
      fillOpacity: 0.3
      strokeColor: yellow
      strokeOpacity: 1
      strokeWeight: 3
  - item: asset
    name: Lowest Rating
    selector:
      get: step.land.asset.land
      property: rating
      value: 1
    style:
      fillColor: red
      fillOpacity: 0.3
      strokeColor: red
      strokeOpacity: 1
      strokeWeight: 3
polyline:
  - active: false
    item: asset
    name: Has voltage
    selector:
      exists: parameter.transmission.voltage
    style:
      strokeColor: blue
      strokeWeight: 3

Map Layers

Examples

Admin settings

layers:
  energyinfrastructure:
    name: Energy Infrastructure
    show: false
    tags:
      - energy
      - name: north america
        type: region
    type: arclayer
    url: >-
      https://geoappext.nrcan.gc.ca/arcgis/rest/services/NACEI/energy_infrastructure_of_north_america_en/MapServer
  nfhl: true
  opentopomap: true
  reportall:
    name: Parcels
    query: 'https://reportallusa.com/api/parcels.php?client=SEOKOgAyW4&v=2'
    show: false
    tags:
      - parcels
      - name: united states
        type: region
    type: parcellayer
    url: >-
      https://reportallusa.com/dyn/tile.py?map=siteroot/Base_Layers.map&layer=Parcels&mode=tile&tilemode=gmap&tile={x}+{y}+{zoom}&client=SEOKOgAyW4
  resourcepotential:
    name: Solar Resource Potential
    show: false
    tags:
      - solar
      - resource
      - name: north america
        type: region
    type: arclayer
    url: >-
      https://geoappext.nrcan.gc.ca/arcgis/rest/services/NACEI/energy_resource_potential_of_north_america_en/MapServer
  usenergy:
    name: US Energy Mapper
    show: false
    tags:
      - energy
      - name: united states
        type: region
    type: arclayer
    url: >-
      https://maps.eia.gov/arcgis/rest/services/USEnergyMappingSystem/20190205/MapServer/
    visible: '132,33,131'
  usgstopotile:
    name: USGS Topo - National Basemap
    show: false
    tags:
      - basemap
      - name: united states
        type: region
    type: tilelayer
    url: >-
      https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{zoom}/{y}/{x}
  wetlands: true