Topic: User Location

Hello Dears,
How can i get current User Location and zoom it?

Re: User Location

Hello.

Add an Online Maps Location Service component.

If you want to get the user's location using a script, use OnlineMapsLocationServiceBase.position.
http://infinity-code.com/doxygen/online … 444f547053
Example:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

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

3 (edited by arjangmehrdad 2018-02-11 18:36:24)

Re: User Location

thanks for reply.
i have an another question. how to create a route to a location from user location?
thanks a lot.

Re: User Location

Example of how to find a route:
http://infinity-code.com/atlas/online-m … ample.html

Use OnlineMapsLocationServiceBase.position as the starting position to find the route from the current user location.

Kind Regards,
Infinity Code Team.

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

Re: User Location

Alex Vertax wrote:

Example of how to find a route:
http://infinity-code.com/atlas/online-m … ample.html

Use OnlineMapsLocationServiceBase.position as the starting position to find the route from the current user location.

thanks a lot Alex Vertax,please give me a code that find a rout from user location,i can't do it!

Re: User Location

Vector2 origin = OnlineMapsLocationService.instance.position;
var destination = new Vector2(longitude, latitude); // Vector2 or string (address of destination)
OnlineMapsGoogleDirections.Find(origin, destination).OnComplete += OnGoogleDirectionsComplete;
Kind Regards,
Infinity Code Team.

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

Re: User Location

thanks for reply.
how can i access to 2d Markers longitude and latitude ?

Re: User Location

OnlineMapsMarkerBase.GetPosition
http://infinity-code.com/doxygen/online … 20d4968b61

Kind Regards,
Infinity Code Team.

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

Re: User Location

hello dear
my maps is very slow on change location or move on map with mouse,but my internet speed is high,how can i solve this problem?

Re: User Location

There can be so many reasons why your application is slow.
What size of the map are you using?
Which tile provider do you use?
Any other information can also be useful.

Kind Regards,
Infinity Code Team.

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

Re: User Location

size of map = 1024 * 1024
provider = google maps

and in the scene just have 2 button.

Re: User Location

1024x1024 are slow?!
Very interesting.

What version of Online Maps do you use?
Please send screenshots of Online Maps, used control, Online Maps Location Service.

Kind Regards,
Infinity Code Team.

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