IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

APIs Google Discussion :

Script pour plusieurs marqueurs [Google Maps]


Sujet :

APIs Google

  1. #1
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut Script pour plusieurs marqueurs
    bonjour
    je souhaite afficher plusieurs marqueurs sur une google map
    j'extraie mes données d'une bdd joomla
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    $bdd =& JFactory::getDBO();
    	$query = 'SELECT name, lat, lng FROM #__bat';
    	$bdd->setQuery ( $query );
    	$data = $bdd->loadObjectList();
    comment afficher les marqueurs dans un script, j'ai vu quelques exemples mais je butte rien ne passe
    un exemple please
    LJ

  2. #2
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    Bonjour,
    sans voir ton code comment ceux tu que l'on t'aide ?

    D'un autre coté si tu n'as encore rien fait je te conseille de t'adresser au bon Forum, coté client.

    Une recherche simple devrait quand même t'apporter des réponses satisfaisantes.

  3. #3
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    j'ai bien vu quelques exemples mais je patine à les adapter à mon cas
    voici mon code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    defined('_JEXEC') or die('Restricted access');  
     
    	  $user = JFactory::getUser();
    	  $userid = $user->id;
     
    	$bdd =& JFactory::getDBO();
    	$query = "SELECT name, lat, lng 
    			FROM #__bat
    			WHERE user_id='$userid'";
    	$bdd->setQuery ( $query );
    	$data = $bdd->loadObjectList();
     
    ?>
     
    <style type="text/css">
    html, body {
      height : 100%;
      width:100%;
      margin : 0;
      padding : 0;
    }
     
    #div_main {
      margin : auto;
      width : auto;
    }
    #div_carte {
      margin : auto;
      width : 1000px;
      height : 300px;
      border : 1px solid #c0c0c0;
    }
    </style>
     
    <hr>
    	<div align="left">
    		<h1>Implantation des postes</h1>
    	</div>
     
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=fr"></script>
     
    <script type="text/javascript">
    	function initialize() {
      var myLatlng = new google.maps.LatLng(45.363882,1.044922);
      var mapOptions = {
        zoom: 8,
        center: myLatlng
      };
     
      var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
      var contentString = '<h1>coucou</h1><br>';
     
      var infowindow = new google.maps.InfoWindow({
          content: contentString
      });
     
      var marker = new google.maps.Marker({
          position: myLatlng,
          map: map,
          title: 'Moov it !'
      });
      google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
      });
    }
     
    google.maps.event.addDomListener(window, 'load', initialize);
    </script>
     
    	<div id="div_main">
    	  <div id="div_carte"></div>
    	</div>
    <br>

  4. #4
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    voici une tentative qui échoue
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    <script type="text/javascript">
    	function initialize() {
    	  var myLatlng = new google.maps.LatLng(45.363882,1.044922);
    	  var mapOptions = {
    	    zoom: 8,
    	    center: myLatlng
    	  };
     
    	  var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
    	  var contentString = '<h1>coucou</h1><br>';
     
    	  var infowindow = new google.maps.InfoWindow({
    	      content: contentString
    	  });
     
    	/*  var marker = new google.maps.Marker({
    	      position: myLatlng,
    	      map: map,
    	      title: 'Moov it !'
    	  });*/
     
            <?php
            //Connection a la base de donnée
            $bdd =& JFactory::getDBO();
            $sql = "SELECT * FROM bat";
            $bdd = mysql_query($sql) or die ("Erreur SQL!!");
     
                    while($data = mysql_fetch_assoc($bdd))
                    {
                            echo 'var marker = new google.maps.Marker({
                                    position: new google.maps.LatLng('.$data['lat'].','.$data['long'].'), 
                                    map: myMap,
                                    title: \''.$data['name'].'\'
                            });
     
                            google.maps.event.addListener(marker);
     
                            ';      
                    }
            ?>
     
    	  google.maps.event.addListener(marker, 'click', function() {
    	    infowindow.open(map,marker);
    	  });
    	}
     
    	google.maps.event.addDomListener(window, 'load', initialize);
    </script>

  5. #5
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    dans ton code PHP tu affectes à la map du marker myMap, map: myMap,, qui est définie nulle part.

    Pas regardé plus avant!

  6. #6
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    j'ai modifié par map: map,
    mais cela ne passe pas mieux je pense aussi qu'il y une erreur de syntaxe ...

  7. #7
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    on pourra également noter que google.maps.event.addListener(marker);ne veut rien dire.

    Le meilleur conseil que l'on puisse te donner est de regarder le code HTML généré, il est souvent révélateur des erreurs de syntaxe.

    Si tu as encore un problème, c'est celui ci qu'il serait bon de nous fournir.

  8. #8
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    le voici
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    <?php
    defined('_JEXEC') or die('Restricted access');  
     
    	  $user = JFactory::getUser();
    	  $userid = $user->id;
     
    	$bdd =& JFactory::getDBO();
    	$query = "SELECT name, lat, lng 
    			FROM #__batenergie
    			WHERE author='$userid'";
    	$bdd->setQuery ( $query );
    	$data = $bdd->loadObjectList();
    	//echo var_dump($data);
     
    ?>
     
    <style type="text/css">
    html, body {
      height : 100%;
      width:100%;
      margin : 0;
      padding : 0;
    }
     
    #div_main {
      margin : auto;
      width : auto;
    }
    #div_carte {
      margin : auto;
      width : 1000px;
      height : 300px;
      border : 1px solid #c0c0c0;
    }
    </style>
     
    <hr>
    	<div align="left">
    		<h1>Implantation des postes</h1>
    	</div>
     
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=fr"></script>
     
    <script type="text/javascript">
    	function initialize() {
    	  var myLatlng = new google.maps.LatLng(45.7363882,1.1044922);
    	  var mapOptions = {
    	    zoom: 8,
    	    center: myLatlng
    	  };
     
    	  var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
      var ctaLayer = new google.maps.KmlLayer({
        url: 'http://www.ingall-niger.org/images/stories/Documents/87.kml'
      });
      ctaLayer.setMap(map);
     
    	  var contentString = '<h1>coucou</h1><br>';
     
    	  var infowindow = new google.maps.InfoWindow({
    	      content: contentString
    	  });
     
    	/*  var marker = new google.maps.Marker({
    	      position: myLatlng,
    	      map: map,
    	      title: 'Moov it !'
    	  });*/
     
     
            <?php
    	  $user = JFactory::getUser();
    	  $userid = $user->id;        
    	//Connection a la base de donnée
    	$bdd =& JFactory::getDBO();
            $sql = "SELECT name, lat, lng 
    		FROM #__batenergie		
    		WHERE author='$userid'";
            $bdd = setQuery($sql);
     
    		while($data = mysql_fetch_assoc($bdd))
                    {
    			echo 'var marker = new google.maps.Marker({
    				position: new google.maps.LatLng('.$data['lat'].','.$data['lng'].'), 
    				map: map,
                                    title: \''.$data['name'].'\'
    			});
     
    			google.maps.event.addListener(marker);
     
    			';	
    		}
           ?>
     
    	  google.maps.event.addListener(marker, 'click', function() {
    	    infowindow.open(map,marker);
    	  });
    	}
     
    	google.maps.event.addDomListener(window, 'load', initialize);
    </script>
     
    	<div id="div_main">
    	  <div id="div_carte"></div>
    	</div>
    <br>

  9. #9
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    ce que tu montres est le code PHP et non le code HTML généré, CTRL +U sur la plupart des navigateurs.

  10. #10
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    oups c un peu long
    la google map est à la fin du fichier
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-fr" lang="fr-fr" dir="ltr" >
    <head>
      <base href="http://www.batenergie.net/eclairage-public" />
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <meta name="keywords" content="énergie, batiment, gestion, éclairage public, eau, dpe" />
      <meta name="description" content="Gestion de l'énergie dans les bâtiments, édition des synthèse DPE, rapport énergie pour les collectivités" />
      <meta name="generator" content="Joomla! - Open Source Content Management" />
      <title>Batenergie - Liste des postes</title>
      <link href="/templates/beez_20/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
      <link rel="stylesheet" href="/components/com_batenergie/css/batenergie.css" type="text/css" />
      <link rel="stylesheet" href="/components/com_batenergie/css/toolbar.css" type="text/css" />
      <link rel="stylesheet" href="/media/system/css/calendar-jos.css" type="text/css"  title="Vert"  media="all" />
      <link rel="stylesheet" href="/plugins/system/jcemediabox/css/jcemediabox.css?version=116" type="text/css" />
      <link rel="stylesheet" href="/plugins/system/jcemediabox/themes/standard/css/style.css?version=116" type="text/css" />
      <link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />
      <link rel="stylesheet" href="/templates/beez_20/css/position.css" type="text/css" media="screen,projection"  />
      <link rel="stylesheet" href="/templates/beez_20/css/layout.css" type="text/css" media="screen,projection"  />
      <link rel="stylesheet" href="/templates/beez_20/css/print.css" type="text/css" media="print"  />
      <link rel="stylesheet" href="/templates/beez_20/css/general.css" type="text/css" />
      <link rel="stylesheet" href="/templates/beez_20/css/personal.css" type="text/css" />
      <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
      <script src="/media/system/js/core.js" type="text/javascript"></script>
      <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
      <script src="/administrator/components/com_batenergie/dom/assets/jdom.js" type="text/javascript"></script>
      <script src="/administrator/components/com_batenergie/js/formvalidator.js" type="text/javascript"></script>
      <script src="/media/system/js/calendar.js" type="text/javascript"></script>
      <script src="/media/system/js/calendar-setup.js" type="text/javascript"></script>
      <script src="/administrator/components/com_batenergie/dom/assets/searchbox/js/searchbox.js" type="text/javascript"></script>
      <script src="/plugins/system/jcemediabox/js/jcemediabox.js?version=116" type="text/javascript"></script>
      <script src="/templates/beez_20/javascript/md_stylechanger.js" type="text/javascript"></script>
      <script src="/templates/beez_20/javascript/hide.js" type="text/javascript"></script>
      <script type="text/javascript">
    window.addEvent('domready', function() {
    			$$('.hasTip').each(function(el) {
    				var title = el.get('title');
    				if (title) {
    					var parts = title.split('::', 2);
    					el.store('tip:title', parts[0]);
    					el.store('tip:text', parts[1]);
    				}
    			});
    			var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false});
    		});
    Calendar._DN = new Array ("dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"); Calendar._SDN = new Array ("Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"); Calendar._FD = 0; Calendar._MN = new Array ("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"); Calendar._SMN = new Array ("Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Juil", "Aoû", "Sep", "Oct", "Nov", "Déc"); Calendar._TT = {};Calendar._TT["INFO"] = "À propos du calendrier"; Calendar._TT["ABOUT"] =
     "DHTML Date/Time Selector\n" +
     "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
    "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
    "Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
    "\n\n" +
    "Sélection de la date :" +
    "- Utilisez les boutons « et » pour sélectionner l'année" +
    "- Utilisez les boutons < et > pour sélectionner le mois" +
    "- Maintenez enfoncé le bouton de la souris sur l'un des boutons ci-dessous pour une sélection plus rapide.";
    Calendar._TT["ABOUT_TIME"] = "\n\n" +
    "Time selection:\n" +
    "- Click on any of the time parts to increase it\n" +
    "- or Shift-click to decrease it\n" +
    "- or click and drag for faster selection.";
     
    		Calendar._TT["PREV_YEAR"] = "Cliquez pour passer à l\'année précédente. Maintenez cliqué pour une liste d\'années."; Calendar._TT["PREV_MONTH"] = "Cliquez pour passer au mois précédent. Maintenez cliqué pour une liste de mois."; Calendar._TT["GO_TODAY"] = "Aller à aujourd\'hui"; Calendar._TT["NEXT_MONTH"] = "Cliquez pour passer au mois suivant. Maintenez cliqué pour une liste de mois."; Calendar._TT["NEXT_YEAR"] = "Cliquez pour passer à l\'année suivante. Maintenez cliqué pour une liste d\'années."; Calendar._TT["SEL_DATE"] = "Sélectionnez une date."; Calendar._TT["DRAG_TO_MOVE"] = "Tirer pour déplacer"; Calendar._TT["PART_TODAY"] = "Aujourd\'hui"; Calendar._TT["DAY_FIRST"] = "Afficher %s d\'abord"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Fermer"; Calendar._TT["TODAY"] = "Aujourd\'hui"; Calendar._TT["TIME_PART"] = "(Maj-)Clic ou tirez pour modifier la valeur."; Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "sem."; Calendar._TT["TIME"] = "Heure :";
    JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:1,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Fermer','next':'Suivant','previous':'Précédent','cancel':'Annuler','numbers':'{$current} sur {$total}'}},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes"});
      </script>
     
     
    <!--[if lte IE 6]>
    <link href="/templates/beez_20/css/ieonly.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #line {
    	width:98% ;
    }
    .logoheader {
    	height:200px;
    }
    #header ul.menu {
    	display:block !important;
    	width:98.2% ;
    }
    </style>
    <![endif]-->
     
    <!--[if IE 7]>
    <link href="/templates/beez_20/css/ie7only.css" rel="stylesheet" type="text/css" />
    <![endif]-->
     
    <script type="text/javascript">
    	var big ='72%';
    	var small='53%';
    	var altopen='est ouvert';
    	var altclose='est fermé';
    	var bildauf='/templates/beez_20/images/plus.png';
    	var bildzu='/templates/beez_20/images/minus.png';
    	var rightopen='Ouvrir les infos';
    	var rightclose='Fermer les infos';
    	var fontSizeTitle='Taille de la police';
    	var bigger='Augmenter';
    	var reset='Réinitialiser';
    	var smaller='Diminuer';
    	var biggerTitle='Augmenter la taille';
    	var resetTitle='Revenir aux styles par défaut';
    	var smallerTitle='Réduire la taille';
    </script>
     
    </head>
     
    <body>
     
    <div id="all">
            <div id="back">
                    <div id="header">
                                    <div class="logoheader">
                                            <h1 id="logo">
     
                                                                                                                            Batenergie !                                                                                <span class="header1">
                                            Gestion de l'énergie dans les bâtiments                                        </span></h1>
                                    </div><!-- end logoheader -->
                                            <ul class="skiplinks">
                                                    <li><a href="#main" class="u2">Aller au contenu</a></li>
                                                    <li><a href="#nav" class="u2">Aller au menu principal et à l'identification</a></li>
                                                                                        </ul>
                                            <h2 class="unseen">Navigation de recherche</h2>
                                            <h3 class="unseen">Navigation</h3>
     
                                            <div id="line">
                                            <div id="fontsize"></div>
                                            <h3 class="unseen">Recherche</h3>
     
    <ul class="menu">
    <li class="item-101"><a href="/" >Bienvenue</a></li><li class="item-187"><a href="/mes-batiments" >Bâtiments</a></li><li class="item-262"><a href="/mes-vehicules" >Véhicules</a></li><li class="item-189 current active"><a href="/eclairage-public" >Eclairage</a></li><li class="item-261"><a href="/climatpratic" >Climat</a></li><li class="item-188"><a href="/mon-profil2" >Mon profil</a></li><li class="item-119"><a href="/2012-06-16-20-27-48" >Forum</a></li><li class="item-250"><a href="/stat-batiment" >Stat-Bat</a></li><li class="item-211"><a href="/docs" >DOCS</a></li></ul>
     
                                            </div> <!-- end line -->
     
     
                            </div><!-- end header -->
                            <div id="contentarea">
                                            <div id="breadcrumbs">
     
     
     
                                            </div>
     
     
                                            <div id="wrapper2" class="shownocolumns">
     
                                                    <div id="main">
     
     
     
    <div id="system-message-container">
    </div>
     
     
     
     
    <table width="100%"><tr>
    	<td width="75%">
    		<h1 class='componentheading'>
    							<img 	src="http://www.batenergie.net//media/plg_user_profilepicture/images/200/d8e6667574f92af0f736554d78a40e91ed517b13.jpg"
    					height="35">
     
    				Ville de BOUZOTIN   
    				 - Liste des postes 
     
    		</h1>
    	</td>
    	<td>
    		<div align="right"><strong><font color="#555" font-size="1.1em">
    		Postes d'éclairage public</font></strong>
    			    <img src="/components/com_batenergie/images/eclairage.png" 
    				height="40" align="center" valign="center"
            			title="mes véhicules"></div>
    	</td>
    </tr></table>
    <script language="javascript" type="text/javascript">
    	function submitbutton(pressbutton)
    	{
     
    		return Joomla.submitform(pressbutton);
    	}
    </script>
     
    <form action="/eclairage-public" method="post" name="adminForm" id="adminForm" class="">
     
    	<div>   
     
    <script language="javascript" type="text/javascript">
    <!--
     
    function resetFilters()
    {
    	if ($('filter_search') != null)
    	    $('filter_search').value='';
     
    /* TODO : Uncomment this if you want that the reset action proccess also on sorting values
    	if ($('filter_order') != null)
    	    $('filter_order').value='';
    	if ($('filter_orderDir') != null)
    	    $('filter_orderDir').value='';
    */
     
    	document.adminForm.submit();
    }
     
    -->
    </script>
     
     
    <fieldset id="filters" class="filters">
             <table width="100%">
    	<div style="float:right;">
    		<div style="float:left">
    			<!-- SEARCH : filter_search : search on Name  -->
     
    <tr>  	
    		<td align="left"><div id="toolbar" class=" toolbar-list">
    	<ul><li class="button" style="list-style:none; float: left;" id="toolbar-new" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('new');">
    			<div class="icon-16 icon-16-task-new">
    			</div>
    			<span class="text" style="white-space:nowrap">Nouveau</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-edit" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:if (document.adminForm.boxchecked.value==0){alert('Veuillez d\'abord effectuer une sélection dans la liste.');}else{return Joomla.submitform('edit');}">
    			<div class="icon-16 icon-16-task-edit">
    			</div>
    			<span class="text" style="white-space:nowrap">Editer</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-delete" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:if (document.adminForm.boxchecked.value == 0){alert('Veuillez d\'abord effectuer une sélection dans la liste.');}else if (document.adminForm.boxchecked.value > 1){if (window.confirm('Etes-vous sûre de vouloir supprimer ces enregistrements ?')){return Joomla.submitform('delete');}}else{if (window.confirm('Etes-vous sûre de vouloir supprimer cet enregistrement ?')){return Joomla.submitform('delete');}}">
    			<div class="icon-16 icon-16-task-delete">
    			</div>
    			<span class="text" style="white-space:nowrap">Supprimmer</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-printy" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('printy');">
    			<div class="icon-16 icon-16-task-rapport">
    			</div>
    			<span class="text" style="white-space:nowrap">Synthèse</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-exportcsv" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('exportcsv');">
    			<div class="icon-16 icon-16-task-exportcsv">
    			</div>
    			<span class="text" style="white-space:nowrap">Export CSV</span>
    		</div></li>
     
    	</ul><br clear="all"/></div></td>
        <td>
    				<div class='search filter filter_search'>
     
    					<div class="jdom" rel="{&quot;asset&quot;:&quot;searchbox&quot;,&quot;name&quot;:&quot;filter_search&quot;,&quot;selection&quot;:&quot;filter_search_selection&quot;}"style="background:url(/administrator/components/com_batenergie/dom/assets/searchbox/images/searchbox-r.png) right no-repeat;padding-right:20px;display:inline-block;"><input type="text" id="search_input_filter_search"  style="background:url(/administrator/components/com_batenergie/dom/assets/searchbox/images/searchbox-back.png) left no-repeat;border:none;height:22px;padding-left:14px;" class="inputbox " value="" size="12"/>
     
    <div class="field_message" style="clear:left;" id="field_message_filter_search"></div></div><input type="hidden" id="filter_search" name="filter_search" value=""/>				</div>
        </td>
     
        <td>
    		</div>    
    		<div style="float:left">
    				<div class="filter filter_buttons">
    					<button onclick="this.form.submit();">Rechercher</button>
    					<button onclick="resetFilters()">Effacer</button>
    				</div>
    		</div>
    	</div>  </td>
       </tr>
    </table>
     
     
     
    	<div clear='all'></div>
     
     
     
     
     
    </fieldset>
     
    <div class="grid_wrapper">
    <fieldset id="filters" class="filters" width="100%">
    	<table id='grid' class='adminlist' cellpadding="0" cellspacing="0">
    	<thead>
    		<tr>
    			            <th width="20">
    				<input type="checkbox" name="toggle" value="" onclick="checkAll(5);" />
    			</th>
     
    			<th>
    				Code Site			</th>
     
    			<th>
    				Nom du poste			</th>
     
    			<th>
    				Date			</th>
     
    			<th>
    							</th>
     
    			<th>
    				Nbr points lumineux			</th>
     
    			<th>
    				Tarif			</th>
     
    			<th>
    				Puissance souscrite (kW)			</th>
     
    			<th>
    				ID			</th>
     
     
     
    		</tr>
    	</thead>
     
    	<tbody>
     
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb0" name="cid[]" value="3" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				793			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=3">
    				Chambon			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-08</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				7			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				2			</td>
     
                <td>
    				3			</td>
     
     
     
    		</tr>
     
    		<tr class="row1">
     
    						<td>
    				<input type="checkbox" id="cb1" name="cid[]" value="4" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				741			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=4">
    				Escoubaniers			</a></td>
     
                <td>
    				<span  class="grid-date ">2012-12-13</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				3			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				15			</td>
     
                <td>
    				4			</td>
     
     
     
    		</tr>
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb2" name="cid[]" value="1" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				163			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=1">
    				Le bourg			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-07-23</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				34			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				2			</td>
     
                <td>
    				1			</td>
     
     
     
    		</tr>
     
    		<tr class="row1">
     
    						<td>
    				<input type="checkbox" id="cb3" name="cid[]" value="2" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				870			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=2">
    				Le Malpas			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-11</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				19			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				15			</td>
     
                <td>
    				2			</td>
     
     
     
    		</tr>
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb4" name="cid[]" value="5" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				392			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=5">
    				Vergnolles			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-15</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				10			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				1			</td>
     
                <td>
    				5			</td>
     
     
     
    		</tr>
    			</tbody>
    	</table>
    </fieldset>
     
    </div>
     
    <div class="list-footer-pagination">
     
    <div class="limit">Affichage #<select id="limit" name="limit" class="inputbox" size="1" onchange="this.form.submit()">
    	<option value="5">5</option>
    	<option value="10">10</option>
    	<option value="15">15</option>
    	<option value="20">20</option>
    	<option value="25">25</option>
    	<option value="30">30</option>
    	<option value="50">50</option>
    	<option value="100" selected="selected">100</option>
    	<option value="0">Tout</option>
    </select>
    </div>
    <div class="counter"></div>
    <input type="hidden" name="limitstart" value="0" />
    </div>
     
    	</div>
     
    	<div align="right"><input type="hidden" id="option" name="option" value="com_batenergie"/><input type="hidden" id="view" name="view" value="batenergieep"/><input type="hidden" id="layout" name="layout" value="default"/><input type="hidden" id="task" name="task" value=""/><input type="hidden" id="boxchecked" name="boxchecked" value="0"/><input type="hidden" id="filter_order" name="filter_order" value=""/><input type="hidden" id="filter_order_Dir" name="filter_order_Dir" value=""/><input type="hidden" id="Itemid" name="Itemid" value="189"/><input type="hidden" name="c7b113b5ed76ac8921e606ecfd3e0210" value="1" />
    	</div>
     
    	<div>
     
     
     
     
    <head>
    <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/excanvas.js"></script><![endif]-->
    <script language="javascript" type="text/javascript" src="/js/dist/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="/js/dist/jquery.jqplot.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/js/dist/jquery.jqplot.css" />
     
    <script type="text/javascript" src="/js/dist/plugins/jqplot.barRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.categoryAxisRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.pointLabels.min.js"></script>
     
    <script type="text/javascript" src="/js/dist/plugins/jqplot.pieRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.donutRenderer.min.js"></script>
     
    <script>
    $(document).ready(function(){
     
      	var chauffage = [39.547, 33.644, 34.85, 22.8, , ];
     
    	var ticks = ['2010', '2011', '2012', '2013', '2014', '2015'];
     
      plot3 = $.jqplot('chart1', [chauffage], {
        // Tell the plot to stack the bars.
        stackSeries: true,
        captureRightClick: true,
        seriesDefaults:{
          renderer:$.jqplot.BarRenderer,
          rendererOptions: {
              // Put a 30 pixel margin between bars.
              barMargin: 60,
              // Highlight bars when mouse button pressed.
              // Disables default highlighting on mouse over.
              highlightMouseDown: true   
          },
          pointLabels: {show: true}
        },
        axes: {
          xaxis: {
              renderer: $.jqplot.CategoryAxisRenderer,
    	         ticks: ticks
          },
          yaxis: {
            // Don't pad out the bottom of the data range.  By default,
            // axes scaled as if data extended 10% above and below the
            // actual range to prevent data points right on grid boundaries.
            // Don't want to do that here.
            padMin: 0,
    	min: 0,
            tickOptions: {formatString: '%.1f'}
          }
        },
    	series:[
                {label:'MWh'},
            ],
      });
      // Bind a listener to the "jqplotDataClick" event.  Here, simply change
      // the text of the info3 element to show what series and ponit were
      /* clicked along with the data for that point.
      $('#chart1').bind('jqplotDataClick', 
        function (ev, seriesIndex, pointIndex, data) {
          $('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
        }
      ); */
    });
    </script>
    <script>
    $(document).ready(function(){
     
    	var chauffage = [2.995, 3.558, 3.71, 2.15, , ];
    	var ticks = ['2010', '2011', '2012', '2013', '2014', '2015'];
     
      plot3 = $.jqplot('chart2', [chauffage], {
        // Tell the plot to stack the bars.
        stackSeries: true,
        captureRightClick: true,
        seriesDefaults:{
          renderer:$.jqplot.BarRenderer,
          rendererOptions: {
              // Put a 30 pixel margin between bars.
              barMargin: 60,
              // Highlight bars when mouse button pressed.
              // Disables default highlighting on mouse over.
              highlightMouseDown: true,
    	color: '#c5b47f',   
          },
          pointLabels: {show: true}
        },
     
     
     
        axes: {
          xaxis: {
              renderer: $.jqplot.CategoryAxisRenderer,
    	         ticks: ticks
          },
          yaxis: {
            // Don't pad out the bottom of the data range.  By default,
            // axes scaled as if data extended 10% above and below the
            // actual range to prevent data points right on grid boundaries.
            // Don't want to do that here.
            padMin: 0,
    	min: 0,
            tickOptions: {formatString: '%.1f'}
          }
        },
    	series:[
                {label:'k€'},
            ],     
      });
      // Bind a listener to the "jqplotDataClick" event.  Here, simply change
      // the text of the info3 element to show what series and ponit were
      /* clicked along with the data for that point.
      $('#chart2').bind('jqplotDataClick', 
        function (ev, seriesIndex, pointIndex, data) {
          $('#info2').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
        }
      ); */
    });
    </script>
    <script>
    $(document).ready(function(){
      var s1 = [['SHP',50.684931506849], ['Mercure',32.876712328767], ['Iodure',0],['LED',16.438356164384], ['Autres',0]];
     
      var plot3 = $.jqplot('chart3', [s1], {
        seriesDefaults: {
          // make this a donut chart.
          renderer:$.jqplot.DonutRenderer,
          rendererOptions:{
            // Donut's can be cut into slices like pies.
            sliceMargin: 3,
            // Pies and donuts can start at any arbitrary angle.
            startAngle: -90,
            showDataLabels: true,
            // By default, data labels show the percentage of the donut/pie.
            // You can show the data 'value' or data 'label' instead.
            dataLabels: 'value'
          } 
        },
    	legend: {
          show: true,
          location: 's',
          placement: 'outside'
        }
      });
    });
    </script>
    </head>
     
    <h1 class="componentheading"> 
    	<img src="/components/com_batenergie/images/eclairage.png" height="36" valign="bottom">
    	<font color= "#800303">Synthèse 2013</font>
    		<img src="/components/com_batenergie/images/info.png" 
    			height="15" 
    			title="Allez dans /Mon profil /Vos paramètres pour changer cette année."> 				
    	<font size="2px" color="#005c00"> --> 5  poste(s) d'eclairage public, pour 73 points lumineux.</font></h1>
     
     
     
    <table width="100%">
    <tr>
    	<td width="20%" align="center"><font color="#095197">  Puissance lumineuse</font></td> 
    	<td width="20%" align="center"><font color="#095197">  Energie par km</font></td> 
    	<td width="20%" align="center"><font color="#095197">  Consommations (MWh)</font></td>
    	<td width="20%" align="center"><font color="#095197">  Factures (k€)</font></td>
    	<td width="20%" align="center"><font color="#095197">  Répartition par type de lampe (%)</font></td>
    </tr>
    </table>
     
    <table class="admintable" width="100%">
    <td align="center" width="20%"> 
        <table width="100%"><tbody><tr><td width="20%" align="left" valign="bottom">
     
    <table class="admintable" width="100%">
    <td align="center" width="20%"> 
        <table width="100%"><tbody><tr><td width="20%" align="center" valign="bottom">
     
    <table align="center" cellspacing='0' cellpadding='0'>
    	<td align="center" width="20%"><br />
    		<img src="/components/com_batenergie/images/ep_C.gif" height="140">
    		<font color="#095197"><br />
    		65 kilolumen / km</font>
    	</td>
    </table>
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    <table align="center" cellspacing='0' cellpadding='0'>
    	<td align="center" width="25%"><br />
    		<img src="/components/com_batenergie/images/epconso_C.png" height="140">
    		<font color="#095197"><br />
    		6.9 MWh / km</font>
    	</td>
    </table>
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    <table width="100%">   
    		<div id="chart1" style="height:200px;width:200px;"></div>
    	</table>
     
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    	<table width="100%">   
    		<div id="chart2" style="height:200px;width:200px;"></div>
    	</table>
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    	<table width="100%">   
    		<div id="chart3" style="height:200px;width:200px;"></div>
    	</table>
     
    </td></tr></tbody></table>  
    </td>
     
    </td></tr></tbody></table>
    </td>
    </tr></tbody></table> 
     
    <br />
     
     
     
    <h2  align="left">
    	<font size="2px" color="#005c00">--> Autres indicateurs</font>
    </h2>
    <table width="40%" align="left">
    <tr>
    	<td valign="bottom" align="left"><font font-size="10px" color="#095197">
    		- % Puissance</font>
    			<img src="/components/com_batenergie/images/information.png" height="15" valign="bottom"
             			title="% de la puissance installée par la puissance souscrite.">
    	</td>
    	<td>
    		<input valign="bottom" class="inputbox" type="text" size="5" value="6" /><br />
    	</td>
     
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Emissions en tCo2</font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="2.7" /><br />
    	</td>
    </tr>
     
    <tr>
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Coût en c€ / kWh </font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="9.4" /><br />
    	</td>
     
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Heures d éclairement </font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="10 605" /><br />
    	</td>
    </tr>
    </table>
    <br /><br /><br /><br />
     
     
    	<input type="hidden" name="userid" value="44" />
    	<input type="hidden" name="nbrpoints" value="73" />
    	<input type="hidden" name="sumpuissance" value="" />
    	<input type="hidden" name="sumpuissanceinstall" value="" />
    	<input type="hidden" name="tonne" value="2.7" />
    	<input type="hidden" name="lumen" value="65" />
    	<input type="hidden" name="euro" value="9.4" />
    	<input type="hidden" name="number" value="5" />
    	<input type="hidden" name="km_voirie" value="3.3" />
    	<input type="hidden" name="imageprofile" value="d8e6667574f92af0f736554d78a40e91ed517b13.jpg" />
    	<input type="hidden" name="date_rapport" value="2013" />    
    	<input type="hidden" name="kwh_km" value="6.86746988" />
    	<input type="hidden" name="duree" value="10604.6512" />  
    	<input type="hidden" name="kwh_km" value="6.9" />
    	<input type="hidden" name="duree" value="10 605" />  
     
    	<input type="hidden" name="shp" value="51" />
    	<input type="hidden" name="mercure" value="33" />
    	<input type="hidden" name="iodure" value="0" />
    	<input type="hidden" name="led" value="16" />
    	<input type="hidden" name="autres" value="0" />
     
    	<input type="hidden" name="conso10b" value="31.736496969604" />
    	<input type="hidden" name="conso11b" value="26.999335070811" />
    	<input type="hidden" name="conso12b" value="27.967150969497" />
    	<input type="hidden" name="conso13b" value="18.297016990087" />
     
    	<input type="hidden" name="prix10b" value="25.334326915331" />
    	<input type="hidden" name="prix11b" value="30.096672842987" />
    	<input type="hidden" name="prix12b" value="31.382421654717" />
    	<input type="hidden" name="prix13b" value="18.186578586965" />
     
    	<input type="hidden" name="prixkwh10b" value="17.336182366652" />
    	<input type="hidden" name="prixkwh11b" value="24.208534717774" />
    	<input type="hidden" name="prixkwh12b" value="24.36920218576" />
    	<input type="hidden" name="prixkwh13b" value="21.586080729814" />
     
    	</div>
    	<div>   
        		array(5) {
      [0]=>
      object(stdClass)#316 (3) {
        ["name"]=>
        string(8) "Le bourg"
        ["lat"]=>
        string(17) "45.99618399602106"
        ["lng"]=>
        string(14) "1.428955078125"
      }
      [1]=>
      object(stdClass)#333 (3) {
        ["name"]=>
        string(7) "Chambon"
        ["lat"]=>
        string(18) "45.169812807708205"
        ["lng"]=>
        string(11) "1.451171875"
      }
      [2]=>
      object(stdClass)#287 (3) {
        ["name"]=>
        string(9) "Le Malpas"
        ["lat"]=>
        string(17) "45.79073921089571"
        ["lng"]=>
        string(14) "1.219482421875"
      }
      [3]=>
      object(stdClass)#295 (3) {
        ["name"]=>
        string(12) "Escoubaniers"
        ["lat"]=>
        string(17) "45.75242326188913"
        ["lng"]=>
        string(15) "1.7303466796875"
      }
      [4]=>
      object(stdClass)#288 (3) {
        ["name"]=>
        string(10) "Vergnolles"
        ["lat"]=>
        string(17) "45.44494795612681"
        ["lng"]=>
        string(14) "2.208740234375"
      }
    }
     
    <style type="text/css">
    html, body {
      height : 100%;
      width:100%;
      margin : 0;
      padding : 0;
    }
     
    #div_main {
      margin : auto;
      width : auto;
    }
    #div_carte {
      margin : auto;
      width : 1000px;
      height : 300px;
      border : 1px solid #c0c0c0;
    }
    </style>
     
    <hr>
    	<div align="left">
    		<h1>Implantation des postes</h1>
    	</div>
     
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=fr"></script>
     
    <script type="text/javascript">
    	function initialize() {
    	  var myLatlng = new google.maps.LatLng(45.7363882,1.1044922);
    	  var mapOptions = {
    	    zoom: 8,
    	    center: myLatlng
    	  };
     
    	  var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
    	  var ctaLayer = new google.maps.KmlLayer({
    	    url: 'http://www.ingall-niger.org/images/stories/Documents/87.kml'
    	  });
    	  ctaLayer.setMap(map);
     
    	  var contentString = '<h1>coucou</h1><br>';
     
    	  var infowindow = new google.maps.InfoWindow({
    	      content: contentString
    	  });
     
    	  var marker = new google.maps.Marker({
    	      position: myLatlng,
    	      map: map,
    	      title: 'Moov it !'
    	  });
     
     
     
    	  google.maps.event.addListener(marker, 'click', function() {
    	    infowindow.open(map,marker);
    	  });
    	}
     
    	google.maps.event.addDomListener(window, 'load', initialize);
    </script>
     
    	<div id="div_main">
    	  <div id="div_carte"></div>
    	</div>
    <br>
    	</div>
    </form>
     
     
     
     
                                                    </div><!-- end main -->
     
                                            </div><!-- end wrapper -->
     
     
     
                                    <div class="wrap"></div>
     
                                    </div> <!-- end contentarea -->
     
                            </div><!-- back -->
     
                    </div><!-- all -->
     
                    <div id="footer-outer">
     
                            <div id="footer-sub">
     
     
                                    <div id="footer">
     
     
     
    <div class="custom"  >
    	<p style="text-align: left;"><span style="font-size: small;"><a href="/mentions-legales">Mentions légales</a>&nbsp; &nbsp;- &nbsp;&nbsp;<a href="/contact">Contact</a>&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;<a href="/conditions-d-utilisation">Conditions d'utilisations</a>&nbsp; &nbsp; &nbsp;Affichage optimisé pour&nbsp;<a href="http://www.google.fr/chrome/" target="_blank"><img src="/images/batenergie/chrome.gif" alt="chrome" style="margin-right: 5px; margin-left: 5px; vertical-align: middle;" height="20" width="62" /></a></span><span style="font-size: 8pt;">et</span> <a target="_blank" href="http://www.mozilla.org/fr/firefox/features"><img style="vertical-align: middle;" alt="firefox" src="/images/batenergie/firefox.gif" height="18" width="56" /></a></p></div>
     
                                            <p>
                                                    Animé par <a href="http://www.joomla.org/">Joomla!®</a>
                                            </p>
     
     
                                    </div><!-- end footer -->
     
                            </div>
     
                    </div>
     
     
    <div class="custom"  >
    	<p style="text-align: center;"><span style="font-size: 8pt;">Batenergie.net dans la catégorie&nbsp;<a style="font-size: 8pt;" href="http://www.webrankinfo.com/annuaire/cat-61-energie-et-environnement.htm" target="_blank">Energies et environnement</a>&nbsp;:&nbsp;<a href="http://www.webrankinfo.com/annuaire/site-91444.htm" target="_blank"><span>Calcul d'empreinte carbone</span></a></span></p></div>
     
            </body>
    </html>

  11. #11
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    le code de la page qui plante c'est celui-ci
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
     
     
     
     
    <table width="100%"><tr>
    	<td width="75%">
    		<h1 class='componentheading'>
    							<img 	src="http://www.batenergie.net//media/plg_user_profilepicture/images/200/d8e6667574f92af0f736554d78a40e91ed517b13.jpg"
    					height="35">
     
    				Ville de BOUZOTIN   
    				 - Liste des postes 
     
    		</h1>
    	</td>
    	<td>
    		<div align="right"><strong><font color="#555" font-size="1.1em">
    		Postes d'éclairage public</font></strong>
    			    <img src="/components/com_batenergie/images/eclairage.png" 
    				height="40" align="center" valign="center"
            			title="mes véhicules"></div>
    	</td>
    </tr></table>
    <script language="javascript" type="text/javascript">
    	function submitbutton(pressbutton)
    	{
     
    		return Joomla.submitform(pressbutton);
    	}
    </script>
     
    <form action="/eclairage-public" method="post" name="adminForm" id="adminForm" class="">
     
    	<div>   
     
    <script language="javascript" type="text/javascript">
    <!--
     
    function resetFilters()
    {
    	if ($('filter_search') != null)
    	    $('filter_search').value='';
     
    /* TODO : Uncomment this if you want that the reset action proccess also on sorting values
    	if ($('filter_order') != null)
    	    $('filter_order').value='';
    	if ($('filter_orderDir') != null)
    	    $('filter_orderDir').value='';
    */
     
    	document.adminForm.submit();
    }
     
    -->
    </script>
     
     
    <fieldset id="filters" class="filters">
             <table width="100%">
    	<div style="float:right;">
    		<div style="float:left">
    			<!-- SEARCH : filter_search : search on Name  -->
     
    <tr>  	
    		<td align="left"><div id="toolbar" class=" toolbar-list">
    	<ul><li class="button" style="list-style:none; float: left;" id="toolbar-new" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('new');">
    			<div class="icon-16 icon-16-task-new">
    			</div>
    			<span class="text" style="white-space:nowrap">Nouveau</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-edit" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:if (document.adminForm.boxchecked.value==0){alert('Veuillez d\'abord effectuer une sélection dans la liste.');}else{return Joomla.submitform('edit');}">
    			<div class="icon-16 icon-16-task-edit">
    			</div>
    			<span class="text" style="white-space:nowrap">Editer</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-delete" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:if (document.adminForm.boxchecked.value == 0){alert('Veuillez d\'abord effectuer une sélection dans la liste.');}else if (document.adminForm.boxchecked.value > 1){if (window.confirm('Etes-vous sûre de vouloir supprimer ces enregistrements ?')){return Joomla.submitform('delete');}}else{if (window.confirm('Etes-vous sûre de vouloir supprimer cet enregistrement ?')){return Joomla.submitform('delete');}}">
    			<div class="icon-16 icon-16-task-delete">
    			</div>
    			<span class="text" style="white-space:nowrap">Supprimmer</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-printy" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('printy');">
    			<div class="icon-16 icon-16-task-rapport">
    			</div>
    			<span class="text" style="white-space:nowrap">Synthèse</span>
    		</div></li>
     
    	<li class="button" style="list-style:none; float: left;" id="toolbar-exportcsv" >
    		<div class="toolbar" style="cursor:pointer" onclick="javascript:return Joomla.submitform('exportcsv');">
    			<div class="icon-16 icon-16-task-exportcsv">
    			</div>
    			<span class="text" style="white-space:nowrap">Export CSV</span>
    		</div></li>
     
    	</ul><br clear="all"/></div></td>
        <td>
    				<div class='search filter filter_search'>
     
    					<div class="jdom" rel="{&quot;asset&quot;:&quot;searchbox&quot;,&quot;name&quot;:&quot;filter_search&quot;,&quot;selection&quot;:&quot;filter_search_selection&quot;}"style="background:url(/administrator/components/com_batenergie/dom/assets/searchbox/images/searchbox-r.png) right no-repeat;padding-right:20px;display:inline-block;"><input type="text" id="search_input_filter_search"  style="background:url(/administrator/components/com_batenergie/dom/assets/searchbox/images/searchbox-back.png) left no-repeat;border:none;height:22px;padding-left:14px;" class="inputbox " value="" size="12"/>
     
    <div class="field_message" style="clear:left;" id="field_message_filter_search"></div></div><input type="hidden" id="filter_search" name="filter_search" value=""/>				</div>
        </td>
     
        <td>
    		</div>    
    		<div style="float:left">
    				<div class="filter filter_buttons">
    					<button onclick="this.form.submit();">Rechercher</button>
    					<button onclick="resetFilters()">Effacer</button>
    				</div>
    		</div>
    	</div>  </td>
       </tr>
    </table>
     
     
     
    	<div clear='all'></div>
     
     
     
     
     
    </fieldset>
     
    <div class="grid_wrapper">
    <fieldset id="filters" class="filters" width="100%">
    	<table id='grid' class='adminlist' cellpadding="0" cellspacing="0">
    	<thead>
    		<tr>
    			            <th width="20">
    				<input type="checkbox" name="toggle" value="" onclick="checkAll(5);" />
    			</th>
     
    			<th>
    				Code Site			</th>
     
    			<th>
    				Nom du poste			</th>
     
    			<th>
    				Date			</th>
     
    			<th>
    							</th>
     
    			<th>
    				Nbr points lumineux			</th>
     
    			<th>
    				Tarif			</th>
     
    			<th>
    				Puissance souscrite (kW)			</th>
     
    			<th>
    				ID			</th>
     
     
     
    		</tr>
    	</thead>
     
    	<tbody>
     
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb0" name="cid[]" value="3" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				793			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=3">
    				Chambon			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-08</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				7			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				2			</td>
     
                <td>
    				3			</td>
     
     
     
    		</tr>
     
    		<tr class="row1">
     
    						<td>
    				<input type="checkbox" id="cb1" name="cid[]" value="4" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				741			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=4">
    				Escoubaniers			</a></td>
     
                <td>
    				<span  class="grid-date ">2012-12-13</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				3			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				15			</td>
     
                <td>
    				4			</td>
     
     
     
    		</tr>
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb2" name="cid[]" value="1" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				163			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=1">
    				Le bourg			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-07-23</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				34			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				2			</td>
     
                <td>
    				1			</td>
     
     
     
    		</tr>
     
    		<tr class="row1">
     
    						<td>
    				<input type="checkbox" id="cb3" name="cid[]" value="2" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				870			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=2">
    				Le Malpas			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-11</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				19			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				15			</td>
     
                <td>
    				2			</td>
     
     
     
    		</tr>
     
    		<tr class="row0">
     
    						<td>
    				<input type="checkbox" id="cb4" name="cid[]" value="5" onclick="Joomla.isChecked(this.checked);" title="JGRID_CHECKBOX_ROW_N" />			</td>
     
                <td>
    				392			</td>
     
                <td>
    		<a href="/eclairage-public?controller=batenergieep&amp;task=edit&amp;cid[0]=5">
    				Vergnolles			</a></td>
     
                <td>
    				<span  class="grid-date ">2010-12-15</span>			</td>
     
                <td>
    							</td>
     
                <td>
    				10			</td>
     
                <td>
    				0710 BASE			</td>
     
                <td>
    				1			</td>
     
                <td>
    				5			</td>
     
     
     
    		</tr>
    			</tbody>
    	</table>
    </fieldset>
     
    </div>
     
    <div class="list-footer-pagination">
     
    <div class="limit">Affichage #<select id="limit" name="limit" class="inputbox" size="1" onchange="this.form.submit()">
    	<option value="5">5</option>
    	<option value="10">10</option>
    	<option value="15">15</option>
    	<option value="20">20</option>
    	<option value="25">25</option>
    	<option value="30">30</option>
    	<option value="50">50</option>
    	<option value="100" selected="selected">100</option>
    	<option value="0">Tout</option>
    </select>
    </div>
    <div class="counter"></div>
    <input type="hidden" name="limitstart" value="0" />
    </div>
     
    	</div>
     
    	<div align="right"><input type="hidden" id="option" name="option" value="com_batenergie"/><input type="hidden" id="view" name="view" value="batenergieep"/><input type="hidden" id="layout" name="layout" value="default"/><input type="hidden" id="task" name="task" value=""/><input type="hidden" id="boxchecked" name="boxchecked" value="0"/><input type="hidden" id="filter_order" name="filter_order" value=""/><input type="hidden" id="filter_order_Dir" name="filter_order_Dir" value=""/><input type="hidden" id="Itemid" name="Itemid" value="189"/><input type="hidden" name="9ab72bf65371f79ed0965e064a69582c" value="1" />
    	</div>
     
    	<div>
     
     
     
     
    <head>
    <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
    <script language="javascript" type="text/javascript" src="/js/dist/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="/js/dist/jquery.jqplot.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/js/dist/jquery.jqplot.css" />
     
    <script type="text/javascript" src="/js/dist/plugins/jqplot.barRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.categoryAxisRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.pointLabels.min.js"></script>
     
    <script type="text/javascript" src="/js/dist/plugins/jqplot.pieRenderer.min.js"></script>
    <script type="text/javascript" src="/js/dist/plugins/jqplot.donutRenderer.min.js"></script>
     
    <script>
    $(document).ready(function(){
     
      	var chauffage = [39.547, 33.644, 34.85, 22.8, , ];
     
    	var ticks = ['2010', '2011', '2012', '2013', '2014', '2015'];
     
      plot3 = $.jqplot('chart1', [chauffage], {
        // Tell the plot to stack the bars.
        stackSeries: true,
        captureRightClick: true,
        seriesDefaults:{
          renderer:$.jqplot.BarRenderer,
          rendererOptions: {
              // Put a 30 pixel margin between bars.
              barMargin: 60,
              // Highlight bars when mouse button pressed.
              // Disables default highlighting on mouse over.
              highlightMouseDown: true   
          },
          pointLabels: {show: true}
        },
        axes: {
          xaxis: {
              renderer: $.jqplot.CategoryAxisRenderer,
    	         ticks: ticks
          },
          yaxis: {
            // Don't pad out the bottom of the data range.  By default,
            // axes scaled as if data extended 10% above and below the
            // actual range to prevent data points right on grid boundaries.
            // Don't want to do that here.
            padMin: 0,
    	min: 0,
            tickOptions: {formatString: '%.1f'}
          }
        },
    	series:[
                {label:'MWh'},
            ],
      });
      // Bind a listener to the "jqplotDataClick" event.  Here, simply change
      // the text of the info3 element to show what series and ponit were
      /* clicked along with the data for that point.
      $('#chart1').bind('jqplotDataClick', 
        function (ev, seriesIndex, pointIndex, data) {
          $('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
        }
      ); */
    });
    </script>
    <script>
    $(document).ready(function(){
     
    	var chauffage = [2.995, 3.558, 3.71, 2.15, , ];
    	var ticks = ['2010', '2011', '2012', '2013', '2014', '2015'];
     
      plot3 = $.jqplot('chart2', [chauffage], {
        // Tell the plot to stack the bars.
        stackSeries: true,
        captureRightClick: true,
        seriesDefaults:{
          renderer:$.jqplot.BarRenderer,
          rendererOptions: {
              // Put a 30 pixel margin between bars.
              barMargin: 60,
              // Highlight bars when mouse button pressed.
              // Disables default highlighting on mouse over.
              highlightMouseDown: true,
    	color: '#c5b47f',   
          },
          pointLabels: {show: true}
        },
     
     
     
        axes: {
          xaxis: {
              renderer: $.jqplot.CategoryAxisRenderer,
    	         ticks: ticks
          },
          yaxis: {
            // Don't pad out the bottom of the data range.  By default,
            // axes scaled as if data extended 10% above and below the
            // actual range to prevent data points right on grid boundaries.
            // Don't want to do that here.
            padMin: 0,
    	min: 0,
            tickOptions: {formatString: '%.1f'}
          }
        },
    	series:[
                {label:'k€'},
            ],     
      });
      // Bind a listener to the "jqplotDataClick" event.  Here, simply change
      // the text of the info3 element to show what series and ponit were
      /* clicked along with the data for that point.
      $('#chart2').bind('jqplotDataClick', 
        function (ev, seriesIndex, pointIndex, data) {
          $('#info2').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
        }
      ); */
    });
    </script>
    <script>
    $(document).ready(function(){
      var s1 = [['SHP',50.684931506849], ['Mercure',32.876712328767], ['Iodure',0],['LED',16.438356164384], ['Autres',0]];
     
      var plot3 = $.jqplot('chart3', [s1], {
        seriesDefaults: {
          // make this a donut chart.
          renderer:$.jqplot.DonutRenderer,
          rendererOptions:{
            // Donut's can be cut into slices like pies.
            sliceMargin: 3,
            // Pies and donuts can start at any arbitrary angle.
            startAngle: -90,
            showDataLabels: true,
            // By default, data labels show the percentage of the donut/pie.
            // You can show the data 'value' or data 'label' instead.
            dataLabels: 'value'
          } 
        },
    	legend: {
          show: true,
          location: 's',
          placement: 'outside'
        }
      });
    });
    </script>
    </head>
     
    <h1 class="componentheading"> 
    	<img src="/components/com_batenergie/images/eclairage.png" height="36" valign="bottom">
    	<font color= "#800303">Synthèse 2013</font>
    		<img src="/components/com_batenergie/images/info.png" 
    			height="15" 
    			title="Allez dans /Mon profil /Vos paramètres pour changer cette année."> 				
    	<font size="2px" color="#005c00"> --> 5  poste(s) d'eclairage public, pour 73 points lumineux.</font></h1>
     
     
     
    <table width="100%">
    <tr>
    	<td width="20%" align="center"><font color="#095197">  Puissance lumineuse</font></td> 
    	<td width="20%" align="center"><font color="#095197">  Energie par km</font></td> 
    	<td width="20%" align="center"><font color="#095197">  Consommations (MWh)</font></td>
    	<td width="20%" align="center"><font color="#095197">  Factures (k€)</font></td>
    	<td width="20%" align="center"><font color="#095197">  Répartition par type de lampe (%)</font></td>
    </tr>
    </table>
     
    <table class="admintable" width="100%">
    <td align="center" width="20%"> 
        <table width="100%"><tbody><tr><td width="20%" align="left" valign="bottom">
     
    <table class="admintable" width="100%">
    <td align="center" width="20%"> 
        <table width="100%"><tbody><tr><td width="20%" align="center" valign="bottom">
     
    <table align="center" cellspacing='0' cellpadding='0'>
    	<td align="center" width="20%"><br />
    		<img src="/components/com_batenergie/images/ep_C.gif" height="140">
    		<font color="#095197"><br />
    		65 kilolumen / km</font>
    	</td>
    </table>
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    <table align="center" cellspacing='0' cellpadding='0'>
    	<td align="center" width="25%"><br />
    		<img src="/components/com_batenergie/images/epconso_C.png" height="140">
    		<font color="#095197"><br />
    		6.9 MWh / km</font>
    	</td>
    </table>
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    <table width="100%">   
    		<div id="chart1" style="height:200px;width:200px;"></div>
    	</table>
     
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    	<table width="100%">   
    		<div id="chart2" style="height:200px;width:200px;"></div>
    	</table>
     
     
    </td></tr></tbody></table>  
    </td>
    <td align="center" width=20%">
       <table width="100%"><tbody><tr><td>
     
    	<table width="100%">   
    		<div id="chart3" style="height:200px;width:200px;"></div>
    	</table>
     
    </td></tr></tbody></table>  
    </td>
     
    </td></tr></tbody></table>
    </td>
    </tr></tbody></table> 
     
    <br />
     
     
     
    <h2  align="left">
    	<font size="2px" color="#005c00">--> Autres indicateurs</font>
    </h2>
    <table width="40%" align="left">
    <tr>
    	<td valign="bottom" align="left"><font font-size="10px" color="#095197">
    		- % Puissance</font>
    			<img src="/components/com_batenergie/images/information.png" height="15" valign="bottom"
             			title="% de la puissance installée par la puissance souscrite.">
    	</td>
    	<td>
    		<input valign="bottom" class="inputbox" type="text" size="5" value="6" /><br />
    	</td>
     
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Emissions en tCo2</font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="2.7" /><br />
    	</td>
    </tr>
     
    <tr>
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Coût en c€ / kWh </font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="9.4" /><br />
    	</td>
     
    	<td valign="top" align="left"><font font-size="10px" color="#095197">
    		- Heures d éclairement </font>
    	</td>
    	<td>
    		<input class="inputbox" type="text" size="5" value="10 605" /><br />
    	</td>
    </tr>
    </table>
    <br /><br /><br /><br />
     
     
    	<input type="hidden" name="userid" value="44" />
    	<input type="hidden" name="nbrpoints" value="73" />
    	<input type="hidden" name="sumpuissance" value="" />
    	<input type="hidden" name="sumpuissanceinstall" value="" />
    	<input type="hidden" name="tonne" value="2.7" />
    	<input type="hidden" name="lumen" value="65" />
    	<input type="hidden" name="euro" value="9.4" />
    	<input type="hidden" name="number" value="5" />
    	<input type="hidden" name="km_voirie" value="3.3" />
    	<input type="hidden" name="imageprofile" value="d8e6667574f92af0f736554d78a40e91ed517b13.jpg" />
    	<input type="hidden" name="date_rapport" value="2013" />    
    	<input type="hidden" name="kwh_km" value="6.86746988" />
    	<input type="hidden" name="duree" value="10604.6512" />  
    	<input type="hidden" name="kwh_km" value="6.9" />
    	<input type="hidden" name="duree" value="10 605" />  
     
    	<input type="hidden" name="shp" value="51" />
    	<input type="hidden" name="mercure" value="33" />
    	<input type="hidden" name="iodure" value="0" />
    	<input type="hidden" name="led" value="16" />
    	<input type="hidden" name="autres" value="0" />
     
    	<input type="hidden" name="conso10b" value="31.736496969604" />
    	<input type="hidden" name="conso11b" value="26.999335070811" />
    	<input type="hidden" name="conso12b" value="27.967150969497" />
    	<input type="hidden" name="conso13b" value="18.297016990087" />
     
    	<input type="hidden" name="prix10b" value="25.334326915331" />
    	<input type="hidden" name="prix11b" value="30.096672842987" />
    	<input type="hidden" name="prix12b" value="31.382421654717" />
    	<input type="hidden" name="prix13b" value="18.186578586965" />
     
    	<input type="hidden" name="prixkwh10b" value="17.336182366652" />
    	<input type="hidden" name="prixkwh11b" value="24.208534717774" />
    	<input type="hidden" name="prixkwh12b" value="24.36920218576" />
    	<input type="hidden" name="prixkwh13b" value="21.586080729814" />
     
    	</div>
    	<div>   
        		array(5) {
      [0]=>
      object(stdClass)#316 (3) {
        ["name"]=>
        string(8) "Le bourg"
        ["lat"]=>
        string(17) "45.99618399602106"
        ["lng"]=>
        string(14) "1.428955078125"
      }
      [1]=>
      object(stdClass)#333 (3) {
        ["name"]=>
        string(7) "Chambon"
        ["lat"]=>
        string(18) "45.169812807708205"
        ["lng"]=>
        string(11) "1.451171875"
      }
      [2]=>
      object(stdClass)#287 (3) {
        ["name"]=>
        string(9) "Le Malpas"
        ["lat"]=>
        string(17) "45.79073921089571"
        ["lng"]=>
        string(14) "1.219482421875"
      }
      [3]=>
      object(stdClass)#295 (3) {
        ["name"]=>
        string(12) "Escoubaniers"
        ["lat"]=>
        string(17) "45.75242326188913"
        ["lng"]=>
        string(15) "1.7303466796875"
      }
      [4]=>
      object(stdClass)#288 (3) {
        ["name"]=>
        string(10) "Vergnolles"
        ["lat"]=>
        string(17) "45.44494795612681"
        ["lng"]=>
        string(14) "2.208740234375"
      }
    }
     
    <style type="text/css">
    html, body {
      height : 100%;
      width:100%;
      margin : 0;
      padding : 0;
    }
     
    #div_main {
      margin : auto;
      width : auto;
    }
    #div_carte {
      margin : auto;
      width : 1000px;
      height : 300px;
      border : 1px solid #c0c0c0;
    }
    </style>
     
    <hr>
    	<div align="left">
    		<h1>Implantation des postes</h1>
    	</div>
     
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=fr"></script>
     
    <script type="text/javascript">
    	function initialize() {
    	  var myLatlng = new google.maps.LatLng(45.7363882,1.1044922);
    	  var mapOptions = {
    	    zoom: 8,
    	    center: myLatlng
    	  };
     
    	  var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
    	  var ctaLayer = new google.maps.KmlLayer({
    	    url: 'http://www.ingall-niger.org/images/stories/Documents/87.kml'
    	  });
    	  ctaLayer.setMap(map);
     
    	  var contentString = '<h1>coucou</h1><br>';
     
    	  var infowindow = new google.maps.InfoWindow({
    	      content: contentString
    	  });
     
    	/*  var marker = new google.maps.Marker({
    	      position: myLatlng,
    	      map: map,
    	      title: 'Moov it !'
    	  });*/
     
     
            <br />
    <b>Fatal error</b>:  Call to undefined function setQuery() in <b>/homez.615/batenerg/www/components/com_batenergie/views/batenergieep/tmpl/default_map.php</b> on line <b>103</b><br />

  12. #12
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    Premier conseil, lorsque l'on fait une mise au point autant essayer de compartimenter les problèmes et de ne pas travailler sur l'ensemble du code mais isoler ceux ci.

    A la vue du code ci dessous, issu du code HTML généré on peut se demander si tu sais ce que tu fais, il y a du var_dump dans l'air
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    array(5) {
      [0]=>
      object(stdClass)#316 (3) {
        ["name"]=>
        string(8) "Le bourg"
        ["lat"]=>
        string(17) "45.99618399602106"
        ["lng"]=>
        string(14) "1.428955078125"
      }
      [1]=>
      object(stdClass)#333 (3) {
        ["name"]=>
        string(7) "Chambon"
        ["lat"]=>
        string(18) "45.169812807708205"
        ["lng"]=>
        string(11) "1.451171875"
      }
      [2]=>
      object(stdClass)#287 (3) {
        ["name"]=>
        string(9) "Le Malpas"
        ["lat"]=>
        string(17) "45.79073921089571"
        ["lng"]=>
        string(14) "1.219482421875"
      }
      [3]=>
      object(stdClass)#295 (3) {
        ["name"]=>
        string(12) "Escoubaniers"
        ["lat"]=>
        string(17) "45.75242326188913"
        ["lng"]=>
        string(15) "1.7303466796875"
      }
      [4]=>
      object(stdClass)#288 (3) {
        ["name"]=>
        string(10) "Vergnolles"
        ["lat"]=>
        string(17) "45.44494795612681"
        ["lng"]=>
        string(14) "2.208740234375"
      }
    }
    ce code n'a rien à faire dans ton code final sous cette forme! On devrait le retrouver à minima sous la forme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    var dataMarker = [
    {
      "name": "Le bourg",
      "lat": "45.99618399602106",
      "lng": "1.428955078125"
    },
    {
      "name": "Chambon",
      "lat": "45.169812807708205",
      "lng": "1.451171875"
    }];
    ...dans ta boucle, (?), il te faut initialiser un tableau pour pouvoir l'utiliser coté client, par exemple

    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    $bdd = setQuery($sql);
    $tResult = array(); 
    while($marker = mysql_fetch_object( $bdd)) {
      $tResult[] = $marker;
    }
    echo "var dataMarker=", json_encode( $tResult), ";\n";
    ce code est à insérer entre des balises <script></script> pour qu'il puisse être accessible par javascript coté client.

    Une fois l'objet disponible il ne te restera plus qu'à faire une boucle de création des marqueurs.

    Tu as surtout un problème de PHP pour le moment.

  13. #13
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    merci
    - le var_dump est là juste pour contrôler ma requête
    - comment obtenir
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    var dataMarker = [
    {
      "name": "Le bourg",
      "lat": "45.99618399602106",
      "lng": "1.428955078125"
    },
    - pour le reste ... je comprends pas tout ...
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    <?php  
            $bdd = setQuery($query);
            $tResult = array(); 
            while($marker = mysql_fetch_object( $bdd)) {
              $tResult[] = $marker;
            }
            echo "var dataMarker=", json_encode( $tResult), ";\n";
     
                    while($data = mysql_fetch_assoc($bdd))
                    {
                            echo 'var marker = new google.maps.Marker({
                                    position: new google.maps.LatLng('.$data['lat'].','.$data['lng'].'), 
                                    map: map,
                                    title: \''.$data['name'].'\'
                                    });
                            ';      
                    }
            ?>
    désolé du boulet
    LJ

  14. #14
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    pour précision aussi mon fichier template est réduit à l'affichage de la carte, la pagehtml étant composée de plusieurs sous template ...
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    <?php        
     
    defined('_JEXEC') or die('Restricted access');  
     
              $user = JFactory::getUser();
              $userid = $user->id;
     
            $bdd =& JFactory::getDBO();
            $query = "SELECT name, lat, lng 
                            FROM #__batenergie_batenergieep
                            WHERE author='$userid'";
            $bdd->setQuery ( $query );
            //$data = $bdd->loadObjectList();
            //echo var_dump($data);
     
    ?>
     
    <style type="text/css">
    html, body {
      height : 100%;
      width:100%;
      margin : 0;
      padding : 0;
    }
     
    #div_main {
      margin : auto;
      width : auto;
    }
    #div_carte {
      margin : auto;
      width : 1000px;
      height : 300px;
      border : 1px solid #c0c0c0;
    }
    </style>
     
    <hr>
    	<div align="left">
    		<h1>Implantation des postes</h1>
    	</div>
     
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=fr"></script>
     
    <script type="text/javascript">
    	function initialize() {
    	  var myLatlng = new google.maps.LatLng(45.7363882,1.1044922);
    	  var mapOptions = {
    	    zoom: 10,
    	    center: myLatlng
    	  };
     
    	  var map = new google.maps.Map(document.getElementById('div_carte'), mapOptions);
     
    	/*  var ctaLayer = new google.maps.KmlLayer({
    	    url: 'http://www.ingall-niger.org/images/stories/Documents/87.kml'
    	  });
    	  ctaLayer.setMap(map);
     
    	  var contentString = 'cacou et coucou';
     
    	  var infowindow = new google.maps.InfoWindow({
    	      content: contentString
    	  });  */
     
            <?php  
            $bdd = setQuery($query);
            $tResult = array(); 
                    while($marker = mysql_fetch_object($bdd)) {
                      $tResult[] = $marker;
                    }
            echo "var dataMarker=", json_encode( $tResult), ";\n";
     
            while($data = mysql_fetch_assoc($tResult))
                    {
                            echo 'var dataMarker = new google.maps.Marker({
                                    position: new google.maps.LatLng('.$data['lat'].','.$data['lng'].'), 
                                    map: map,
                                    title: \''.$data['name'].'\'
                                    });
                            ';      
                    }
            ?>
     
    	 /*var marker = new google.maps.Marker({
    	      position: myLatlng,
    	      map: map
    	  });*/
     
    	  google.maps.event.addListener(marker, 'click', function() {
    	    infowindow.open(map,marker);
     
    	  });
    	}
     
    	google.maps.event.addDomListener(window, 'load', initialize);
    </script>
     
    	<div id="div_main">
    	  <div id="div_carte"></div>
    	</div>
    <br>

  15. #15
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    je teste aussi ce code les 2 points eux s'affichent bien, mais n'arrive pas à faire passer le tableau à la place de la liste des points...
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    var liste_des_points=[
      [45.777107436477785, 3.0818769335746765],
      [45.8, 3.2]
    ];
     
    var i=0,li=liste_des_points.length;
    while(i<li){
      new google.maps.Marker({
              position: new google.maps.LatLng(liste_des_points[i][0], liste_des_points[i][1]),
              map: map
         });
      i++;
    }

  16. #16
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    Tu te rapproches dans la démarche, à la place de ta liste_des_points il faut que tu ais tes dataMarker et que tu boucles sur eux.

    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    $bdd = setQuery($sql);
    $tResult = array(); 
    while($marker = mysql_fetch_object( $bdd)) {
      $tResult[] = $marker;
    }
    echo "var dataMarker=", json_encode( $tResult), ";\n";
     
      var oMap, oMarker, oInfo;
      var i, nb = dataMarker.length;
      // création de la carte
      oMap = new google.maps.Map( document.getElementById( 'div_carte'),{
        'center' : new google.maps.LatLng( 45.7363882,1.1044922),
        'zoom' : 10,
        'mapTypeId' : google.maps.MapTypeId.ROADMAP
      });
     
      // création des markers dans une boucle
      for( i = 0; i < nb; i++){
        oMarker = new google.maps.Marker({
          'position' : new google.maps.LatLng( dataMarker[i].lat, dataMarker[i].lng),
          'map' : oMap,
          'title' : dataMarker[i].name
        });

    code extrait de la ICI

  17. #17
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    oui merci çà progresse et aussi j'apprends des choses, tableau array, boucle for ...
    - le script de la FAQ s'affiche bien tout seul
    - lorsque je remplace les points par mon tableau issu de ma requête il ne le retrouve pas
    voici ma requête php qui marche puisque le var_dump m'affiche bien les données mais peut être pas sous la bonne forme ....
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    $user = JFactory::getUser();
    	  $userid = $user->id;
     
    	$bdd =& JFactory::getDBO();
    	$query = "SELECT name, lat, lng 
    			FROM #__batenergie_batenergieep
    			WHERE author='$userid'";
    	$bdd->setQuery ( $query );
    	$data = $bdd->loadObjectList();
    voici le script aussi avec la partie php
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    <script type="text/javascript">
    	function initCarte(){
    	 /* var tMarker = [
    	    { 'lat' :45.767299, 'lon' : 4.834329, 'title' :'Lyon'},
    	    { 'lat' :48.856667, 'lon' : 2.350987, 'title' :'Paris'},
    	    { 'lat' :44.837368, 'lon' :-0.576144, 'title' :'Bordeaux'},
    	    { 'lat' :43.297612, 'lon' : 5.381042, 'title' :'Marseille'}
    	  ];*/
    		//appel tableau de donnée de la requête
    		<?php $bdd = setQuery($query);
    		$tResult = array(); 
    		while($marker = mysql_fetch_object( $bdd)) {
    		  $tResult[] = $marker;
    		}
    		echo "var dataMarker=", json_encode( $tResult), ";\n";
    		?>
     
    	  var oMap, oMarker, oInfo;
    	  var i, nb = dataMarker.length;
    	  // création de la carte
    	  oMap = new google.maps.Map( document.getElementById( 'div_carte'),{
    	    'center' : new google.maps.LatLng( 46.80, 1.70),
    	    'zoom' : 6,
    	    'mapTypeId' : google.maps.MapTypeId.ROADMAP
    	  });
    	  // création infobulle
    	  oInfo = new google.maps.InfoWindow();
    	  // création des markers dans une boucle
    	  for( i = 0; i < nb; i++){
    	    oMarker = new google.maps.Marker({
    	      'position' : new google.maps.LatLng( dataMarker[i].lat, dataMarker[i].lng),
    	      'map' : oMap,
    	      'title' : dataMarker[i].name
    	    });
    	    // événement clic sur le marker
    		google.maps.event.addListener( oMarker, 'click', function( data){
    	    	// affichage position du marker
    		    oInfo.setContent( 'position :<br>' +data.latLng.toUrlValue(5));
    		    oInfo.open( this.getMap(), this);
    	  }); 
    	  }
    	}
    	// init lorsque la page est chargée
    	google.maps.event.addDomListener(window, 'load', initCarte);
     
    </script>

  18. #18
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    Pourrais tu nous mettre ton exemple simplifié en ligne que l'on voit ce que cela donne?

  19. #19
    Membre du Club
    Homme Profil pro
    Inscrit en
    Décembre 2005
    Messages
    137
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Décembre 2005
    Messages : 137
    Points : 47
    Points
    47
    Par défaut
    la carte est visible ici
    il faut se connecter avec le login '????????????' et le mdp 'xxxx'
    http://www.batenergie.net/eclairage-public

    LJ

  20. #20
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 048
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 048
    Points : 44 562
    Points
    44 562
    Par défaut
    il faut bien penser à regarder le code source HTML généré et on retrouve un magnifique
    <b>Fatal error</b>: Call to undefined function setQuery() in <b>/homez.615/batenerg/www/components/com_batenergie/views/batenergieep/tmpl/default_map.php</b> on line <b>78</b><br />

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Généraliser script pour plusieurs fichiers
    Par lovelace63 dans le forum Langage
    Réponses: 5
    Dernier message: 11/11/2012, 10h50
  2. [POO] Adapter un script d'autocompletion pour plusieurs champs texte
    Par tusssss dans le forum Général JavaScript
    Réponses: 10
    Dernier message: 14/04/2008, 17h18
  3. script pour automatiser le changement de mot de passe sur plusieurs hosts
    Par abiyas dans le forum Applications et environnements graphiques
    Réponses: 3
    Dernier message: 16/11/2007, 14h15
  4. Réponses: 3
    Dernier message: 17/08/2006, 11h30
  5. Script pour faire plusieurs page…
    Par sam01 dans le forum Langage
    Réponses: 7
    Dernier message: 14/04/2006, 21h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo