Setting the device location as the default position before loading the map

Include the following details (edit as applicable):

  • Issue category: Lightship Maps
  • Device type & OS version: Android / iOS
  • Host machine & OS version: Mac
  • Issue Environment : On Device
  • Xcode version: 15.0.1
  • ARDK version:
  • Unity version: 2023.1.19f1

Description of the issue:
In our game, we are making backend requests based on the user’s location as soon as the map is loaded. However, these backend requests are currently set to be made after the map is loaded. The issue we are facing is that the map initially opens at the default location coordinates and then teleports to the user’s actual location. We want the map to start directly at the user’s location. When the page is first opened, 48 tiles are loaded, but after the teleport, 48 onmaptileload and onmaptileremove requests are triggered, causing unnecessary load.

To address the issue, we have tried the following:

  • Set the “Start at default location” parameter to false. Result: The map did not load at all.
  • Added an interim login screen to obtain the user’s location before opening the map page and tried to pass the parameter in the scene redirection. Result: Objects we wanted to create on the map appeared for both the initial default location and the user’s location, creating a significant backend load.

Hi Sarcan,

I understand how that can be counterproductive. As a workaround, could you try keeping the map disabled until you obtain the user’s coordinates? Once you do that, you would supply the map component with those coordinates as the default location and then enable it. Since this is undesirable behavior, I’ll make a note of this so we can get this sorted out in a future release of Maps.

Kind Regards,
Maverick L.

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