GithubHelp home page GithubHelp logo

querycpc's Introduction

全国省市 JSON查询

想做一个天气查询的软件,但是需要自己通过地址查询对应的城市(地级市),找了很多,但是没有现成的接口,就自己动手做了一个.

找到了一个xml格式的全国省市区目录和全球所有国家主要城市的文件.

在java中解析了一下,并生成了对应的json格式.

可以通过http://182.254.210.18/QueryCPC/QueryAll.php 获取所有的省级别的列表,(get方式)

{"province":[{"name:","省级别名","province_id" : "id"},[{"name":"北京","province_id" : "0"},{"name":"天津","province_id" : "1"},,....]}

通过 http://182.254.210.18/QueryCPC/QueryCity.php?pr=name 将对应省的id替换name作为pr的参数传入(get方式)

{"city":[{"name:","地级市名"},{"name":"沈阳"},{"name":"大连"},...]}

今后会逐渐完善县级市的列表

AnalisicCPC_JAVA 文件夹附所有java文件

LocList.xml 为原文件

querycpc's People

Contributors

clwater avatar

Watchers

James Cloos avatar  avatar

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.