当前位置: 首页>>代码示例>>PHP>>正文


PHP ResourceLoader::loadTheme方法代码示例

本文整理汇总了PHP中ResourceLoader::loadTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP ResourceLoader::loadTheme方法的具体用法?PHP ResourceLoader::loadTheme怎么用?PHP ResourceLoader::loadTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ResourceLoader的用法示例。


在下文中一共展示了ResourceLoader::loadTheme方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: prepareMapData


//.........这里部分代码省略.........
                 $mapData['attribution']['additional'] = $profile->add_attribution;
             }
         }
         $mapData['overviewmap'] = $profile->overviewmap;
         $mapData['scaleline'] = $profile->scaleline;
         $mapData['mouseposition'] = $profile->mouseposition;
         $mapData['permalink']['enable'] = $profile->permalink;
         if ($profile->permalink) {
             $mapData['permalink']['get_parameter'] = $profile->permalink_get_param;
         }
         $mapData['zoomlevel'] = $profile->zoomlevel;
         // geosearch
         //
         if ($profile->geosearch) {
             $mapData['geosearch']['geosearch_engine'] = $profile->geosearch_engine;
             $mapData['geosearch']['enable'] = $profile->geosearch && $profile->geosearch_show;
             if ($profile->geosearch_customengine_attribution) {
                 $mapData['geosearch']['custom_attribution'] = $profile->geosearch_customengine_attribution;
             }
             $mapData['geosearch']['div'] = $profile->geosearch_div;
             $mapData['geosearch']['searchzoom'] = $profile->geosearch_zoomto;
             $mapData['geosearch']['zoombounds'] = $profile->geosearch_zoombounds;
             $mapData['geosearch']['animate'] = $profile->geosearch_animate;
             $mapData['geosearch']['markresult'] = $profile->geosearch_markresult;
             $mapData['geosearch']['attribution'] = $profile->geosearch_attribution;
             if ($profile->attribution && $profile->geosearch_attribution) {
                 $mapData['attribution']['geosearch'] = $profile->geosearch_attribution;
             }
         }
         // geopicker
         //
         if ($profile->geopicker) {
             $mapData['geopicker']['enable'] = $profile->geopicker;
             $mapData['geopicker']['type'] = 'frontend';
             $mapData['geopicker']['input_geo_x'] = '#' . $profile->geopicker_fieldx;
             $mapData['geopicker']['input_geo_y'] = '#' . $profile->geopicker_fieldy;
         }
         // router
         //
         if ($profile->router) {
             $mapData['router_enable'] = $profile->geosearch && $profile->router;
             $mapData['router_viaroute_precision'] = $profile->router_viaroute_url ? 100000.0 : 1000000.0;
             if ($profile->router_attribution) {
                 $mapData['router_attribution'] = $profile->router_attribution;
                 if ($profile->attribution) {
                     $mapData['attribution']['router'] = $profile->router_attribution;
                 }
             }
             $mapData['router_from_locstyle'] = $profile->router_from_locstyle;
             $mapData['router_to_locstyle'] = $profile->router_to_locstyle;
             $mapData['router_point_locstyle'] = $profile->router_point_locstyle;
         }
         // editor
         //
         if ($profile->editor) {
             $mapData['editor']['enable'] = $profile->editor;
             $mapData['editor']['type'] = 'frontend';
             $mapData['editor']['open'] = false;
         }
         // expert-configs
         //
         // miscellaneous
         //
     }
     // -----
     // (...)
     // -----
     // mapservice
     $baseLayer = \C4gMapBaselayersModel::findById($objThis->c4g_map_default_mapservice);
     if ($baseLayer) {
         $mapData['baselayer'] = $baseLayer->id;
         $mapData['minZoom'] = $baseLayer->minzoomlevel;
         $mapData['maxZoom'] = $baseLayer->maxzoomlevel;
     }
     // API
     //
     $mapData['api']['baselayer'] = $GLOBALS['con4gis_maps_extension']['api']['baselayer'];
     $mapData['api']['layer'] = $GLOBALS['con4gis_maps_extension']['api']['layer'];
     $mapData['api']['layercontent'] = $GLOBALS['con4gis_maps_extension']['api']['layercontent'];
     $mapData['api']['locstyle'] = $GLOBALS['con4gis_maps_extension']['api']['locstyle'];
     $mapData['api']['infowindow'] = $GLOBALS['con4gis_maps_extension']['api']['infowindow'];
     $mapData['api']['editor'] = $GLOBALS['con4gis_maps_extension']['api']['editor'];
     $mapData['api']['geosearch'] = $GLOBALS['con4gis_maps_extension']['api']['geosearch'];
     $mapData['api']['geosearch_reverse'] = $GLOBALS['con4gis_maps_extension']['api']['geosearch_reverse'];
     $mapData['api']['routing'] = $GLOBALS['con4gis_maps_extension']['api']['routing'];
     // load resources
     //
     // tell the Core to load all resources needed for maps
     \c4g\Core\ResourceLoader::loadResourcesForModule('maps');
     // load internal scripts and themes
     if ($profileId) {
         ResourceLoader::loadResourcesForProfile($profileId, $options['type'] == 'geopicker');
     } else {
         ResourceLoader::loadResources();
         ResourceLoader::loadTheme();
     }
     // @TODO: Check
     $mapData['addIdToDiv'] = true;
     return $mapData;
 }
开发者ID:Kuestenschmiede,项目名称:con4gis_maps3,代码行数:101,代码来源:MapDataConfigurator.php


注:本文中的ResourceLoader::loadTheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。