Skip to content
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

Geocoder Search Bar #14

Closed
jmkiley opened this issue Sep 20, 2017 · 8 comments
Closed

Geocoder Search Bar #14

jmkiley opened this issue Sep 20, 2017 · 8 comments

Comments

@jmkiley
Copy link
Contributor

jmkiley commented Sep 20, 2017

An iOS version of the mapbox-gl-geocoder would be helpful for developers. Could allow people to more easily incorporate MapboxGeocoder.swift.

It would require an additional dependency, so we would need to decide whether we want to support Carthage in this library.

It would likely be a UISearchBar with a 4-5 row UITableView that pops over the map, and return an array that can be mapped by the user.

cc @captainbarbosa @1ec5

@jmkiley jmkiley changed the title Geocoder UISearchBar Geocoder Search Bar Sep 20, 2017
@1ec5
Copy link
Contributor

1ec5 commented Sep 20, 2017

It would be nice to keep the concept of map plugins focused to functionality that’s contained in the map itself. The functionality proposed here is akin to how the navigation SDK – as a separate library – vends its own UI that has a map view as its centerpiece. That isn’t really a consideration for mapbox-gl-geocoder, which is designed as an ornament in the map itself, similar to the compass button provided by the iOS SDK.

Another way of looking at it is that, on iOS, it would be more helpful to provide a view controller – perhaps a special version of UISearchController and UITableViewController that work together. By contrast, a standalone UISearchBar provides little additional functionality and would require the developer to manage integration with a UITableView themselves. Yet as soon as a library vends a view controller, it moves well beyond the scope of the map SDK, taking over the window instead of enhancing a particular view within the window.

@jmkiley
Copy link
Contributor Author

jmkiley commented Sep 20, 2017

Yeah. I think we need to explore whether we want to use the plugins repo to house plugins that solely use the Maps SDK, or to also include plugins intended to bridge the Maps SDK with other other Mapbox libraries (such as geocoding).

@captainbarbosa
Copy link

It would be nice to keep the concept of map plugins focused to functionality that’s contained in the map itself

Would it make more sense to include this functionality within MapboxGeocoder.swift directly instead?

@1ec5
Copy link
Contributor

1ec5 commented Sep 21, 2017

Like the other service libraries, MapboxGeocoder.swift is currently designed to be a lightweight wrapper around the Geocoding API proper, akin to the functionality provided by the Mapbox JavaScript SDK. So far it seems that our non-UI libraries are language-oriented (e.g., Swift) whereas the UI libraries are platform-oriented (e.g., iOS).

At the risk of repo proliferation, a separate UI library could depend on MapboxGeocoder.swift as an implementation detail, just as the navigation SDK depends on MapboxDirections.swift as an implementation detail.

@jmkiley
Copy link
Contributor Author

jmkiley commented Mar 12, 2018

Android Places Plugin has landed. I have been working on a search bar with iOS on the side, but am still a little unsure about where it would live. There is also a case for including it as an example with the MapboxGeocoder.swift library, as @captainbarbosa mentioned.

@Narek1994
Copy link

Hi, any news about the iOS version of build in search bar?

@Ahmeddben
Copy link

Android Places Plugin has landed. I have been working on a search bar with iOS on the side, but am still a little unsure about where it would live. There is also a case for including it as an example with the MapboxGeocoder.swift library, as @captainbarbosa mentioned.

Any update on this?

@captainbarbosa
Copy link

We currently don't have plan to introduce a geocoder search bar plugin for this repository while we focus on other roadmap priorities. We're considering including a search bar as an integrated component of MapboxGeocoder.swift or at least include an example there, but have no timeline on when this would be implemented.

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

No branches or pull requests

5 participants