コード例 #1
0
    private void OnClickFunction()
    {
        //businessesToLoad.Clear();

        //Here we would populate the business locations in address or LatLong
        //Here i will add dummy values based off of the coordinates 40.0188, -105.27818
        //in this case its a small local toy store (turn 180 from starting position) really close
        Google.Maps.Coord.LatLng fakeBusinessLoc = new Google.Maps.Coord.LatLng(40.0182, -105.2769);
        AddBusiness("Into the Wind", "Free Fries", fakeBusinessLoc);
        AddBusiness("Sforno Trattoria Romana", "None", new Google.Maps.Coord.LatLng(40.017992, -105.278267));

        //Now we set all the buildings to be marked accordingly
        for (int i = 0; i < businessesToLoad.Count; i++)
        {
            MarkStructures(i);
        }
    }
コード例 #2
0
    public void AddBusiness(string name, string deals, Google.Maps.Coord.LatLng location)
    {
        Merchant m = new Merchant(name, location);

        businessesToLoad.Add(m);
    }
コード例 #3
0
    // private void Awake() {
    //    MapsService = GetComponent<Google.Maps.MapsService>();
    // }

    private Vector3 GetBuildingPosition(int index)
    {
        Google.Maps.Coord.LatLng latLng = businessesToLoad[index].merchantLocation;
        return(MapsService.Coords.FromLatLngToVector3(latLng));
    }
コード例 #4
0
 public Merchant(string n, Google.Maps.Coord.LatLng l)
 {
     this.merchantLocation = l;
     this.merchantName     = n;
 }