-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Michigan State in Country Map
#29485
Comments
@jpmonette Hello there! I'm here to help you with any bugs, questions, or contributions you might have. To fix the Here is an example of how you might modify the GeoJSON file for Michigan: {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": { "name": "Michigan" },
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-90.418135, 46.506993],
[-90.229014, 46.508499],
[-90.119674, 46.338327],
[-90.229014, 46.338327],
[-90.418135, 46.506993]
],
// Add more coordinates here to define the land boundaries of Michigan
]
}
}
]
}
In this example, the coordinates should be adjusted to outline the land boundaries of Michigan, excluding the lakes. You will need to obtain the correct coordinates for Michigan's land boundaries and replace the placeholder coordinates in the example above. Once you have the correct GeoJSON file, you can update the |
Would it be possible to achieve this by using out-of-the-box echarts GeoJSON instead of tweaking this file manually? |
Yes, you can achieve this by using out-of-the-box ECharts GeoJSON data instead of manually tweaking the file. Superset allows you to specify or override the default GeoJSON data used by ECharts within its configuration. Here is an example of how you can specify custom GeoJSON data in an ECharts configuration within Superset: // Example ECharts configuration with custom GeoJSON data
const option = {
series: [
{
type: 'map',
map: 'USA', // Name of the custom map
geoJSON: usaGeoJSONData, // Your custom GeoJSON data for the USA
// Other series options
}
],
// Other chart options
};
// Register the custom map with ECharts
echarts.registerMap('USA', usaGeoJSONData);
// Set the option to the ECharts instance
echartsInstance.setOption(option); In this example, By registering the custom map with ECharts and setting the appropriate options, you can ensure that the |
While ECharts provides a means to render GeoJSON, they do not provide a source of GeoJSON data. NaturalEarth is not perfect, but it's license compatible and fairly adaptable via the Jupyter Notebook in the codebase. |
Bug description
When using the
Country Map
plugin, it seems like the Michigan state is inaccurately represented.Currently, it includes some lakes part of its shape.
Expected behaviour would be for it to not include the lake.
How to reproduce the bug
Screenshots/recordings
Current
(includes the great lakes)
Expected (from Echarts)
https://echarts.apache.org/examples/en/editor.html?c=map-usa-projection
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: