private IKmlModel LoadTrainModel(/*string modelID, string filePath*/) { if (this.trainModel == null) { if (this.geWebBrowser == null) return null; var model_file = this.geWebBrowser.FetchKmlSynchronous("http://localhost:50500/m12.kmz"); if (model_file == null) { return null; } ge.getFeatures().appendChild(model_file); // (model_file as IKmlObject).getType() == "KmlFolder" if ((this.trainModel = TrainModelLoaded()) == null) { return null; } } return this.trainModel; }
private void SetTrainModel(IKmlModel model, double lat, double lon, double azimuth = 0) { if (model == null) { return; } model.getLocation().setLatLngAlt(lat, lon, 0); model.setAltitudeMode(ge.ALTITUDE_RELATIVE_TO_GROUND); // Model is rotated on 180° if (0 <= azimuth && azimuth < 180) { azimuth += 180; } else if (180 <= azimuth && azimuth < 360) { azimuth -= 180; } model.getOrientation().setHeading(azimuth); }
private IKmlModel LoadTrainModel() { if (this.trainModel == null) { if (this.geWebBrowser == null) return null; var model_file = this.geWebBrowser.FetchKmlSynchronous(/*trainModelFile*/"http://localhost:50500/m12.kmz"); if (model_file == null) { return null; } ge.getFeatures().appendChild(model_file); if ((this.trainModel = TrainModelLoaded()) == null) { return null; } } this.trainModel.getLocation().setLatLngAlt(60, 60, 0); return this.trainModel; }