Topic: Get Local unity position from Coordintes via map instance.

Ive just started working with online maps. The project im working on has 2 different map viewports. Im am using a custom solution to place markers. Just spawning sprites at a specific location in the unity space. I was using this to do it:

Vector3 markerLocalPos = OnlineMapsControlBaseDynamicMesh.instance.GetWorldPosition(positionLongitudeLatitude.x, positionLongitudeLatitude.y);

However I need some way to specify to use the current instance of OnlineMaps to get the position becasue as of right now its spawning all my markers on the main map rather than the second map.

Re: Get Local unity position from Coordintes via map instance.

Hello.

mapInstance.control.GetWorldPosition(...);
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Get Local unity position from Coordintes via map instance.

Hi. I cant seem to access that 'GetWorldPosition()' method from instance.control. Looking in the documentation it seems the 'GetWorldPosition' is only in the 'OnlineMapsControlBaseDynamicMesh' Class. Is there anyway to access this class from the instance of OnlineMaps?

Re: Get Local unity position from Coordintes via map instance.

I meant that each map stores a reference to the control used, and control to the map.
In this case, you need to cast the control type to OnlineMapsControlBaseDynamicMesh.

(mapInstance.control as OnlineMapsControlBaseDynamicMesh).GetWorldPosition(...);
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Get Local unity position from Coordintes via map instance.

Thats so awesome thanks so much.