Giter Club home page Giter Club logo

typeahead-addresspicker's Introduction

Typeahead Address Picker Build Status

It's not an extension of typeahead plugin itself, but a new data source for twitter typeahead (version > 0.10.0)

The AddressPicker is a subclass of a Bloodhound class. It connects suggestions to Google Map AutocompleteService.

But it's much more than a simple suggestion engine because it can be linked to a google map to display/edit location.

How to use

Without a Google Map

The simplest usage is to use it as suggestion engine, without displaying results on google map.

  1. Include typeahead and google map with places activated

Using this repository

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="../dist/typeahead.js"></script>
<script src="../dist/typeahead-addresspicker.js"></script>

Or if you want to quickly get started

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.10.4/dist/typeahead.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead-addresspicker/0.1.4/typeahead-addresspicker.min.js"></script>
  1. Add an input text
<input id="address" type="text" placeholder="Enter an address">
  1. Instanciate an AddressPicker and a typeahead
var addressPicker = new AddressPicker();

$('#address').typeahead(null, {
  displayKey: 'description',
  source: addressPicker.ttAdapter()
});

With a Google Map

For a better user experience, you can connect it to a google map to display results. You just need to add a div as for a google map place holder and connect it to the AddressPicker

  1. As before

  2. Add a div

<input id="address" type="text" placeholder="Enter an address">
<div id="map"></div>
  1. Instantiate an AddressPicker with the google map div element or ID and connect typeahead events.
// instantiate the addressPicker suggestion engine (based on bloodhound)
var addressPicker = new AddressPicker({
 map: {
  id: '#map'
 }
});

// instantiate the typeahead UI
$('#address').typeahead(null, {
  displayKey: 'description',
  source: addressPicker.ttAdapter()
});

// Bind some event to update map on autocomplete selection
$('#address').bind('typeahead:selected', addressPicker.updateMap);
$('#address').bind('typeahead:cursorchanged', addressPicker.updateMap);

Options

When you instantiate a new AddressPicker you can pass a list of options new AddressPicker(options)

Available Options:

  • map (Hash): Map id and options to link typeahead to a goggle map (default: none).

    • id (String/Element) DOM map element or CSS selector
    • all google.maps.Map constructor options. Default values are:
    {
      zoom: 3,
      center: new google.maps.LatLng(0, 0),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
  • marker (Hash): Marker options display on the map.

    {
      draggable: true,
      visible: false,
      position: MAP_CENTER
    }
  • autocompleteService (Hash) : options passed to google.maps.places.AutocompleteService#getPlacePredictions (default: {types: ['geocode']}) For more details read Google documentation. You can add a lot of options, like get only address for a country, or get only cities.

    Example To get only cities in United States:

    {
      autocompleteService: {
        types: ['(cities)'], 
        componentRestrictions: { country: 'US' }
      }
    }
  • zoomForLocation (Number): Zoom value when an accurate address is selected (default: 16).

  • reverseGeocoding (Boolean): Reverse geocoding when marker is dragged on map (default: false).

  • placeDetails (Boolean): If not using with a map, you can skip the getDetails portion to speed up the query (default: false).

Events

Only one event is trigger by AddressPicker object: addresspicker:selected. The event is fired when an address is selected or when the marker is dragged. If reverseGeocoding is activated, a full response is trigger, otherwise only lat/lng.

To simplify google response parsing, we fire an object of type AddressPickerResult with some accessors:

  • lat()
  • lng()
  • addressTypes()
  • addressComponents()
  • nameForType: (type, shortName = false)

Listen that event to get values you need and store them in your form. Here is an example:

// Proxy inputs typeahead events to addressPicker
addressPicker.bindDefaultTypeaheadEvent($('#address'))

// Listen for selected places result
$(addressPicker).on('addresspicker:selected', function (event, result) {
  $('#your_lat_input').val(result.lat());
  $('#your_lng_input').val(result.lng());
  $('#your_city_input').val(result.nameForType('locality'));
});

Tests

The code is tested as much as possible. If you want to add features, please add spec in your pull request.

Demo

A demo is included in the github repository, and is available here: http://sgruhier.github.io/typeahead-addresspicker

Quick example to show how to use twitter typeahead autocomplete and google map API to make an address picker.

This example is just a first try and could be enhanced to fully replace my previous address picker: http://xilinus.com/jquery-addresspicker/demos/

Any suggestions (using issues) or pull requests are welcome.

Todo

  • Connect HTML5 geolocalisation API to display user position
  • Anything else that could make sense to be added :). You can open an issue with a label "feature" to open a discussion on a feature/API you'd like to add.

