Commit 0e87b508 authored by Raph El's avatar Raph El
Browse files

Peu utiliser plusieur map en meme temps

parent 9d4c17f7
......@@ -16,6 +16,13 @@ var mapObj = {
// minZoom: 8,
// maxZoom: 16,
},
create : function(pInit = null){
//Init variable
var copyMap = jQuery.extend(true, {}, mapObj);
copyMap.init(pInit);
return copyMap;
},
init : function(pInit = null){
//Init variable
......
......@@ -42,8 +42,9 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->get
</style>
<div id="mapContainer" style="z-index: 1; width: 100%; height: 600px;"></div>
<div style="">
<div id="mapContainer" style="z-index: 1; width: 300px; height: 300px;"></div>
<div id="map2" style="z-index: 1; width: 300px; height: 300px;"></div>
<div class="hidden">
<nav class="header-map index2">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
......@@ -96,15 +97,29 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->get
<script type="text/javascript">
modules.map = <?php echo json_encode( Map::getConfig() ) ?> ;
var copyMap = {};
var map1 = {};
var map2 = {};
jQuery(document).ready(function() {
var paramsMap = {
zoom : 8
zoom : 5
};
var paramsMap2 = {
zoom : 3,
container : "map2"
};
mapObj.init(paramsMap);
//mapObj.init(paramsMap);
map1 = mapObj.create(paramsMap);
map2 = mapObj.create(paramsMap2);
//copyMap = $.extend( {}, mapObj );
//copyMap = JSON.parse(JSON.stringify(mapObj));
//copyMap = jQuery.extend(true, {}, mapObj);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment