targomo / targomo-js-extensions

Google Maps extension for targomo-js
MIT License
2 stars 1 forks source link

Default colors for unknown travel times #47

Open hfs opened 1 year ago

hfs commented 1 year ago

Currently polygon fill colors are pre-defined for a list of travel times: 300, 600, …, 1800. If a user sets a higher max travel time, the polygons are not drawn unless you set the colors explicitly. To the user it might look like travel times > 1800 don’t work.

It would be great if the default colors could use some fallback mechanism to e.g. return some grey color when an “unknown” travel time is used. This way the polygons would at least be shown on the map and using a grey would give the developer a hint that something needs to be done about the colors.