Пример #1
0
    public float ConvertX(float x)
    {
        float xvalue = x;

        xValueConverted = CoordConversion.calcLon(x);
        return(xValueConverted);
    }
Пример #2
0
    // Updates the player on the google map
    public void updatePlayer(float x, float z)
    {
        float lon = CoordConversion.calcLon(x);
        float lat = CoordConversion.calcLat(z);

        markers[0].locations[0].longitude = lon;
        markers[0].locations[0].latitude  = lat;
        centerLocation.latitude           = lat;
        centerLocation.longitude          = lon;
    }
Пример #3
0
    // Adds a marker to the google map
    public void addMarker(float y, float x, int markerType)
    {
        switch (markerType)
        {
        case 0:
            markers[0].color = GoogleMapColor.red;
            markers[0].label = "Player";
            break;

        case 1:
            markers[1].color = GoogleMapColor.blue;
            markers[1].label = "Water";
            markerCount[1]++;
            break;

        case 2:
            markers[markerType].color = GoogleMapColor.green;
            markers[markerType].label = "Algae";
            markerCount[2]++;
            break;

        case 3:
            markers[markerType].color = GoogleMapColor.yellow;
            markers[markerType].label = "Sand";
            markerCount[3]++;
            break;

        case 4:
            markers[markerType].color = GoogleMapColor.orange;
            markers[markerType].label = "Coral";
            markerCount[4]++;
            break;

        case 5:
            markers[markerType].color = GoogleMapColor.brown;
            markers[markerType].label = "Rock";
            markerCount[5]++;
            break;
        }
        markers[markerType].locations[markerCount[markerType]].longitude = CoordConversion.calcLon(x);
        markers[markerType].locations[markerCount[markerType]].latitude  = CoordConversion.calcLat(y);
        markers[markerType].size = GoogleMapMarker.GoogleMapMarkerSize.Mid;
    }