Skip to content

suggestion to add to documentation  #131

Open
@jehadja

Description

@jehadja

General Information

it will be helpful to add how to make locale result for the package i see a lot of question even some people make pull request etc..
so its better to make it clear its possible to achieve without code changing
code shall be as following

use Geocoder\Query\GeocodeQuery;

$geocoder =   app('geocoder');
$provider = $geocoder->getProvider();
$geocoder = new \Geocoder\StatefulGeocoder($provider,'ar');
$results = $geocoder->geocode('London');

result :

AddressCollection {#1060 ▼
  -locations: array:1 [▼
    0 => GoogleAddress {#1062 ▼
      -id: "ChIJdd4hrwug2EcRmSrV3Vo6llI"
      -locationType: "APPROXIMATE"
      -resultType: array:2 [▶]
      -formattedAddress: "لندن، المملكة المتحدة"
      -streetAddress: null
      -intersection: null
      -political: "المملكة المتحدة"
      -colloquialArea: null
      -ward: null
      -neighborhood: null
      -premise: null
      -subpremise: null
      -naturalFeature: null
      -airport: null
      -park: null
      -pointOfInterest: null
      -establishment: null
      -subLocalityLevels: AdminLevelCollection {#1059 ▶}
      -coordinates: Coordinates {#1067 ▶}
      -bounds: Bounds {#1066 ▶}
      -streetNumber: null
      -streetName: null
      -subLocality: null
      -locality: "لندن"
      -postalCode: null
      -adminLevels: AdminLevelCollection {#1061 ▶}
      -country: Country {#1049 ▶}
      -timezone: null
      -providedBy: "google_maps"
    }
  ]
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions