jquery.geocomplete.js
function() {

      var location = this.options.location, latLng;

      if (!location) { return; }

      if (typeof location == 'string') {
        this.find(location);
        return;
      }

      if (location instanceof Array) {
        latLng = new google.maps.LatLng(location[0], location[1]);
      }

      if (location instanceof google.maps.LatLng){
        latLng = location;
      }

      if (latLng){
        if (this.map){ this.map.setCenter(latLng); }
        if (this.marker){ this.marker.setPosition(latLng); }
      }
    }
function() {

      var location = this.options.location, latLng;

      if (!location) { return; }

      if (typeof location == 'string') {
        this.find(location);
        return;
      }

      if (location instanceof Array) {
        latLng = new google.maps.LatLng(location[0], location[1]);
      }

      if (location instanceof google.maps.LatLng){
        latLng = location;
      }

      if (latLng){
        if (this.map){ this.map.setCenter(latLng); }
        if (this.marker){ this.marker.setPosition(latLng); }
      }
    }
function ( ) { var location = this . options . location , latLng ; if ( ! location ) { return ; } if ( typeof location == 'string' ) { this . find ( location ) ; return ; } if ( location instanceof Array ) { latLng = new google . maps . LatLng ( location [ 0 ] , location [ 1 ] ) ; } if ( location instanceof google . maps . LatLng ) { latLng = location ; } if ( latLng ) { if ( this . map ) { this . map . setCenter ( latLng ) ; } if ( this . marker ) { this . marker . setPosition ( latLng ) ; } } }
Set the initial location of the plugin if the `location` options was set. This method will care about converting the value into the right format.
Set the initial location of the plugin if the location options was set . This method will care about converting the value into the right format .