How to add my own custom places at autocomplete Places search box? - javascript

I have implemented autocomplete search box. From here,
Places search box
I have seen this question, how-to-display-custom-places-in-google-maps-api-search-results
But it was unable to help me. The accepted answer is not showing custom places in auto completed result.
Now I want to show also my own custom places (from a JSON list of places) along with Google's place suggestion at autocomplete result. How can I implement this?

Related

SearchBox in Form using react-google-maps

Created a Modal having Form, and I want to add a place SearchBox.
All I need is the Name of the Place and Not the Map.
Using this Project - react-google-maps
I'm trying to use the above mentioned project and according to it.
I am able to get the "Customized Search Box".
How can I just use the searchbox and not the whole map.
And also it's messed up in zIndex.
The "as" written in the Placeholder box is transparent and
search suggestions i.e "ashley homestore" are at the back of the box.
How to fix it?
Thanks.
Solution was pretty simple to switch to
Google React Placeholder Autocomplete
by kenny-hibino

Search UI Autocomplete Input

How do I create the animation shown on http://remoteok.io where examples of possible searches are shown and when the user clicks on the search box they disappear and they can input their own query?
Twitter Typeahead.js can be used to implement similar functionality. See https://blog.twitter.com/2013/twitter-typeaheadjs-you-autocomplete-me & https://twitter.github.io/typeahead.js/

Google Maps Places Autocomplete search any position

When I use google places autocomplete api and as search places with keyword
&input=MyWord
result is places that start with MyWord. e.g. MyWord1 , MyWord2, MyWordblalba
I want to get results that contain MyWord in middle or at any position of result. e.g. blablaMyWordbla
Is it possible ? I can't find any parameter or wildcard in documentation
https://developers.google.com/maps/documentation/javascript/places-autocomplete
As far as I know there is not such functionality to search locations by wildcards, you can only search by beginning of the word
I suggest using the Search functionality of the API, rather than Autocomplete. Autocomplete is designed to complete place names typed by an end-user and therefore focuses on generating suggestions for suffixes.

Country State select list using google api

I have a list of countries generating dynamically from my database. On change event for the select list, when I select a country, I want to generate another select list for selecting states.
I am trying to achieve this using Google Maps API.
Can anyone tell me how to achieve this. Struggling from 5 hours on this.
Thanks
Phaniraj N
I just tried a quick googled around and found that google seems like don't provide such service.
But you may use other services like:
http://www.dyngeometry.com/web/WorldRegion.aspx
Another finding:
Google places API - How to get regions of a country?
hope it helps

How to implement two advanced autocompletes for one search box?

I need help and tips on how to implement this feature.
I have a search box. A correct search query could be: Cars in Paris. {category} in {location}.
When the user starts to type the first char a search hint appears for the categories.
The user selects "Car parts" from the hint options.
"[space-key]in[space-key]" are added to the searchbox automatically after the selection of an option.
A new search hint appears for the locations. User chooses Paris.
Do the search after selection the location.
Any tips on how to implement this?
Here's what I'd suggest:
Use jquery UI for auto suggest (very easy to implement, easy to customize to work for your specific situation) http://jqueryui.com/demos/autocomplete/. What I'd suggest is to have jQuery check whether the user is typing in a category or location (by seeing if the input is empty) and based on that, run a different autocomplete call.
jQuery UI has an event called 'select'. Use that to add the chosen item + in into the text field.
Now, when the user types in something else, have jQuery recognize that it's time for a location, and call jQuery UI autocompletion to suggest locations.

Categories