You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Geographic Information System (GIS) and map visualization development, **Rewind** is a key operation used to **correct the vertex order (Winding Order) of polygons**.
137
+
138
+
In simple terms, its function is to ensure that the "outer rings" and "inner rings (holes)" of polygons are arranged in the standard specified direction (clockwise or counterclockwise), preventing serious visual errors from occurring in the rendering engine during drawing.
139
+
140
+
Generally speaking, if there are no errors in the incoming map data and the mapping configuration is correct, but the drawing effect does not meet expectations, it may be that the vertex order (Winding Order) of the map data does not conform to expectations, causing the rendering engine to draw incorrectly.
141
+
142
+
In this case, it is necessary to perform a Rewind operation on the map data to ensure that the "outer rings" and "inner rings (holes)" of polygons are arranged in the standard specified direction (clockwise or counterclockwise). VChart provides a `rewind` option in the parameter values for registering maps, which defaults to false.
143
+
144
+
```
145
+
// Enable rewind option for topojson data
146
+
VChart.registerMap('south-america', topojson, {
147
+
type: 'topojson',
148
+
object: 'south-america',
149
+
rewind: true
150
+
});
151
+
152
+
// Enable rewind option for geojson data
153
+
VChart.registerMap('world', world_geojson, {
154
+
type: 'geojson',
155
+
rewind: true
156
+
});
157
+
```
158
+
134
159
2. Meta map data
135
160
136
-
-one`地理维度`Field specifying the Region to be colored on the base map
137
-
-one`数值`Field used to map the specified visual channel such as shading depth
138
-
Note: If the Region name in the incoming Geographic Dimension field does not correspond to the base map data, you need to pass`mapChart.nameMap`Specify.
161
+
-One **geographic dimension** field specifying the region to be colored on the base map
162
+
-One **numeric** field used to map the specified visual channel such as shading depth
163
+
Note: If the region name in the incoming geographic dimension field does not correspond to the base map data, you need to use `mapChart.nameMap` to specify the mapping.
139
164
140
165
### Specify nameMap
141
166
@@ -339,6 +364,8 @@ vchart.renderSync();
339
364
340
365
# Get Map Data
341
366
367
+
Note: Please ensure that the map data complies with the standard `right-hand rule`, otherwise it may cause rendering issues. If the data does not comply with the standard, you need to use the **rewind** option to process it.
0 commit comments