Credits

@copyright Sébastien Gruhier / Xilinus (http://xilinus.com - http://v3.maptimize.com - http://buy.maptmize.com)

typeahead-addresspicker's People

Contributors

sgruhier avatar shekibobo avatar steve0hh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typeahead-addresspicker's Issues

[improvment] add an option for a custom marker

I tweak the original js to do this, would have been nice to be able to do it with an option passed in initialization :

        AddressPicker.prototype.initMap = function(options) {
            options = $.extend({
                zoom: 3,
                center: new google.maps.LatLng(0, 0),
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                displayMarker: false
            }, options);
            this.map = new google.maps.Map($(options.id)[0], options);
            this.lastResult = null;

            var imageMarker = {url: '<%=image_path ('custom-marker.svg')%>',
                size: new google.maps.Size(60, 60),
                origin: new google.maps.Point(0, 0),
                anchor: new google.maps.Point(20, 61)};

            this.marker = new google.maps.Marker({
                position: options.center,
                map: this.map,
                visible: options.displayMarker,
                draggable: this.options.draggable,
                icon: imageMarker
            });

            if (this.options.draggable) {
                return google.maps.event.addListener(this.marker, 'dragend',      this.markerDragged);
            }
        };

Typeahead:selected event

Hello,

How can I bind a custom function to the 'typeahead:selected' event, when a user select the "typeaheaded" suggestion with the "tab" key?

I've tried

$(addressPicker).on('typeahead:selected', function (event, result) {
    console.log(adresse + ' > typeahead:selected');
});

But no luck..

Working with bootstrap?

I want to integrate it with a bootstrap form on rails but the bootstrap appears to be interfering with adding in the JS and autocomplete. Not entirely sure where to start for trying to get the two to cooperate. Any suggestions?

addresspicker:selected not last fired

I try to change the input value after someone clicked but selected is not the last event.
Check

 var fromAddressPicker = new AddressPicker(
    {   autocompleteService: {
            types: ['address'],
            componentRestrictions: { country: 'nl' }
        }
    });

$("#from-address").typeahead(null, {
  displayKey: 'description',
  source: fromAddressPicker.ttAdapter()
});

fromAddressPicker.bindDefaultTypeaheadEvent($('#from-address'));

$(fromAddressPicker).on('addresspicker:selected', function (event, result) {
    $("#from-address").val(result.nameForType('route'));
});

So you can see i just want the route in the input after clicking something. It works but if I go out of focus it changes back to the original result (complete address, formated address)

Support latest typeahead

Love your picker, but it seems to only works with typeahead 0.10.x and not 0.11.x, unfortunately

CORS issue with having Pusher + Ember

I am having a strange issue, when I start typing the address it throws this error,

XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/geocode/json?address=Florida&region=&components=country%3AUS. Request header field X-Pusher-Socket is not allowed by Access-Control-Allow-Headers in preflight response.

The addresspicker just works fine on everyother page, but having issues with the page that has ember app on it, the ember app does have the pusher as well.

Feature request: Click map position to run reverse geocode

What about just being able to click a position on the map and it perform the reverse geocode because at the moment it requires the user to have an attempt first and then move the marker.

This would allow remote map positions to be chosen without having to try to search nearby first.

I'm not sure but it may also allow easier positioning when using streetview as well.

clicked event

@sgruhier I cannot find a clicked event. Is there a clicked event for this?

I am trying to collect the coordinates a user clicked on and move the marker to that spot. I would like to use that in conjunction with the default address method. This would allow the user to enter their address in order to get in the general vicinity of their home but then simple click instead on their house to move the marker there instead of having to drag it there.

Thanks,
Thomas

Uncaught ReferenceError: Bloodhound is not defined

  1. Have included google map and typeahead.Jquery is added through a gem and referenced in application.js
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=places&language=en-US"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.9.3/typeahead.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/sgruhier/typeahead-addresspicker/master/dist/typeahead-addresspicker.js"></script>

2)Have added input text

