GeoNet Node Package Documentation - v1.1.7
    Preparing search index...

    Utility class for generating GeoNet earthquake map URLs.

    1.0.0

    Index
    • Generates a colour code for a given MMI, which corresponds to the marker colour on GeoNet maps.

      Parameters

      • mmi: MMI

        The New Zealand Modified Mercalli Intensity of the quake.

      Returns string

      • The hex code colour for the earthquake based on the MMI.
      • Throws an error if the MMI is not provided, or is invalid.

      1.1.0

    • Generates a link to the GeoNet quake map URL for a given set of coordinates and MMI.

      Parameters

      • coordinates: [number, number]

        The coordinates of the quake. Position 0 is the longitude, and position 1 is the latitude.

      • mmi: MMI

        The New Zealand Modified Mercalli Intensity of the quake.

      Returns string

      • The URL string for the quake map.
      • Throws an error if the coordinates are invalid or if the MMI is not provided.

      1.0.0