How does the search for location (city or administrative division) work?

Intro

LaraClassifier uses the Geonames database for information on cities and administrative divisions. This database may be incomplete for some countries, but you can update it manually through Admin panel → Settings → International → Countries to add, modify, or delete data.

How does the search for a place work with the default database?

When an administrative division is searched

When users search for or click on an administrative division (State, Region, Province, Department, or District):

  • The script displays listings from all cities within that division without considering distance features
  • If the division doesn't exist, it shows results from the largest populated city in the country
  • No results appear if the division has no associated cities
  • The most populated city auto-selects if no administrative division type is configured

Important Notes: The script uses simplemaps for SVG maps and Geonames for database entries—these may not always align. Ensure your selected Administrative Division type (1 or 2) matches your country's SVG map data.

To improve accuracy, update the database through the Admin panel to match SVG map names, or edit SVG files at /public/images/maps/ for obsolete names.

When a city is searched

Configure behavior for non-existing cities in Admin panel → Settings → General → List & Search → Fake locations results:

  • Show HTTP 404 error page
  • Display the country's most popular city results
  • Skip location filtering entirely

From the Listings Creation/Edition Forms

Enable administrative divisions for your country by:

  • Going to Admin panel → Settings → International → Countries → [Edit]
  • Selecting the appropriate Administrative Division Type (1 or 2)
  • Checking the "Active Administrative Division's Field" checkbox

Was this article helpful?

Thank you for your feedback!

Still need help? Create a support ticket

Create a Ticket