github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/domain-modifiers/LOC_BUILDER_STR.md (about) 1 --- 2 name: LOC_BUILDER_STR 3 parameters: 4 - label 5 - str 6 - alt 7 - ttl 8 parameters_object: true 9 parameter_types: 10 label: string? 11 str: string 12 alt: number? 13 ttl: Duration? 14 --- 15 16 `LOC_BUILDER_STR({})` actually takes an object with the following: properties. 17 18 - label (optional, defaults to `@`) 19 - str (string) 20 - alt (float32, optional) 21 - ttl (optional) 22 23 A helper to build [`LOC`](LOC.md) records. Supply three parameters instead of 12. 24 25 Internally assumes some defaults for [`LOC`](LOC.md) records. 26 27 28 Accepts a string and tries all `LOC_BUILDER_DM*_STR({})` methods: 29 * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E 30 * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E 31 32 33 {% code title="dnsconfig.js" %} 34 ```javascript 35 D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), 36 LOC_BUILDER_STR({ 37 label: "old-faithful", 38 str: "44.46046°N 110.82815°W", 39 alt: 2240, 40 }), 41 LOC_BUILDER_STR({ 42 label: "ribblehead-viaduct", 43 str: "54.210436°N 2.370231°W", 44 alt: 300, 45 }), 46 LOC_BUILDER_STR({ 47 label: "guinness-brewery", 48 str: "53°20′40″N 6°17′20″W", 49 alt: 300, 50 }), 51 END); 52 ``` 53 {% endcode %} 54 55 56 Part of the series: 57 * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters 58 * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y 59 * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E 60 * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E 61 * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works