// Start is called before the first frame update //INPUT // Update is called once per frame void Update() { if (update_BLT_text) { BLT_Text.text = " Latitude: " + Latitide_text + " Longitude: " + Longitude_text + " Heading: " + heading_text; update_BLT_text = false; } // If the primary mouse button was pressed this frame if (Input.GetMouseButtonDown(0)) { //Debug var eventArgs = new GPSDataReceivedEventArgs(currentLatitude, currentLongitude, currentheading); OnReceived(this, eventArgs); } if (currentCoordinates.Count != 0) { this.currentLatitude = this.currentCoordinates[coo_id].getLat(); this.currentLongitude = this.currentCoordinates[coo_id].getLon(); this.currentheading = this.currentCoordinates[coo_id].gethead(); var eventArgs = new GPSDataReceivedEventArgs(this.currentLatitude, this.currentLongitude, this.currentheading); OnReceived(this, eventArgs); } }
private void ShowMap(object sender, GPSDataReceivedEventArgs e) { IMapController mapController = GetComponent <MapController>(); mapController.GETMapView().setGameObjectVisibility(true); mapController.GETMapView().EnableRadial(); mapController.GETMapView().ZoomIntoPoint(e.latitude, e.longitude); }
public void ShowOnMap(PictureAttribute attribute) { setCollectionVisibility(false); ShowPictureObject.SetActive(false); var EventArgs = new GPSDataReceivedEventArgs(attribute.latitude, attribute.longitude, 0); OnShowOnMap(this, EventArgs); HandMenu.SetActive(false); HandMenuMap.SetActive(true); MapMenuInit(); Debug.Log("Clicked ShowOnmap"); }
// Called when GPSdata is received public void HandleGPSReceived(object sender, GPSDataReceivedEventArgs e) { // Updating the model model.SetGPSCoordinates(e.latitude, e.longitude, e.heading); IMapModel mapModel = transform.GetComponent <MapController>().GETMapModel(); mapModel.setCurrentLocation(e.latitude, e.longitude, e.heading); IMapView mapView = transform.GetComponent <MapController>().GETMapView(); mapView.setCurrentPositionPin(e.latitude, e.longitude, e.heading); IMapMenuView mapMenuView = transform.GetComponent <MapMenuController>().GETMapMenuView(); mapMenuView.setCurrentPositionPin(e.latitude, e.longitude, e.heading); mapMenuView.MiniMapRender(); IResultPanelModel resultPanelModel = transform.GetComponent <ResultPanelController>().GETResultPanelModel(); resultPanelModel.setLatLon(e.latitude, e.longitude); }