appbaseio / appbaseio/reactivesearch

Feature Request: Make the AutoLocation property configurable

Open
#299 0 comments 1 reaction 1 assignee Claimed by @dhruvdutt View on GitHub
enhancement maps :world_map: web :spider_web:
Dominant language
JavaScript
Stars
4.9k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

**Issue Type:**
enhancement

**Platform:**
Web

**Description:**
Currently, when `Autolocation` is enabled on map components, it appears to autocomplete the location to the most specific location it can find. For example, when I make use of a map component, autolocate returns a street address near my current location. It would be nice if the level of detail for the autolocation was configurable so that you could choose the level of detail and it would attempt to locate to that level but no further. For example, have autolocation populate the search box with a city name (and associated lat/long) instead of a street address. I imagine an enumeration of values based on Google Map's options such as:

- Street Address
- Postal Code
- Locality (typically city)
- Administrative Area Level 1 (typically state/provence)
- Country

Additionally, it would be nice if the displayed location string could be easily formatted before being displayed to the UI. Perhaps an optional format function that takes in an object with all the location data (Street Address, Locality, Administrative Areas, Country, etc) and returns a String. This would add lots of flexibility. For example, a developer could decide they want to remove the country name for local locations, but keep the country name for foreign locations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.