<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Geocoder/GeocoderConstructor",
  "metadataVersion" : "0.1.0",
  "role" : "Constructor",
  "symbol" : {
    "kind" : "Constructor",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instctr/mapkit.Geocoder/GeocoderConstructor"
  },
  "title" : "new Geocoder(options)"
}
-->

# new Geocoder(options)

Creates a geocoder object and sets optional language and user location properties.

```
constructor(options?: ServiceConstructorOptions);
```

## Discussion

To use geocoding, create an instance of [`Geocoder`](/documentation/MapKitJS/Geocoder). Optionally, you can set the [`language`](/documentation/MapKitJS/ServiceConstructorOptions/language) and [`getsUserLocation`](/documentation/MapKitJS/ServiceConstructorOptions/getsUserLocation) properties of a [`Geocoder`](/documentation/MapKitJS/Geocoder) object on initialization, as the following examples shows:

```javascript
const geocoder = new mapkit.Geocoder({
    language: "en-GB",
    getsUserLocation: true
});
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)