Find the perfect meetup spot

The Meetup Spot Finder is a sample app designed to solve a common problem: choosing a convenient, easy-to-find, and safe location for a pickup. Instead of just picking a random pin on a map, the app intelligently suggests well-known and accessible landmarks near you or a specified location.

Who is this for and when should you use it?

This sample app is particularly useful for anyone using ride-hailing services or coordinating a pickup with a friend in a complex urban environment. The Indian context, with its mix of bustling commercial hubs, dense residential colonies, and historical landmarks, makes this app especially powerful.

Use this app when:

  • You're in an unfamiliar area: If you're a tourist or have traveled to a new part of your city, the app can find a prominent local spot (like a temple, a popular cafe, or a bank) that is straightforward for both you and your driver to locate.
  • Your current location is hard to describe: Standing in a complex housing society or a confusing back-alley? The app will find the nearest major landmark, saving you the hassle of giving complicated directions.
  • You want a safer, more public pickup point: The app prioritizes popular places, which are often better lit and have more foot traffic, providing a greater sense of security while you wait.
  • You're planning a group meetup: If multiple people are converging, you can search for a central, well-known location that works for everyone.

Essentially, it bridges the gap between your precise location and a "good" pickup point that is both close and recognizable.

Choose Your Search Mode

The app offers two distinct ways to find meetup spots, each tailored to a different need.

Search Near Me

  • When to use it: Use this when you need the most convenient, physically closest spot to your current location, and you prioritize a short walk above all else.
  • How it works: This mode uses your device's GPS and searches for places ranked purely by distance. It finds the nearest operational points of interest, regardless of how popular or well-known they are. This is ideal for quick pickups in a familiar neighborhood.

Search a Locality

  • When to use it: Use this when you are planning a pickup in a general area you can name (e.g., "Connaught Place, Delhi") or when you want a more prominent, recognizable landmark.
  • How it works: This mode geocodes your typed location and then searches for places ranked by prominence. This is a Google metric that favors well-known, important locations within that area. These spots might not be the absolute closest, but they are almost always easier for a driver to find.

How It Works: A Look Under the Hood

The application is built using the Google Maps Platform, leveraging several of its powerful APIs to deliver smart suggestions. Here are the key steps involved in its logic:

1. Establishing a Search Origin

First, the app needs to know where to start looking. It does this in one of two ways:

  • Using Your Current Location: It uses the browser's built-in Geolocation API to get your real-time coordinates.
  • Searching for a Locality: If you type in a location (e.g., "Swargate, Pune"), it uses the Geocoding API to convert that text address into geographic coordinates (latitude and longitude).

2. Finding Potential Meetup Spots

Once it has an origin point, the app uses the Places API to find nearby points of interest. It uses the nearbySearch with specific parameters to get relevant results based on the search mode selected.

3. Calculating Accessibility (Walking Time)

The app uses the Directions API to calculate the walking distance and time from the origin point to each potential meetup spot. This is a crucial step for ranking.

4. Smart Ranking and Display

Finally, the app combines all this information. It uses a custom scoring algorithm that gives weight to both walking time (closer is better) and popularity (more user reviews are better). This provides a balanced suggestion that is both convenient and readily identifiable. The calculateRankingScore function is the core of this logic. It works by:

  • Normalizing Values: It finds the maximum walking duration and the maximum number of reviews among all results to create a normalized 0-to-1 score for both factors.
  • Applying Weights: It assigns a higher weight to walking distance (e.g., 60%) and a lower weight to popularity (e.g., 40%). This prioritizes convenience but still significantly factors in how well-known the place is.
  • Calculating Final Score: It adds the weighted scores together to get a final ranking for each place.

The top 5 results from this ranking are then displayed in the side panel and shown as prominent, highlighted markers on the map using the Advanced Markers feature, making them readily visible.

Hypothetical Scenarios

Here are a couple of examples of how the app would be used in the real world:

  • Scenario 1: Finding a landmark in a busy hub. A person has just arrived at the bustling Swargate bus terminus in Pune. They aren't from the city and need to get a ride, but telling the driver "I'm at Swargate" is too vague. They use the Search a Locality mode and type "Swargate, Pune". The app finds prominent, well-known locations nearby, like a famous eatery or a major bank branch. They can then choose one as their pickup point, confident that any driver will know exactly where to go.
  • Scenario 2: Getting a quick pickup from an unknown street. A tourist is exploring the lanes near Esplanade in Kolkata and decides to head back to their hotel. Their current location on a small, unnamed side street is difficult to describe. They use the Search Near Me feature. The app uses their phone's GPS to find their exact coordinates and then suggests the closest possible pickup points, ranked by distance—perhaps a small shop or an ATM just around the corner. This saves them a long walk and the trouble of finding the main road.

Conclusion

The Meetup Spot Finder demonstrates how combining different APIs from the Google Maps Platform can create a powerful, context-aware solution to a real-world problem. By balancing proximity with prominence, this sample app simplifies the process of coordinating pickups, making them smoother, safer, and less stressful for everyone involved.