Skip to content

Compatible with China region, supports Chinese character set, uses Amap Weather API #145

@FengLiqiang996

Description

@FengLiqiang996

Issue Description:

First of all, I would like to express my sincere gratitude for your hard work. This is an excellent project. I have successfully deployed it following your documentation, but encountered a few issues. Currently, the project uses the OpenWeatherMap API, which may not fully support weather queries for China, especially in terms of handling the Chinese character set. To better accommodate users in China, I suggest replacing the weather API with the Amap (Gaode) Weather API and ensuring support for Chinese characters in the display.

Suggested Changes:

  1. Replace the OpenWeatherMap API with the Amap Weather API.

    • The Amap Weather API better supports weather queries for China and returns data in the Chinese character set.
    • The request URL for Amap Weather is as follows:
      http://restapi.amap.com/v3/weather/weatherInfo?city=CityID&key=Amap_API_KEY
      
  2. Adjust the weather data parsing logic to correctly handle the data structure returned by the Amap Weather API.

    • For example, temperature, weather descriptions, humidity, etc., need to be correctly extracted from the JSON data returned by Amap.
  3. Ensure that the project supports the Chinese character set and avoids any issues with garbled or incorrect displays.

Reference:

Heartfelt Thanks:

Once again, thank you for your hard work. This is a very valuable project. I have successfully deployed and used it, but encountered a few issues along the way. I hope these suggested changes will help the project better serve users in China. If you need further information or assistance, I would be happy to provide support. Thank you for your time and patience!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions