private void HandlePOIInput(object sender, POIEventArgs e) { model.AddPOILocation(e.GETPoiCoordinatesObject()); mapMenuController = transform.GetComponent <MapMenuController>(); mapMenuController.AddPOIQuery(e.GETPoiCoordinatesObject()); }
protected virtual void OnPoiModified(POIEventArgs e) { if (PoiModified != null) { PoiModified(this, new POIEventArgs(pointsOfInterests)); } }
public void Zoom() { //var mapScene = new MapSceneOfLocationAndZoomLevel(_mapPin.Location, _map.ZoomLevel + 1.01f); //_map.SetMapScene(mapScene); string name = _mapPin.transform.GetChild(0).GetChild(0).gameObject.GetComponent <TextMeshPro>().text; POICoordinatesObject poiCoordinatesObject = new POICoordinatesObject(_mapPin.Location.LatitudeInDegrees, _mapPin.Location.LongitudeInDegrees, name, transform.gameObject, "https://cdn.pixabay.com/photo/2018/09/23/18/30/drop-3698073_960_720.jpg"); Debug.Log("zoom: " + poiCoordinatesObject.getCoordinates()); var eventArgs = new POIEventArgs(poiCoordinatesObject); // Dispatch the 'position changed' event OnMapObject(this, eventArgs); }
private void GenerateLatLonObject(LatLonAlt data) { var mapPin = Instantiate(_mapPinPrefab); mapPin.Location = data.LatLon; _mapPinLayer.MapPins.Add(mapPin); POICoordinatesObject poiCoordinatesObject = new POICoordinatesObject(data.LatitudeInDegrees, data.LongitudeInDegrees, 0); poiCoordinatesObject.setMapPin(mapPin); poiCoordinatesObject.setName(data.LatLon.LatitudeInDegrees.ToString() + " " + data.LongitudeInDegrees); var EventArgs = new POIEventArgs(poiCoordinatesObject); OnPOI(this, EventArgs); }
private void POItoQuery(object sender, POIEventArgs e) { IQueryMenuController iqQueryMenuController = transform.GetComponent <QueryMenuController>(); iqQueryMenuController.addQuery(e.GETPoiCoordinatesObject()); }