Integration of Cesium JS 3D mapping software with Drupal 8

logicp 0088eddc58 Fixing indent пре 7 година
boutique_data 73808e260b Initial commit пре 7 година
config_import_files e6fa83a243 Adding Config Import Files пре 7 година
mapui 73808e260b Initial commit пре 7 година
qd30map 73808e260b Initial commit пре 7 година
zone_data 73808e260b Initial commit пре 7 година
README.md 0088eddc58 Fixing indent пре 7 година

README.md

cesium-drupal

Integration of Cesium JS 3D mapping software with Drupal 8

Be sure to stick this in your theme:

function myTheme_preprocess_page(&$variables) {
    $langCode = \Drupal::languageManager()->getCurrentLanguage()->getId();
    if (\Drupal::service('path.current')->getPath() === '/map') {
        if ($langCode === 'fr') {
            $variables['#attached']['library'][] = 'qd30map/cesiumAdditionsFr';
        } else {
            $variables['#attached']['library'][] = 'qd30map/cesiumAdditions';
        }
    }

    if (isset($variables['node'])) {
        if ($variables['node']->getType() == 'boutique') {
              $variables['#attached']['library'][] = 'qd30map/cesiumMini';
                $node = \Drupal::routeMatch()->getParameter('node');
                if ($node) {
                  $variables['#attached']['drupalSettings']['boutique_title'] = $node->getTitle();
                }
        }
    }
}