- Issue category: Lightship Maps
- Device type & OS version: Android / iOS
- Unity version: 2022.3.10f1
Description of the issue:
Hello everyone,
I am a Unity beginner and I’m trying to use Niantic’s Lightship for the first time.
My goal is to initialize the map to focus on a specific location obtained from the device’s GPS coordinates.
I have already created a class responsible for fetching GPS coordinates, and I’ve identified a step in the Awake()
method of the LightshipMapView
script that appears to be involved:
if (_startAtDefaultLocation)
{
_unitConverter = InitializeUnitConverter(_defaultLocation);
SetViewableArea(_unitConverter.MapOrigin, _viewableRadius);
}
To achieve my goal, I’d like to use the class that provides GPS coordinates to pass them to InitializeUnitConverter()
and then to SetViewableArea()
like this:
{
SerializableLatLng GPSCoordinate = new SerializableLatLng(GPSCoordProvider.lat, GPSCoordProvider.long);
_unitConverter = InitializeUnitConverter(GPSCoordinate);
SetViewableArea(_unitConverter.MapOrigin, _viewableRadius);
}
The issue I’m facing is that I can’t use an external class outside of the Niantic package. In this case, the class I’ve created as part of my assets (GPSCoordProvider) can’t be imported into Niantic’s LightshipMapView
class because it belongs to the asset package, not the Niantic package.
I have a feeling that there’s something I haven’t fully understood about how packages work, or there might be a different way to achieve my goal.
If I can figure this out I will be clear on how to carry out the rest .
I would greatly appreciate any ideas or suggestions on this matter.