Topic: Changing the position of a 3d marker
Hey,
this might be a stupid question, but how would I go on about modifying the coordinates(Lat , long) of a marker once I have instantiated it?
Thanks
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Changing the position of a 3d marker
Hey,
this might be a stupid question, but how would I go on about modifying the coordinates(Lat , long) of a marker once I have instantiated it?
Thanks
Hello.
marker.SetPosition(newLongitude, newLatitude);http://infinity-code.com/doxygen/online … ac75c05eb0
hey,
this is what I am using : this script is attached to the marker object
public void banish(double lng, double lat)
{
var control = GetComponent<OnlineMapsMarker3DInstance> ();
control.marker.SetPosition (lng, lat);
}
this updates the latitude and longitude values int the inspector under the Online Maps Marker 3d Instance script property , but the object disables for some reason, is there anything here I am missing?
thanks
Hello.
GameObject is disabled when the marker outside the rect of map.
The most common cause - confused latitude and longitude.
Please check the coordinates that you set.
I have made sure they are right, and even if the values do get interchanged it should still be within the rect of map, both lat and long values are within 90 , -90 range.
Your coordinates are in Antarctica.
Are you sure this is the place that you need?
https://www.google.ru/maps/@-73.49,34.86,5z?hl=en
it's a game about spell cast, you can 'banish' a player using a spell and it will move that player randomly anywhere around the world, so it doesn't matter where it is
In this case, go to the marker and GameObject will be enabled.
Starting from Online Maps v2.5.0.2 beta you can make that 3D marker will not disabled at all:
marker3D.checkMapBoundaries = false;Infinity Code Forum → Online Maps Help → Changing the position of a 3d marker
Powered by PunBB, supported by Informer Technologies, Inc.