github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/domain-modifiers/LOC_BUILDER_DD.md (about) 1 --- 2 name: LOC_BUILDER_DD 3 parameters: 4 - label 5 - x 6 - y 7 - alt 8 - ttl 9 parameters_object: true 10 parameter_types: 11 label: string? 12 x: number 13 y: number 14 alt: number? 15 ttl: Duration? 16 --- 17 18 `LOC_BUILDER_DD({})` actually takes an object with the following properties: 19 20 - label (optional, defaults to `@`) 21 - x (float32) 22 - y (float32) 23 - alt (float32, optional) 24 - ttl (optional) 25 26 A helper to build [`LOC`](LOC.md) records. Supply four parameters instead of 12. 27 28 Internally assumes some defaults for [`LOC`](LOC.md) records. 29 30 31 The cartesian coordinates are decimal degrees, like you typically find in e.g. Google Maps. 32 33 Examples. 34 35 Big Ben: 36 `51.50084265331501, -0.12462541415599787` 37 38 The White House: 39 `38.89775977858357, -77.03655125982903` 40 41 42 {% code title="dnsconfig.js" %} 43 ```javascript 44 D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), 45 LOC_BUILDER_DD({ 46 label: "big-ben", 47 x: 51.50084265331501, 48 y: -0.12462541415599787, 49 alt: 6, 50 }), 51 LOC_BUILDER_DD({ 52 label: "white-house", 53 x: 38.89775977858357, 54 y: -77.03655125982903, 55 alt: 19, 56 }), 57 LOC_BUILDER_DD({ 58 label: "white-house-ttl", 59 x: 38.89775977858357, 60 y: -77.03655125982903, 61 alt: 19, 62 ttl: "5m", 63 }), 64 END); 65 ``` 66 {% endcode %} 67 68 69 Part of the series: 70 * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters 71 * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y 72 * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E 73 * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E 74 * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works