

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 搭配 Amazon Location 使用 MapLibre 工具和相關程式庫
<a name="dev-maplibre"></a>

[MapLibre](https://maplibre.org/) 主要是用於在 Web 或行動應用程式中顯示地圖的轉譯引擎。不過，它還包含對外掛程式的支援，並提供使用 Amazon Location 其他方面的功能。以下說明您可以根據要使用的區域或位置使用的工具。

**注意**  
若要使用 Amazon Location 的任何方面，請[AWS 為您要使用的語言安裝 SDK](dev-by-language.md)。
+ **地圖**

  若要在應用程式中顯示地圖，您需要一個地圖轉譯引擎，該引擎將使用 Amazon Location 提供的資料，並繪製至螢幕。地圖轉譯引擎也提供平移和縮放地圖的功能，或將標記或推送銷和其他註釋新增至地圖。

  Amazon Location Service 建議使用 [MapLibre](https://github.com/maplibre/maplibre-gl-js) 轉譯引擎轉譯地圖。MapLibre GL JS 是一種在 JavaScript 中顯示映射的引擎，而 MapLibre Native 提供 iOS 或 Android 的映射。

  MapLibre 也有外掛程式生態系統來擴展核心功能。如需詳細資訊，請造訪 https：//[https://maplibre.org/maplibre-gl-js/docs/plugins/](https://maplibre.org/maplibre-gl-js/docs/plugins/)。
+ **Places 搜尋**

  若要更輕鬆地建立搜尋使用者介面，您可以使用適用於 Web 的 [MapLibre 地理編碼器](https://github.com/maplibre/maplibre-gl-geocoder) (Android 應用程式可以使用 [Android Places 外掛程式](https://github.com/maplibre/maplibre-plugins-android/tree/master/plugin-places))。

  使用 [Amazon Location for MapLibre 地理編碼器程式庫](https://github.com/aws-geospatial/amazon-location-for-maplibre-gl-geocoder?tab=readme-ov-file)，簡化`amazon-location-for-maplibre-gl-geocoder`在 JavaScript 應用程式中搭配 使用 Amazon Location 的程序。

  如需詳細資訊，請參閱[使用 Amazon Location MapLibre Geocoder GL 外掛程式](dev-maplibre-geocoder.md)。
+ **路由**
+ **地理圍欄和追蹤器**

  MapLibre 沒有任何用於地理圍欄和追蹤的特定轉譯或工具，但您可以使用轉譯功能和[外掛程式](https://maplibre.org/maplibre-gl-js/docs/plugins/)在地圖上顯示地理圍欄和追蹤的裝置。

  追蹤的裝置可以使用 [MQTT](tracking-using-mqtt.md) 或手動傳送更新至 Amazon Location Service。可以使用 回應地理圍欄事件[AWS Lambda](https://docs.aws.amazon.com/lambda/)。

許多開放原始碼程式庫可用於為 Amazon Location Service 提供額外的功能，例如提供空間分析功能的 [Turf](https://github.com/Turfjs/turf)。

許多程式庫使用開放的標準 [GeoJSON](https://geojson.org/) 格式資料。Amazon Location Service 提供程式庫，可將回應轉換為 GeoJSON，以用於 JavaScript 應用程式。如需詳細資訊，請參閱[適用於 Amazon Location Service SDKs 和架構](dev-sdks.md)。