Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/misc/filters

Index

Type Aliases

dmsCoordinates: function(import('ol/coordinate').Coordinate, (number|string)=, string=): string

Type Parameters

    duration: function(number): string

    Type Parameters

      formatNumber: function(number, number=): string

      Type Parameters

        numberCoordinates: function(import('ol/coordinate').Coordinate, (number|string)=, string=, (boolean|string)=): string

        Type Parameters

          unitPrefix: function(number, string=, string=, number=): string

          Type Parameters

            Functions

            • Format coordinates as DMS coordinates.

              Example without parameters:

               <p>{{[7.1234, 46.9876] | ngeoDMSCoordinates}}</p>
              <!-- will Become 7° 07' 24'' E 46° 59' 15'' N-->

              Example with defined fractionDigits and a template.

               <p>{{[7.1234, 46.9876] | ngeoDMSCoordinates:2:'[{y}; {x]'}}</p>
              <!-- will Become [46° 59' 15.36'' N; 7° 07' 24.24'' E] -->
              nginject
              ngdoc

              filter

              ngname

              ngeoDMSCoordinates

              Returns dmsCoordinates

              A function to format numbers into a DMS coordinates string.

            • DurationFilter(gettextCatalog: gettextCatalog): duration
            • A filter used to format a time duration in seconds into a more readable form. Only the two largest units will be shown.

              Examples: {{42 | ngeoDuration}} => 42 seconds {{132 | ngeoDuration}} => 2 minutes 12 seconds {{3910 | ngeoDuration}} => 1 hour 5 minutes -> Note: the remaining 10 seconds will be dropped

              nginject
              ngdoc

              filter

              ngname

              ngeoDuration

              Parameters

              • gettextCatalog: gettextCatalog

                Gettext catalog.

              Returns duration

              Function used to format a time duration in seconds into a string.

            • Format a couple of numbers as number coordinates.

              Example without parameters:

               <p>{{[7.1234, 46.9876] | ngeoNumberCoordinates}}</p>
              <!-- will Become 7 47 -->

              Example with defined fractionDigits and template (en-US localization):

               <!-- With en-US localization -->
              <p>{{[7.1234, 46.9876] | ngeoNumberCoordinates:2:'co {x} E; {y} N'}}</p>
              <!-- will Become co 7.12 E; 46.99 N -->
              <br/>
              <!-- With en-US localization -->
              <p>{{[2600000, 1600000] | ngeoNumberCoordinates:0:'{x}, {y}'}}</p>
              <!-- will Become 2,600,000, 1,600,000 -->
              <br/>
              <!-- With fr-CH localization -->
              <p>{{[2600000, 1600000] | ngeoNumberCoordinates:0:'{x}, {y}'}}</p>
              <!-- will Become 2'600'000, 1'600'000 -->
              nginject
              ngdoc

              filter

              ngname

              ngeoNumberCoordinates

              Parameters

              • $filter: IFilterService

                Angular filter

              Returns numberCoordinates

              A function to format numbers into coordinates string.

            • A filter used to format a number with a precision, using the locale.

              Arguments:

              • opt_precision: The used precision, default is 3.

              Examples:

               {{0.1234 | ngeoNumber}} => 0.123
              {{1.234 | ngeoNumber}} => 1.23
              {{12.34 | ngeoNumber}} => 12.3
              {{123.4 | ngeoNumber}} => 123
              {{1234 | ngeoNumber}} => 1230
              nginject
              ngdoc

              filter

              ngname

              ngeoNumber

              Parameters

              • $locale: ILocaleService

                Angular locale

              Returns formatNumber

              Function used to format number into a string.

            • ScalifyFilter($filter: IFilterService): ((arg0: number) => string)
            • Format a number as a localized scale. For instance:

              • For 'fr-CH' the value 25000 will become '1 : 25 000'.
              • For 'en-US' the value 25000 will become '1 : 25,000'.

              Example:

               <p>{{25000 | ngeoScalify}}</p>
              
              nginject
              ngdoc

              filter

              ngname

              ngeoScalify

              Parameters

              • $filter: IFilterService

                Angular filter

              Returns ((arg0: number) => string)

              A function to format number into a 'scale' string.

                • (arg0: number): string
                • Parameters

                  • arg0: number

                  Returns string

            • UnitPrefixFilter($filter: IFilterService): unitPrefix
            • A filter used to format a number with the prefix and unit

              Arguments:

              • opt_unit: The unit to used, default is ''.
              • opt_type: (unit|square|binary) the type of units, default is 'unit'.
              • opt_precision: The used precision, default is 3.

              Examples:

               {{25000 | ngeoUnitPrefix}} => 25 k
              {{25000 | ngeoUnitPrefix:'m'}} => 25 km
              {{25000000 | ngeoUnitPrefix:'m²':'square'}} => 25 km²
              {{2048 | ngeoUnitPrefix:'o':'binary'}} => 2 Kio
              nginject
              ngdoc

              filter

              ngname

              ngeoUnitPrefix

              Parameters

              • $filter: IFilterService

                Angular filter

              Returns unitPrefix

              Function used to format number into a string.

            • A filter to mark a value as trusted HTML, with the addition of automatically converting any string that matches the StringToHtmlReplacements list to HTML.

              Usage:

              If you use it, you don't require the "ngSanitize".

              nginject
              ngdoc

              filter

              ngname

              ngeoTrustHtmlAuto

              Parameters

              Returns ((arg0: any) => string)

              The filter function.

                • (arg0: any): string
                • Parameters

                  • arg0: any

                  Returns string

            • trustHtmlFilter($sce: ISCEService): ((arg0: any) => string)
            • A filter to mark a value as trusted HTML.

              Usage:

              If you use it, you don't require the "ngSanitize".

              nginject
              ngdoc

              filter

              ngname

              ngeoTrustHtml

              Parameters

              • $sce: ISCEService

                Angular sce service.

              Returns ((arg0: any) => string)

              The filter function.

                • (arg0: any): string
                • Parameters

                  • arg0: any

                  Returns string

            Generated using TypeDoc