Topic: Location Service 3D Marker

Hi..
I added the Online Maps Location Service Script and enabled the 3D marker. It works like expected and the marker will be shown centered on the map. Is it possible to show the marker always at the bottom? If i use a 2D Marker, there is an option for the align, but it don't work for me, as the marker is always centered. But if i use the 3D marker the option is missing anyway.

Michael

Re: Location Service 3D Marker

Hello.

3D markers do not have align. It's just not necessary.

You can work around this in the following way:
Create a new GameObject. Add your prefab as a child of the new GameObject.
Move the inner GameObject up to «y = 0» was at the bottom of GameObject.
Create prefab from the outer GameObject and use it as a 3D marker prefab.

Kind Regards,
Infinity Code Team.

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

Re: Location Service 3D Marker

Sorry, i did not clearly say what i want.
My goal is to have the marker always at the bottom of the display. I did not mean the vertical position. It seems i misunderstood the align setting smile

Re: Location Service 3D Marker

What do you mean «marker always at the bottom of the display»?
For what you need marker in this case?

Kind Regards,
Infinity Code Team.

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

Re: Location Service 3D Marker

I mean the marker of the location service, which is the player in my case.  This marker shows the current position always centered on the map / display. But i want it at the bottom of the screen.

Re: Location Service 3D Marker

I do not know for what you need it, but in any case give an example:

using UnityEngine;

public class ShowMarkerAtBottom:MonoBehaviour
{
    private void Start()
    {
        OnlineMapsControlBase.instance.allowUserControl = false;
        OnlineMapsLocationService.instance.OnLocationChanged += OnLocationChanged;
    }

    private void OnLocationChanged(Vector2 vector2)
    {
        double px, py;
        Vector2 p = OnlineMapsLocationService.instance.position;
        OnlineMaps map = OnlineMaps.instance;
        map.projection.CoordinatesToTile(p.x, p.y, map.zoom, out px, out py);
        py -= map.height / OnlineMapsUtils.tileSize / 2;
        map.projection.TileToCoordinates(px, py, map.zoom, out px, out py);
        map.SetPosition(px, py);
    }
}

P.S. Online Maps Location Service / Update Map Position - OFF.

Kind Regards,
Infinity Code Team.

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