<input id="address" type="text" placeholder="Enter an address">

3)Have instantiated address picker and typeahead.

$(document).on('ready page:load', function () {

    var addressPicker = new AddressPicker();

             $('#address').typeahead(null, {

                              displayKey: 'description',

                              source: addressPicker.ttAdapter()

              });

});

Support diacritic character

There is address such as 'Les Prés du Riau, 36400 Montgivray, France', when I type 'les pre' the hint stops working because it is expecting 'é'. I suggest teaching the code to understand e and é when typing just 'e'.

Of course there more than one diacritic character, here is a small list

var specialChars = [
            { val: "a", let: "(á|à|ạ|ả|ã|â|ấ|ầ|ậ|ẩ|ẫ|ă|ắ|ằ|ặ|ẳ|ẵ|Á|À|Ạ|Ả|Ã|Â|Ấ|Ầ|Ậ|Ẩ|Ẫ|Ă|Ắ|Ằ|Ặ|Ẳ|Ẵ|a|A)" },
            { val: "e", let: "(é|è|ẹ|ẻ|ẽ|ê|ế|ề|ệ|ể|ễ|É|È|Ẹ|Ẻ|Ẽ|Ê|Ế|Ề|Ệ|Ể|Ễ|e|E)" },
            { val: "i", let: "(í|ì|ị|ỉ|ĩ|Í|Ì|Ị|Ỉ|Ĩ|i|I)" },
            { val: "o", let: "(ó|ò|ọ|ỏ|õ|ô|ố|ồ|ộ|ổ|ỗ|ơ|ớ|ờ|ợ|ở|ỡ|Ó|Ò|Ọ|Ỏ|Õ|Ô|Ố|Ồ|Ộ|Ổ|Ỗ|Ơ|Ớ|Ờ|Ợ|Ở|Ỡ|o|O)" },
            { val: "u", let: "(ú|ù|ụ|ủ|ũ|ư|ứ|ừ|ự|ử|ữ|Ú|Ù|Ụ|Ủ|Ũ|Ư|Ứ|Ừ|Ự|Ử|Ữ|u|U)" },
            { val: "y", let: "(ý|ỳ|ỵ|ỷ|ỹ|Ý|Ỳ|Ỵ|Ỷ|Ỹ|y|Y)" },
            { val: "d", let: "(đ|Đ|d|D)" }];

Can't overwrite the value that has been selected

Hi,

I couldn't find a way how to overwrite the value in the text field. Instead of returning the full address. I just want to captured the postcode. I did manage replace the full address with just the postcode in the field when i click on the autocomplete result but whenever I click anywhere in the browser the field has been field with the postcode will return back to the full address. This is my codes.

$('#user_location').typeahead(null, {
  displayKey: 'description',
  source: addressPicker.ttAdapter()
});

addressPicker.bindDefaultTypeaheadEvent($('#user_location'))

$(addressPicker).bind('addresspicker:selected', function (event, result) {
  $('#user_latitude').val(result.lat());
  $('#user_longitude').val(result.lng());
  $('#user_location').val(result.nameForType('postal_code', true));
});

Dist version for using without map

You have a good amount of code just for working with the map. If a user is using the version without the map, they still have to download all of the code. Would be nice if there was a "no-map" version.

Show infowindow after selecting an address

