# Initialising map to location without using default

**URL:** <https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943>\
**Category:** I'm Stuck\
**Created:** [November 4, 2024, 1:20pm UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943 "2024-11-04T13:20:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matteo](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Matteo](https://community.nianticspatial.com/u/Matteo)\
**Post date:** [November 4, 2024, 1:20pm UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/1 "2024-11-04T13:20:59Z")

</div>

- **Issue category** : Lightship Maps
- **Device type & OS version** : Android
- **Host machine & OS version** : Windows 11
- **Issue Environment** : Unity Editor
- **Xcode version** :
- **ARDK version** :
- **Unity version** : 2022.50f

Description of the issue:  
Hello !

I’m trying to initialise the map at given coordinates. I saw [this topic](https://community.nianticspatial.com/t/initializing-lightship-map-with-runtime-custom-coordinates/3899) suggesting to use the SetViewableArea() method, but it doesn’t work, because the \_unitConverter field is null.

I’ve also tried using SetMapCenter but nothing happens, even when calling RefreshMap() after.  
If I leave “Start At Default Location” to true, the map gets initialised perfectly. But I want to initialise it based on User Input, on this side of the app.

Any advice for having this behaviour? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [November 4, 2024, 6:13pm UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/2 "2024-11-04T18:13:45Z")

</div>

Hi Mattéo,

Unfortunately, this is a known bug with the current release of Lightship Maps. A workaround you can try is disabling the game object containing the map, setting the default location coordinates to the user’s input, leaving `Start at Default Location` to true, and then enabling the game object.

Kind regards,  
Maverick L.

---

<div class="post-metadata">

**Author:** ![Matteo](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Matteo](https://community.nianticspatial.com/u/Matteo)\
**Post date:** [November 5, 2024, 8:15am UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/3 "2024-11-05T08:15:47Z")

</div>

Thank you Maverick. Good, I’m not crazy ! But the problem is, the \_defaultLocation field is private. You can’t change it through code.

I guess I could copy the class and make another one with these changes, in the meantime.

---

<div class="post-metadata">

**Author:** ![Matteo](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Matteo](https://community.nianticspatial.com/u/Matteo)\
**Post date:** [November 5, 2024, 9:06am UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/4 "2024-11-05T09:06:18Z")

</div>

Here’s what I used to make it work :

```auto
public void SetMapOrigin(float lat, float lng)
    {
        Debug.Log($"Setting map origin to lat : {lat} and lng : {lng}");
        SerializableLatLng latLng = new(lat, lng);
        lightShipMapView.defaultLocation = latLng;
        lightShipMapView.gameObject.SetActive(true);
    }

```

Problem is you’ve got to make the field public. If the package changes, that change will be reverted as well.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [November 5, 2024, 6:19pm UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/5 "2024-11-05T18:19:40Z")

</div>

You’re very welcome! In a future release of Lightship Maps this will be corrected. I’m glad to hear you got it working!

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [March 5, 2026, 11:44pm UTC](https://community.nianticspatial.com/t/initialising-map-to-location-without-using-default/4943/6 "2026-03-05T23:44:21Z")

</div>

Closed on March 5, 2026, 11:44pm UTC

Age
