# Lightship maps integration with VPS Coverage API - HowToGuide wrong?

**URL:** <https://community.nianticspatial.com/t/lightship-maps-integration-with-vps-coverage-api-howtoguide-wrong/3682>\
**Category:** I'm Stuck\
**Created:** [July 5, 2023, 11:01am UTC](https://community.nianticspatial.com/t/lightship-maps-integration-with-vps-coverage-api-howtoguide-wrong/3682 "2023-07-05T11:01:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre\_Dirks](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Andre\_Dirks](https://community.nianticspatial.com/u/Andre_Dirks)\
**Post date:** [July 5, 2023, 11:01am UTC](https://community.nianticspatial.com/t/lightship-maps-integration-with-vps-coverage-api-howtoguide-wrong/3682/1 "2023-07-05T11:01:59Z")

</div>

_Include the following details (edit as applicable):_

- **Issue category** : ARDK Documentation / Unity How-To Guides
- **Device type & OS version** : Android
- **Host machine & OS version** : Windows 10
- **Issue Environment** : Engine
- **Xcode version** :
- **ARDK version** : 2.5.2
- **Unity version** : 2021.3.24f1 (LTS)

Description of the issue:  
I follow this how to Guide ([How to Integrate the VPS Coverage API with Lightship Maps | Niantic Lightship](https://lightship.dev/docs/beta/maps/unity/how-to/integrate_vps)), however, I am stuck on Converting the LocationInfo “mapCenter” to LatLng. The proposed method in the HowToGuide “ToArdkLatLng()” does not seem to exist according to error message. I also could not find said method in the LatLng namespace. Can you help me out?

‘LatLng’ does not contain a definition for ‘ToArdkLatLng’ and no accessible method accepting a first argument of type ‘LatLng’ could be found (are you missing a using directive or an assembly reference?)

I ran into some other issues before, so I had to add other namespaces, here are my current ones in the script:  
Niantic.Lightship.Maps  
Niantic.ARDK.VPSCoverage  
Niantic.ARDK.Extensions  
Niantic.ARDK  
ArdkLatLng = Niantic.ARDK.LocationService.LatLng  
MapsLatLng = Niantic.Lightship.Maps.Core.Coordinates.LatLng  
Niantic.Lightship.Maps.MapLayers.Components  
Niantic.ARDK:LocationService  
System  
System.Collections  
System.Collections.Generic  
UnityEngine

---

<div class="post-metadata">

**Author:** ![Andre\_Dirks](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Andre\_Dirks](https://community.nianticspatial.com/u/Andre_Dirks)\
**Post date:** [July 5, 2023, 12:24pm UTC](https://community.nianticspatial.com/t/lightship-maps-integration-with-vps-coverage-api-howtoguide-wrong/3682/2 "2023-07-05T12:24:52Z")

</div>

EDIT: The script at the end of the How-To Guide is correct. It is only in the step by step guide, that the code is wrong.

Fixed it, here’s how I resolved it:

public void RequestAreasAroundMapCenter(){  
var mapCenter = \_mapView.MapCenter;  
var mapCenterARDK = ConvertArdkLatLng(mapCenter);  
\_coverageClient.RequestCoverageAreas(mapCenterARDK, \_queryRadius, OnAreasResult);  
}

public void OnAreasResult(CoverageAreasResult areaResult){  
…

```
foreach(var area in areaResult.Areas){
            var areaID = area.LocalizationTargetIdentifiers[0];
            var areaShapeMaps = ConvertMapsLatLng(area.Shape)
           _areaBorder.DrawLoop(areaShapeMaps, areaID)

```

}

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/system/32/13_2.png) [@system](https://community.nianticspatial.com/u/system)\
**Post date:** [July 5, 2023, 2:25pm UTC](https://community.nianticspatial.com/t/lightship-maps-integration-with-vps-coverage-api-howtoguide-wrong/3682/3 "2023-07-05T14:25:06Z")

</div>

Closed on July 5, 2023, 2:25pm UTC

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.