Hello, I want to show an infowindow over the marker with the address of the selected place.

I have tried a lot of ways with no success, I'll appreciate so much your help, Thank you.

How to trigger resize event if map is in tab.

Hello. There is problem with google maps, that can be resolved triggering resize event.

google.maps.event.trigger(map, 'resize');

But as in your example, addresspicker is creating a google map, so how can I trigger that resize event, I mean what selector i can use as map identifier, to trigger map resize when bootstrap tab is shown ?

This is how map will look like, when boostrap tab is opened:
map-bug

ReferenceError: Bloodhound is not defined

I know there was already an issue about this. But I could not solve it using the old issue as a reference.

What I actually do is this:

var Bloodhound = require('typeahead.js/dist/bloodhound');
var typeahead = require('typeahead.js/dist/typeahead.jquery.js');
var addressPicker = require('typeahead-addresspicker/dist/typeahead-addresspicker.js');

But what I get is just a:

ReferenceError: Bloodhound is not defined

I even downgraded my typeahead.js version to 0.10.5 but it didn't solve the problem. Any idea what could lead to this problem?

How can I prevent or advise an user from submit an address that doesn't exist?

If user type a wrong address the console show this error:

 Uncaught TypeError: Cannot read property 'length' of null

the reason is that predictions is null.
line 148

 for (_i = 0, _len = predictions.length; _i < _len; _i++) {

it would be nice to capture this mistake so that I can advise the user.
I would like to prevent user from submit an address that doesn’t exist

getting the address back on the form

I don't know what I'm doing wrong and I'm positive someone has a simple answer to this but I'm having trouble receiving the address on the form submission. I moved the address field inside the form but it didn't help. When inspecting the form I see the address is actually in some overlaid fields of some sort but I do not see a field name that I can reference in my script.

any insight is appreciated.

Reverse geocoding?

Hey there, I played around with your old address picker before, and I thought it was pretty neat how you could set it up to drop a pin and it would figure out the address for you.

Are there any plans for implementing something like that in the new one?

Great work, by the way! Looks fantastic!

why some places is not suggested as autocompleteService

seems this is not an issue I just need to define the type that I want to use the default is geocode for all i need to add more type https://developers.google.com/places/supported_types#table3

why when I write place, some place it not shown for autocomplete,
but when I try to write it in maps.google.com, google have autocomplete for that place
is typeahead-addresspicker use different autocompleteService?
can I use the autocomplete that maps.google.com have?

so I have do some research
and i found it theres is two type autocomplete that google have
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
there is type parameter in googleautocomplete the first one use all and the second one is 'geocode'

It seems typeahead use the second one
I assume that because the resullt that the second one give
is same as when I use typeahead addresspicker

input field width?

Hi,

why is it not possible to set the input width to 100% ?

I altered the css and 100% is less wide than the 430px whilst the rest is wider as you can see.

Did I miss anything?

schermafbeelding 2014-10-25 om 20 15 19

this.map.fitBounds(response.geometry.viewport) does not work?

When I select an address I want the map to zoom to a level wich fits the viewport - I have a 200 x 200 px div to display the map. The following code works as expected:

`geocoder.geocode({ 'address': generatedAddress }, function (results, status) {
        if (status == 'OK') {
                map.setCenter(results[0].geometry.location);
                var marker = new google.maps.Marker({
                    map: map,
                    position: results[0].geometry.location
                });
                if (results[0].geometry.viewport)
                    map.fitBounds(results[0].geometry.viewport);

      } else {
          alert('Geocode was not successful for the following reason: ' + status);
      }
   });`

However when using typeahead-addresspicker, when you select an address, the maps zooms in too much, it seems like updateBoundsForPlace function is not working correctly?

Looking through the source code I'm not sure how the boundsForLocation option is working:

`initMap: ->
  if @options?.map?.gmap
    @map = @options.map.gmap
  else
    @mapOptions = $.extend
      zoom: 3
      center: new google.maps.LatLng(0, 0)
      mapTypeId: google.maps.MapTypeId.ROADMAP
      boundsForLocation: @updateBoundsForPlace
    , @options.map
    @map = new google.maps.Map($(@mapOptions.id)[0], @mapOptions)
  @lastResult = null

  # Create a hidden marker to display selected address
  markerOptions = $.extend
    draggable: true
    visible: false
    position: @map.getCenter()
    map: @map
  , @options.marker || {}
  @marker = new google.maps.Marker(markerOptions)
  if markerOptions.draggable
    google.maps.event.addListener(@marker, 'dragend', @markerDragged)`

No results showing up in Rails4 app.

Hello,

I'm trying to integrate this into a rails4 app and am having some problems.

Gemfile:
gem 'twitter-typeahead-rails'
gem 'typeahead-addresspicker-rails'

my view:

<%= form_tag("/search", method: "get") do %>
  <%= text_field_tag(:address, nil, placeholder: "location") %>
  <%= submit_tag("Search") %>
<% end %>

 <script  type="text/javascript">
                var addressPicker = new AddressPicker();
                $('#address').typeahead(null, {
                  displayKey: 'description',
                  source: addressPicker.ttAdapter()
                });
 </script>

The html that is rendered looks sort of correct but when i start typing, say "san fran" nothing happens.

<span class="twitter-typeahead" style="position: relative; display: inline-block;"><input type="text" class="tt-hint" readonly="" autocomplete="off" spellcheck="false" tabindex="-1" dir="ltr" style="position: absolute; top: 0px; left: 0px; border-color: transparent; box-shadow: none; opacity: 1; background: none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255);"><input type="text" name="address" id="address" placeholder="location" class="tt-input" autocomplete="off" spellcheck="false" dir="auto" style="position: relative; vertical-align: top; background-color: transparent;"><pre aria-hidden="true" style="position: absolute; visibility: hidden; white-space: pre; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; word-spacing: 0px; letter-spacing: 0px; text-indent: 0px; text-rendering: auto; text-transform: none;"></pre><div class="tt-menu tt-empty" style="position: absolute; top: 100%; left: 0px; z-index: 100; display: none;"><div class="tt-dataset tt-dataset-0"></div></div></span>

So, I am using twitter-bootstrap in my rails4 app. There are no errors displayed on the console. 
Prior to including `gem 'twitter-typeahead-rails'` I would get an error in the console about a missing BloodHound library. 

I'm not certain if this is an issue with bootstrap, rails4 (turbolinks, perhaps?), or an incompatible version of typeahead. Any assistance would be appreciated. 

Show address on map when page is loaded

Hey. I've been working on implementing this to a WordPress plugin, and I've stumbled upon a minor issue in this amazing extension to typeahead.

The address is saved in a database, and when/if the user is to view or edit the post, the map need to load the entered address as soon as the page is loaded. As of now it shows a default location (w/o marker) when the page is loaded.

Is there a way to get the map to show the location in the #address field as soon as it's loaded?
And possibly disable all the map controls so it shows the map alone.

typeahead-addresspicker

Typeahead autocompleted

You might want to add:

$('#address').bind("typeahead:autocompleted", addressPicker.updateMap);

to your readme as well.

Do not display the country when componentRestrictions: {country: 'US'}

If I restrict the result of my search to the US there are no good reasons to return the country.
I know the google feed also provide the country :(

I currently do it like this and I believe it's kind of dirty:

var addressPicker = new AddressPicker({autocompleteService: {types: ['(cities)'], componentRestrictions: {country: 'US'}}});
    $('input[name="zip"]').typeahead(null, {
      displayKey: function(cities) {
        var cities = cities.description.split(',');
        cities.pop();
        cities.join(',');
        return cities
        },
      source: addressPicker.ttAdapter()
    });

Let me know what you think.

Show places and location

Is there a way to show places and locations? Like when I type and Google Maps return the list of company names to chose from.

addresspicker:selected is not fired when addresspicker is used without map

    //without map
    var addressPicker = new AddressPicker();

    // instantiate the typeahead UI
    $('#address').typeahead(null, {
      displayKey: 'description',
      source: addressPicker.ttAdapter()
    });

      // we dont need to bind mapUdates, because we don't use map.
      // (commented)   addressPicker.bindDefaultTypeaheadEvent($('#address'))


    $(addressPicker).on('addresspicker:selected', function (event, result) {
         alert('event was fired');  // never fired
    })

Update Map When Address Fields are Changed?

Is there a way to update the map if the form fields are changed i.e. a user searches for an address (e.g. 1 Green Street) and selects it, the code below will pre-fill the form fields using the returned results. If the user then updates any of the fields I want to retrigger the widget so that the map gets updated so for example they change the City or Street Number in this case there is no binding to typeahead so map doesn't get updated.?

`<div class="col-sm-8">
<input id="location" type="text" value="" name="location" >

   <input id="address1" type="text" value="" name="address1" >
   <input id="address2" type="text" value="" name="address2" >
   <input id="city" type="text" value="" name="city" >
    <input id="state" type="text" value="" name="state" >
   <input id="postcode" type="text" value="" name="postcode" >
</div>
<div class="col-sm-4 hidden-xs">
     <div id="map"></div>
 </div>`




` $( function() {      
   // instantiate the addressPicker suggestion engine (based on bloodhound)
    var addressPicker = new AddressPicker({
      map: {id: '#map'}, 
      marker: {draggable: true, visible: true}, 
      zoomForLocation: 18, reverseGeocoding: true
  });

  // instantiate the typeahead UI
  $('#location').typeahead(null, {
       displayKey: 'description',
       source: addressPicker.ttAdapter()
  });

   addressPicker.bindDefaultTypeaheadEvent($('#location'))

   $(addressPicker).on('addresspicker:selected', function (event, result) {

      $('#address1').val(result.nameForType('street_number') || '' + ' ' + result.nameForType('route'));
      $('#address2').val(result.nameForType('locality') || '');
      $('#city').val(result.nameForType('postal_town'));
      $('#state').val(result.nameForType('administrative_area_level_1') || '');
      $('#postcode').val(result.nameForType('postal_code') || '');     

});`

google terms of use compliance

just received this email.

adding this to the CSS automatically add the credit mention :
.tt-dropdown-menu::after { display: block; content: "Powered by Google"; font-size: 12px; text-align: right; padding-right: 10px; color: #AAA; }


We're happy to see developers interested in our products, however, your application,XXX, violates the Google Maps APIs terms of service (https://developers.google.com/maps/terms).

In particular, your application violates clause 9.4(b), which requires developers to include "powered by Google" close to the results of Google Maps API queries where we don't provide an attribution notice automatically.

Please update your implementation so that "powered by Google" is displayed close to the results, as required by the terms of service.

We're bringing this to your attention so we can work together to make sure your implementation complies with our terms of service. If you're not able to bring your implementation into compliance with the terms, we will take action to restrict your access to the service.

Please reply to this email to let us know within the next 14 days that you are updating your implementation to comply with our terms of service.

If you have any questions, you can respond to this e-mail. We review responses to this email alias Monday to Friday Australia and India time zone, so it may take us a few days to respond to your question, particularly if there are holidays in India or Australia.

Thanks for your cooperation,
Google Maps Team

Only 5 results...

Hi,

is there something that I could modify to change the default typeahead behavior of bringing back only 5 results? I tried the parameters minLength and Limit but no luck.

Thanks in advance.

Retrieve Address on load

Hi,

congrats for one more time for your plugin. Great work.
I want to ask you if it's possible the following case. What I did so far is that by clicking on a link I get the current user lat, long. I load a new php where I Get the values and set map's lat long so the marker is properly appears on the map on the correct point. So, beside this, I'm wondering if I can trigger any function and fill in the input type field with the address based on the lat long values while the page is loaded? (like when you drag the marker and the field fills in with the address of that point)

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.