Skip to content

feat: added isochrone maps #1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: added isochrone maps #1535

wants to merge 6 commits into from

Conversation

kikoso
Copy link
Collaborator

@kikoso kikoso commented Jul 1, 2025

This PR introduces a new IsochroneMapProvider class to compute and draw isochrone polygons on a Google Map. It supports multiple durations, transport modes, and color schemas, with a loading indicator callback to track rendering progress.

Features

  • Isochrone computation:
    Uses Google Directions API to estimate travel time for radial points around an origin, refining distances with a binary search to form accurate isochrone polygons.

  • Drawing order and colors:
    Polygons are drawn from outermost to innermost with a green-to-red gradient (green = shortest duration, red = longest) for intuitive visualization.

  • Hole clipping between isochrones:
    Inner polygons are added as holes inside outer polygons to prevent visual overlap and create distinct rings.

  • Loading listener:
    Callbacks notify when loading starts and finishes, enabling UI feedback such as progress spinners.

  • Transport mode flexibility:
    Supports bicycling, walking, driving, and transit modes via Google Directions API.

  • Smooth polygons:
    Chaikin smoothing is applied to polygon edges for improved appearance.

2025-07-01 14 38 38

@googlemaps-bot
Copy link
Contributor

googlemaps-bot commented Jul 1, 2025

Code Coverage

Overall Project 36.08% 🍏

There is no coverage information present for the Files changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants