Comments (1)
Hi @amolpujari
To get list of cities there is method available CS.cities(state, country)
So to find cities for US you have to pass state & country to the CS.cities method
Example: CS.cities(:ak, :us)
Here :ak is the Alaska state from US.
This will return cities from Alaska state of US
There is one alternative available for CS.cities
method, i.e CS.get(country, state)
this will return same result like the CS.cities method.
Hope this will help you.
Thanks
from city-state.
Related Issues (20)
- New Feature Request; zipcode should also be there with cities.
- How to change db data locally?
- Some cities are not showing for some states HOT 1
- Unable to update from Rails console, changes lost after closing console HOT 1
- Ability to query cities by country name in addition to country code HOT 1
- Invalid data for GB HOT 1
- broken link
- NoMethodError: undefined method `present?' for :US:Symbol HOT 1
- missing city Surat
- Is there a plan to include timezone in?
- Singapore cities are missing but present in MaxMind DB HOT 2
- Typo correction "Tithari" should be changed to "Ithari" for Nepal HOT 2
- Failed to open TCP connection to geolite.maxmind.com:80 (getaddrinfo: No address associated with hostname) (SocketError) HOT 4
- Renaming a city or Delete city HOT 3
- How to access cities when tthere is no states present for a countrry.
- Permission errors on deploy
- "No such file or directory @ rb_sysopen <url>" when attempting update
- Not working with ruby 3.2 HOT 5
- Cannot list all existing cities to check if certain city exists or not right away
- Error "Did you mean? exist?" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from city-state.