diff --git a/en/option/component/geo-common.md b/en/option/component/geo-common.md index c2b1c8f9..d998d2f0 100644 --- a/en/option/component/geo-common.md +++ b/en/option/component/geo-common.md @@ -174,11 +174,11 @@ Note: `stream` is not required in the `projection`. #${prefix} aspectScale(number) = 0.75 -Used to scale aspect of geo. It will be ignored if [proejction](~${componentNameInLink}.projection) is set. +Used to scale aspect of geo. It will be ignored if [projection](~${componentNameInLink}.projection) is set. -The final calculated `pixelWidth` and `pixelHeight` of the map will satisfy `pixelWidth / pixelHeight = lngSpan / latSpan * aspectScale` (assume [proejction](~${componentNameInLink}.projection) is not specified, and [preserveAspect](~${componentNameInLink}.preserveAspect) is truthy). +The final calculated `pixelWidth` and `pixelHeight` of the map will satisfy `pixelWidth / pixelHeight = lngSpan / latSpan * aspectScale` (assume [projection](~${componentNameInLink}.projection) is not specified, and [preserveAspect](~${componentNameInLink}.preserveAspect) is truthy). -If no [proejction](~${componentNameInLink}.projection) is applied, the latitudes and longitudes in GeoJSON are linearly mapped to pixel coordinates diarectly. `aspectScale` offers a simple way to visually compensates for the distortion caused by the fact that the longitudinal spacing shrinks as latitude increases. For example, an `aspectScale` can be roughly calculated as `aspectScale = Math.cos(center_latitude * Maht.PI / 180)`, which is similar to a sinusoidal projection. +If no [projection](~${componentNameInLink}.projection) is applied, the latitudes and longitudes in GeoJSON are linearly mapped to pixel coordinates diarectly. `aspectScale` offers a simple way to visually compensates for the distortion caused by the fact that the longitudinal spacing shrinks as latitude increases. For example, an `aspectScale` can be roughly calculated as `aspectScale = Math.cos(center_latitude * Maht.PI / 180)`, which is similar to a sinusoidal projection. See [example](${galleryEditorPath}geo-graph&edit=1&reset=1). diff --git a/en/option/partial/view-coord-sys.md b/en/option/partial/view-coord-sys.md index f1984c22..aafab2ab 100644 --- a/en/option/partial/view-coord-sys.md +++ b/en/option/partial/view-coord-sys.md @@ -29,7 +29,7 @@ Notice: the values in `center` are based on the original layout coordinates, rather than the viewport (canvas) coordinates. If you intend to adjust the position and size of ${sourceName} by viewport coordinates, use [${componentNameInLink}.left](~${componentNameInLink}.left) / [.right](~${componentNameInLink}.right) / [.top](~${componentNameInLink}.top) / [.bottom](~${componentNameInLink}.bottom) / [.width](~${componentNameInLink}.width) / [.height](~${componentNameInLink}.height) {{ if: ${isGeoOrMap} }} or [${componentNameInLink}.layoutCenter](~${componentNameInLink}.layoutCenter) / [layoutSize](~${componentNameInLink}.layoutSize){{ /if }}. {{ if: ${isGeoOrMap} }} -`center` is in longitude and latitude by default. Use the projected coordinates if [proejction](~${componentNameInLink}.projection) is set. +`center` is in longitude and latitude by default. Use the projected coordinates if [projection](~${componentNameInLink}.projection) is set. Example: @@ -72,7 +72,7 @@ If using absolute numbers in `center`: Using absolute numbers in `center` is unfeasible, as the absolute numbers typically represent the original coordinates, which is calculated by auto-layout strategy and is not user-determinable. {{ /if }} -A percentage string can also be used in `center`, like `'30%'`, based on the bounding rect{{ if: ${isGeoOrMap} }}(determined min/max latitude/longitude, or min/max projected coordinates if [proejction](~${componentNameInLink}.projection) is set){{ /if }}. You can use `'0%'` to place the top or left of bounding rect to the center of the viewport (typically, canvas), or use `'100%'` to place the right or bottom to the center of the viewport, or use `'50%'` to place the entire ${sourceName} at the the center of the viewport. +A percentage string can also be used in `center`, like `'30%'`, based on the bounding rect{{ if: ${isGeoOrMap} }}(determined min/max latitude/longitude, or min/max projected coordinates if [projection](~${componentNameInLink}.projection) is set){{ /if }}. You can use `'0%'` to place the top or left of bounding rect to the center of the viewport (typically, canvas), or use `'100%'` to place the right or bottom to the center of the viewport, or use `'50%'` to place the entire ${sourceName} at the the center of the viewport. For example: ```ts center: [115, '30%'] diff --git a/zh/option/component/geo-common.md b/zh/option/component/geo-common.md index 399c0ec8..0fa72ce8 100644 --- a/zh/option/component/geo-common.md +++ b/zh/option/component/geo-common.md @@ -172,11 +172,11 @@ series: { #${prefix} aspectScale(number) = 0.75 -这个参数用于 scale 地图的长宽比。如果设置了 [proejction](~${componentNameInLink}.projection) 则无效。 +这个参数用于 scale 地图的长宽比。如果设置了 [projection](~${componentNameInLink}.projection) 则无效。 -地图最终计算得到的 `pixelWidth` 和 `pixelHeight` 将满足以下关系:`pixelWidth / pixelHeight = lngSpan / latSpan * aspectScale`(假设未指定 [proejction](~${componentNameInLink}.projection),且 [preserveAspect](~${componentNameInLink}.preserveAspect) 设为保持长宽比)。 +地图最终计算得到的 `pixelWidth` 和 `pixelHeight` 将满足以下关系:`pixelWidth / pixelHeight = lngSpan / latSpan * aspectScale`(假设未指定 [projection](~${componentNameInLink}.projection),且 [preserveAspect](~${componentNameInLink}.preserveAspect) 设为保持长宽比)。 -当不使用真正的投影公式([proejction](~${componentNameInLink}.projection))时,GeoJSON 里的经纬度会被线性映射到像素坐标。`aspectScale` 提供了一种简单方式,用于视觉上补偿这种映射所造成的形变(由于地球是球形,经度对应的物理尺寸在高纬度地区会收缩)。例如,`aspectScale` 可以通过以下公式粗略计算:`aspectScale = Math.cos(center_latitude * Math.PI / 180)`,这与正弦投影(sinusoidal projection)相似。 +当不使用真正的投影公式([projection](~${componentNameInLink}.projection))时,GeoJSON 里的经纬度会被线性映射到像素坐标。`aspectScale` 提供了一种简单方式,用于视觉上补偿这种映射所造成的形变(由于地球是球形,经度对应的物理尺寸在高纬度地区会收缩)。例如,`aspectScale` 可以通过以下公式粗略计算:`aspectScale = Math.cos(center_latitude * Math.PI / 180)`,这与正弦投影(sinusoidal projection)相似。 参见 [示例](${galleryEditorPath}geo-graph&edit=1&reset=1)。 diff --git a/zh/option/partial/view-coord-sys.md b/zh/option/partial/view-coord-sys.md index 5c91241d..2b497359 100644 --- a/zh/option/partial/view-coord-sys.md +++ b/zh/option/partial/view-coord-sys.md @@ -30,7 +30,7 @@ {{ if: ${isGeoOrMap} }} -`center` 默认使用原始坐标(经纬度)。如果设置了 [proejction](~${componentNameInLink}.projection) 则用投影后的坐标。 +`center` 默认使用原始坐标(经纬度)。如果设置了 [projection](~${componentNameInLink}.projection) 则用投影后的坐标。 示例: ```ts