appbaseio / appbaseio/reactivesearch

Feature Request: Make the AutoLocation property configurable

未关闭
#299 0 条评论 1 个 reaction 已指派 1 人 已被 @dhruvdutt 认领 在 GitHub 查看
enhancement maps :world_map: web :spider_web:
主要语言
JavaScript
星标
4.9k
派生
478
PR 合并指标
30 天内没有已合并 PR

描述

**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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。