public float ConvertZ(float z) { float zvalue = z; zValueConverted = CoordConversion.calcLat(z); return(zValueConverted); }
// 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; }
// 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; }