Beispiel #1
0
 public function actionLoadPeta($idWil)
 {
     //\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     $model = GeoserverUrl::findOne(['id_wilayah' => $idWil]);
     $peta = file_get_contents($model->url);
     return $peta;
 }
Beispiel #2
0
 /**
  * Finds the GeoserverUrl model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return GeoserverUrl the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = GeoserverUrl::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }