diff --git a/src/Controller/TYPYPMapController.php b/src/Controller/TYPYPMapController.php new file mode 100644 --- /dev/null +++ b/src/Controller/TYPYPMapController.php @@ -0,0 +1,44 @@ + 'typ_ypmap', + '#latitude' => $latitude, + '#longitude' => $longitude, + '#height' => $height, + '#width' => $width, + '#bypass' => $_GET['bypass'], + '#LandingPage_URL' => $LandingPage_URL + ); + + return $display; + } +} \ No newline at end of file diff --git a/templates/typ-ypmap.html.twig b/templates/typ-ypmap.html.twig new file mode 100644 --- /dev/null +++ b/templates/typ-ypmap.html.twig @@ -0,0 +1,75 @@ + + + + + + แผนที่ + + + + + + + + + + + + + +{% if latitude||longitude %} + + +
+ {%if bypass %} + + + + {% endif %} +
+ + {% endif %} + diff --git a/typ_profile.module b/typ_profile.module --- a/typ_profile.module +++ b/typ_profile.module @@ -1,52 +1,62 @@ array( 'variables' => array( 'profile' => NULL, 'prodescription' => NULL, 'catalog' => NULL, 'type' => NULL, 'promotion' => NULL, 'breadcrumbs' => NULL, 'base_path' => NULL, 'facebook_comment' => NULL, ) ), 'typ_promotion' => array( 'variables' => array( 'url' => NULL ) + ), + 'typ_ypmap' => array( + 'variables' => array( + 'latitude' => NULL, + 'longitude' => NULL, + 'height' => NULL, + 'width' => NULL, + 'bypass' => NULL, + 'LandingPage_URL' => NULL + ) ) ); } diff --git a/typ_profile.routing.yml b/typ_profile.routing.yml --- a/typ_profile.routing.yml +++ b/typ_profile.routing.yml @@ -1,31 +1,38 @@ #typ_profile_search: # path: '/profile/{bizid}' # defaults: # _controller: '\Drupal\typ_profile\Controller\TYPProfileController::profilePage' # _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::profileTitle' # requirements: # _permission: 'access content' typ_profile.page: path: '/profile/{bizid}' defaults: _controller: '\Drupal\typ_profile\Controller\TYPProfileController::profilePage' _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::profileTitle' requirements: _permission: 'access content' +typ_profile.ypmap: + path: '/api/ypmap' + defaults: + _controller: '\Drupal\typ_profile\Controller\TYPYPMapController::ypmap' +# _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::profileTitle' + requirements: + _permission: 'access content' #typ_profile_promotion: # path: '/profile/get-promotion' # defaults: # _controller: '\Drupal\typ_profile\Controller\TYPProfileController::getPromotion' # _title_callback: '\Drupal\typ_profile\Controller\TYPProfileController::getTitlePromotion' # requirements: # _permission: 'access content' #typ_profile_redirect: # path: '/profile' # defaults: # _controller: '\Drupal\typ_profile\Controller\TYPProfileController::profileOverview' # _title: 'Rredirect ' # requirements: # _permission: 'access content' \ No newline at end of file diff --git a/yp_map.php b/yp_map.php --- a/yp_map.php +++ b/yp_map.php @@ -1,114 +1,116 @@ + + แผนที่ - + - + - - +"; +} else { + echo ""; +}?>
- + - +
- +