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

IGN API Géoportail Discussion :

Redimensionnement sans fin


Sujet :

IGN API Géoportail

  1. #1
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Redimensionnement sans fin
    J'ai une page qui sur mon FF 3.6.10 n'arrête pas de se redimensionner vers la droite.
    La boite "Outils" disparait au bout de quelques itérations!
    Cela est très certainement une conséquence d'une mise en page incorrecte...

  2. #2
    Membre habitué
    Profil pro
    Inscrit en
    Août 2010
    Messages
    177
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 177
    Points : 191
    Points
    191
    Par défaut
    J' ai aussi firefox 3.6.10 et cela ne m'est jamais arrivé, il faudrait un code ou un lien pour tester.

  3. #3
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Le lien manquant

  4. #4
    Membre habitué
    Profil pro
    Inscrit en
    Août 2010
    Messages
    177
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 177
    Points : 191
    Points
    191
    Par défaut
    Bonjour,

    Est-ce que cela ne serait pas le fait de mettre infinity, a ce que je me rappelle dans les codes que j'ai vu c'était plutot -180, +180 à l'horizontal et 90 -90 à la verticale pour ce code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Function: initBounds
      initialise les bornes
      Parameters:
      Returns:
    */
      this.initBounds = function () {
        console.log('initBounds()');
        this.minX = Infinity;
        this.maxX = -Infinity;
        this.minY = Infinity;
        this.maxY = -Infinity;
      };
    ps: je ne pourrai répondre que ce soir

  5. #5
    Membre éprouvé Avatar de cmail
    Homme Profil pro
    Inscrit en
    Mai 2009
    Messages
    1 730
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations forums :
    Inscription : Mai 2009
    Messages : 1 730
    Points : 966
    Points
    966
    Par défaut
    Ce ne peut pas être la fin de balise </div> manquante???
    Ce serait trop simple!

  6. #6
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Ajout de la balise </div>
    Je viens d'envoyer la page modifiée et même punition.

  7. #7
    Expert confirmé
    Homme Profil pro
    Ingénieur cartographe
    Inscrit en
    Avril 2009
    Messages
    3 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur cartographe
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2009
    Messages : 3 173
    Points : 4 224
    Points
    4 224
    Par défaut
    Citation Envoyé par mga_geo Voir le message
    Je viens d'envoyer la page modifiée et même punition.
    J'ai aussi le problème sous FF3.6.10 Linux

    Pour vérifier pourquoi le container d'étend, pourrais-tu rajouter ceci dans ta page (la méthode est appelée jusqu'à ce que la taille soit la bonne) :

    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
        /**
         * APIMethod: setInformationPanelVisibility
         * Allows to show or not the information panel (the blue bar just under the
         * map).
         *
         * Parameters:
         * b - {Boolean} If true, show the panel, if not, do not show it.
         */
        Geoportal.Viewer.Default.prototype.setInformationPanelVisibility= function(b) {
            if (this.mode=="mini") {b= false;}
            if (this.timeout[b]) { window.clearTimeout(this.timeout[b]); this.timeout[b]= null; }
            var reload= false;
            if (!b && this.timeout[!b]) {
                reload= true;
            } else {
                var rh= this.div.offsetHeight;
                var loading= this.ready.h==-1;
                if (loading) {
                    if (/\d(%|em|pt)/.test(this.div.style.height)) {
                        rh= Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode) || rh;
                    } else {
                        rh= parseInt(this.div.style.height) || rh;
                    }
                    var bh= this.mapCell.offsetHeight - this.mapCell.clientHeight;//border-top + border-bottom
                    var bw= this.mapCell.offsetWidth - this.mapCell.clientWidth;//border-left + border-right
                    var h= rh - (this.infoCntrl? this.mapInfoDiv.offsetHeight : 0) - bh;
                    var w= this.div.offsetWidth - bw;
                    this.ready.h= h;
                    this.ready.w= w;
                    this.ready.b= bh;
                    reload= !this.isMapReady(b);
                    this.mapTbl.style.height= rh+'px';//table
                }
                if (b) {
                    this.mapCell.style.height= this.ready.h+'px';
                    if (this.infoCntrl) { this.infoCntrl.div.style.display= ""; }
                } else {
                    this.mapCell.style.height= (rh-this.ready.b)+'px';
                    if (this.infoCntrl) { this.infoCntrl.div.style.display= "none"; }
                }
                if (this.infoCntrl) { this.infoCell.style.height= this.mapInfoDiv.offsetHeight+'px'; }
                this.mapCell.style.width= this.ready.w+'px';
                this.mapDiv.style.height= this.mapCell.style.height;
                this.mapDiv.style.width= this.mapCell.style.width;
                if (loading) {
                    reload= reload || !this.isMapReady(b);
                }
            }
            if (reload) {
                if (b || (!b && !this.timeout[!b])) {
                    this.ready.h= -1;
                }
                this.timeout[b]=
                    window.setTimeout(OpenLayers.Function.bind(function(b){this.setInformationPanelVisibility(b);},this,b),500);
            } else {
                this.setSize(this.div.offsetWidth, this.div.offsetHeight);
            }
        };
    
        /**
         * APIMethod: isMapReady
         * Checks whether the map's div is rendered or not.
         *
         * Returns:
         * {Boolean} true if ready, false otherwise.
         */
        Geoportal.Viewer.Default.prototype.isMapReady= function() {
            var b= arguments[0];
            var ready= (
                this.mapTbl!=null &&
                this.mapCell!=null &&
                (this.infoCntrl? this.infoCell!=null : true) &&
                (this.infoCntrl? this.mapInfoDiv!=null : true) &&
                this.div!=null &&
                !(this.mapCell.clientHeight==1) &&
                (this.infoCntrl? this.mapCell.clientHeight>this.infoCell.clientHeight : true) &&
                (this.infoCntrl? this.mapInfoDiv.offsetHeight==this.infoCell.offsetHeight : true) &&
                this.div.offsetWidth==this.div.scrollWidth &&
                this.div.offsetWidth==this.mapTbl.offsetWidth &&
                this.div.offsetWidth==this.mapTbl.scrollWidth &&
                this.div.offsetHeight==this.div.scrollHeight &&
                this.div.offsetHeight==this.mapTbl.offsetHeight &&
                this.div.offsetHeight==this.mapTbl.scrollHeight &&
                this.mapDiv.clientWidth==parseInt(this.mapCell.style.width) &&
                this.mapDiv.clientHeight==parseInt(this.mapCell.style.height)
            ) &&
            !(
                this.timeout &&
                ((b!=undefined && this.timeout[b]) ||
                 (b==undefined && (this.timeout[true] || this.timeout[false])))
            );
            return ready;
        };
    Ce code est celui de développement ... Avec les bons points d'arrêt on devrait voir ce qui provoque ce comportement

  8. #8
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Ajout du code de développement
    Sur http://atlasnw.free.fr/geoportail/exemples/json.html, le code est présent.
    Il est bien activé (cf la console firebug).
    J'ai simplifié ma page pour le debug.

  9. #9
    Expert confirmé
    Homme Profil pro
    Ingénieur cartographe
    Inscrit en
    Avril 2009
    Messages
    3 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur cartographe
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2009
    Messages : 3 173
    Points : 4 224
    Points
    4 224
    Par défaut
    Citation Envoyé par mga_geo Voir le message
    Sur http://atlasnw.free.fr/geoportail/exemples/json.html, le code est présent.
    Il est bien activé (cf la console firebug).
    J'ai simplifié ma page pour le debug.
    Je remarque que la DIV qui contient la carte ... n'est pas une DIV, mais un TD
    A chaque vérification, la taille en largeur de la cellule augmente de deux ... Serait-il possible de mettre une vraie DIV dans le TD pour voir si c'est lié ?

  10. #10
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Passage en div
    Cela ne boucle plus, mais cela tronque à droite...

  11. #11
    Expert confirmé
    Homme Profil pro
    Ingénieur cartographe
    Inscrit en
    Avril 2009
    Messages
    3 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur cartographe
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2009
    Messages : 3 173
    Points : 4 224
    Points
    4 224
    Par défaut
    Citation Envoyé par mga_geo Voir le message
    Cela ne boucle plus, mais cela tronque à droite...
    Le TD est plus grand que la DIV ...

    Peux-tu essayer de mettre width:100% dans le style de la DIV ?

  12. #12
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Bof
    Cela n'a pas l'air d'améliorer ...

  13. #13
    Expert confirmé
    Homme Profil pro
    Ingénieur cartographe
    Inscrit en
    Avril 2009
    Messages
    3 173
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur cartographe
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2009
    Messages : 3 173
    Points : 4 224
    Points
    4 224
    Par défaut
    Citation Envoyé par mga_geo Voir le message
    Cela n'a pas l'air d'améliorer ...
    Le premier DIV a un overflow:hidden qui tronque le dessous ...
    Bizarre

  14. #14
    Membre chevronné
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    2 128
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 2 128
    Points : 1 764
    Points
    1 764
    Par défaut Le gagnant est ...
    Didier!

    Mais le code de l'API a peut-être encore à se protéger contre ses utilisateurs...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [VBA-E]Boucle Wend sans fin ??
    Par frevale dans le forum Macros et VBA Excel
    Réponses: 15
    Dernier message: 26/05/2006, 16h14
  2. C : utilisation de getopt - il boucle sans fin...
    Par moussmouss dans le forum C
    Réponses: 14
    Dernier message: 21/12/2005, 11h35
  3. Boucle sans fin : danger pour le serveur ?
    Par Rémiz dans le forum Langage
    Réponses: 4
    Dernier message: 09/12/2005, 16h52
  4. [SQL SERVER 2000] Fonction utilisateur : boucle sans fin
    Par galinijay dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 30/09/2005, 16h03
  5. WaitForCompletion sans fin
    Par Brunoo dans le forum DirectX
    Réponses: 3
    Dernier message: 09/09/2004, 18h12

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