Giter Club home page Giter Club logo

Comments (12)

Yu-Core avatar Yu-Core commented on August 23, 2024

不能显示天气所在城市,这个项目的原理是通过html5的api获取经纬度,通过经纬度请求天气api。
想要通过经纬度显示所在城市,需要逆地理编码。
选择城市新版本暂时还没有写。你可以看一下old分支,那个是旧版本,当时把国内城市及经纬度存储在json里,然后选择。

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

好的,OLD没有WINFORM,我主要是用在WINFORM里面。

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

新版本可以选择城市,是不是也可以把城市显示出来呀?

from yourweather.

Yu-Core avatar Yu-Core commented on August 23, 2024

显示城市的话,只能显示那些预设的城市,那些既有经纬度又有城市名。

如果是定位获得的位置,只有经纬度,没有城市名。把经纬度转换成城市名,要用地图API的逆地理编码功能。高德,百度,腾讯,用哪家的都可以,建议用腾讯的,每天一万次免费请求,高德和百度都是5000次。只要根据他开发文档的返回json结构,写个对应的class,复制json,VS有那个功能可以根据json或者xml生成class。

可以写,就是那时懒得写了。现在写不了,最近有点事,身边没电脑。

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

现在不是可以选择城市吗?比如我选择苏州,这样就把苏州显示在上面可以吗?

from yourweather.

Yu-Core avatar Yu-Core commented on August 23, 2024

改了一下,应该可以了。用手机改的,应该没什么问题。

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

利害呀!手机都可以修改 。
可以了,选择好城市后并设置为默认就可以显示了。

from yourweather.

Yu-Core avatar Yu-Core commented on August 23, 2024

如果觉得还行的话,可以给个star,谢谢啦

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

没问题,已经点啦。

就是引用的库有点多,编译后262M。。。

from yourweather.

Yu-Core avatar Yu-Core commented on August 23, 2024

你可以了解一下这个裁剪选项https://learn.microsoft.com/zh-cn/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-7-0

from yourweather.

FreeVB avatar FreeVB commented on August 23, 2024

好像不行,因为我用的是winform...

from yourweather.

Yu-Core avatar Yu-Core commented on August 23, 2024

查了一下文档,winform和wpf确实都不支持裁剪

from yourweather.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.