Topic: Marker not showing
I have three scripts:
Script 1, getmylocation() = gets my current location and creates a marker for where I am
OnlineMapsMarker fred = new OnlineMapsMarker();
fred.SetPosition(myLng, myLat);
fred.texture = meMarker;
OnlineMapsMarkerManager.AddItem(fred);
markerLng = myLng; //Statics
markerLat = myLat;
Script 2, CreateMarkerOnClick() = basically the default script supplied out of the box. It gets the position of the lat,lng and stores it in a global static, but doesnt create a marker, instead it opens a new panel.
Script3, SubmitReport() = If report submitted correctly, then marker is created using effectively the same code as in script1. Working as the marker is created and shown in the Online Maps Marker Manager Component, but doesnt show on the map.
If I try use the OnlineMapsMarkerManager.CreateItem(getMyLocation.markerLng, getMyLocation.markerLat, label), it comes up with an error:
OnlineMapsMarker.Init (System.Nullable`1[T] width, System.Nullable`1[T] height) (at Assets/Infinity Code/Online maps/Scripts/Markers/Instances/OnlineMapsMarker.cs:377)
OnlineMapsMarkerManager.Create (System.Double longitude, System.Double latitude, UnityEngine.Texture2D texture, System.String label) (at Assets/Infinity Code/Online maps/Scripts/Markers/Managers/OnlineMapsMarkerManager.cs:112)
OnlineMapsMarkerManager.CreateItem (System.Double longitude, System.Double latitude, System.String label) (at Assets/Infinity Code/Online maps/Scripts/Markers/Managers/OnlineMapsMarkerManager.cs:64)