Skip to content

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

@kikoso kikoso closed this Aug 28, 2025
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