<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Service",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "cl/mapkit.Service"
  },
  "title" : "Service"
}
-->

# Service

An abstract class that provides common interfaces for service objects.

```
abstract class Service
```

## Discussion

You can’t initialize an abstract class. Use specific service classes to create service objects.

## Topics

### Instance Properties

[`get getsUserLocation(): boolean;
set getsUserLocation(value: boolean);`](/documentation/MapKitJS/Service/getsUserLocation)

A Boolean value that indicates whether the request returns results near a person’s location.

[`get language(): string | null;
set language(value: string | null);`](/documentation/MapKitJS/Service/language)

A language ID that determines the language to use for displaying addresses.

### Instance Methods

[`cancel(promise: Promise<unknown>): boolean;`](/documentation/MapKitJS/Service/cancel)

Cancels a request using the provided request promise.

## Relationships

### Inherited By

[`PlaceLookup`](/documentation/MapKitJS/PlaceLookup)

[`Directions`](/documentation/MapKitJS/Directions)

[`PointsOfInterestSearch`](/documentation/MapKitJS/PointsOfInterestSearch)

[`Geocoder`](/documentation/MapKitJS/Geocoder)

[`Search`](/documentation/MapKitJS/Search)

---

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)