Integrating Google maps with C++ Program

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-05 05:35:25

问题


I am making an artificial intelligence based shortest distance finder between two points in c++ language. My coding for that is complete and working fine. Now I want to integrate it with Google Maps Api. I want to show the shortest distance graphically on google maps exactly same as google maps show directions. I am stuck and can't find any help. I know I have to do socket programming for this. Please guide me with proper steps and coding snippets. Thanks in advance!


回答1:


Check out the official api : https://cloud.google.com/maps-platform/

For interaction with the http api you could use a client such as curl (http://curl.haxx.se/) or maybe boost asio if your are using boost. see this question at SO: Boost.ASIO-based HTTP client library (like libcurl)




回答2:


There is a c++ client/ helper available. Disclosure I have not tried it yet. https://google.github.io/google-api-cpp-client/latest/ Many links seem to be broken (The samples directory link). So I'm not sure how well supported it is but it looks like it might be helpful. The description page is at : https://google.github.io/google-api-cpp-client/latest/start/installation.html IF that fails there are samples in other languages that you may have to translate by hand. (better than nothing) https://developers.google.com/api-client-library/



来源:https://stackoverflow.com/questions/30886444/integrating-google-maps-with-c-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!