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 :

API Géoportail / ArcGIS Server


Sujet :

IGN API Géoportail

  1. #21
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Je ne trouve pas l'onglet paramètres... J'ai seulement "Entêtes", "Réponses" et "Cache".
    Dans l'onglet réponse j'ai:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
    <ServiceExceptionReport version="1.1.1">
      <ServiceException code="RequestNotAllowed">
    The request not allowed.
      </ServiceException>
    </ServiceExceptionReport>

  2. #22
    Membre éclairé Avatar de elias couppe
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2014
    Messages
    407
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2014
    Messages : 407
    Points : 786
    Points
    786
    Par défaut
    Bonjour,

    Les problèmes de Cross-Origin que l'on aperçoit peuvent la plupart du temps être réglés par l'utilisation d'un proxy.

    Cependant, pour vous aider, nous devons comprendre comment est construite votre requête.

    Dans firebug, dans l'onglet réseau, pouvez vous faire click droit sur une des lignes qui correspond à une de vos requêtes WMS, copier l'adresse, et la coller ici (en masquant préalablement votre numéro de clé) ?

    Merci d'avance,

    Elias

  3. #23
    Membre éclairé Avatar de elias couppe
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2014
    Messages
    407
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2014
    Messages : 407
    Points : 786
    Points
    786
    Par défaut
    En regardant votre code, cette partie du code est inutile dans votre cas (controle pour une sélection de features WFS) :

    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
    // GetFeature WMS
    								var wfsGFCtrl= new OpenLayers.Control.GetFeature({
                                                protocol: new OpenLayers.Protocol.WFS({
                                                    url:"http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer",
                                                    featurePrefix:'ms',
                                                    featureNS:'http://mapserver.gis.umn.edu/mapserver',
                                                    geometryName:'msGeometry',
                                                    //featureType:['rgp', 'sit_rbf', 'sit_rdf', 'rn'],
                                                    featureType:['rnType', 'sit_rbfType', 'sit_rdfType'],
                                                    //srsName:'EPSG:4326',
                                                    //version:'1.0.0',
                                                    formatOptions:{
                                                        // WARNING: because of EPSG:4326 in Mapserver
                                                        //          WFS 1.1.0 (axis order) :
                                                        //          xy must be false in WFS 1.1.0 and
                                                        //          true in WFS 1.0.0 !
                                                        xy:true,
                                                        // keep coordinates as sent :
                                                        //internalProjection:this.getViewer().getMap().getProjection().clone(),
                                                        //externalProjection:new OpenLayers.Projection('EPSG:4326')
                                                    }
                                                }),
                                                // select by bbox only
                                                box:true,
                                                click:false,
                                                clickout:false,
                                                eventListeners:{
                                                    'featuresselected': function(e) {
                                                        gfResults.value+= '\n/* --- */\n' + gfGeoJSON.write(e.features,true);
                                                    }
                                                }
                                            });
                                            this.getViewer().getMap().addControl(wfsGFCtrl);
                                            // open layer switcher
                                            this.getViewer().openLayersPanel(true);
                                        
                                            var e= OpenLayers.Util.getElement('getFeatureToggle');
                                            e.onclick= function() {
                                                // context is input checkbox
                                                if (this.checked) {
                                                    wfsGFCtrl.activate();
                                                } else {
                                                    wfsGFCtrl.deactivate();
                                                }
                                            };
                                            e= OpenLayers.Util.getElement('getFeatureClean');
                                            e.onclick= function() {
                                                gfResults.value= '';
                                            };
                                        
                                            // open layer switcher advanced panel
                                            var wmss= this.getViewer().getMap().getLayersByClass('OpenLayers.Layer.WMS');
                                            var ptcs= this.getViewer().getMap().getControlsByClass('Geoportal.Control.PanelToggle');
                                            for (var i= 0, n= wmss.length; i<n; i++) {
                                                for (var j= 0, l= ptcs.length; j<l; j++) {
                                                    if (ptcs[j].id.indexOf(wmss[i].id)!=-1) {
                                                        ptcs[j].panel.activateControl(ptcs[j]);
                                                        break;
                                                    }
                                                }
                                            }
    Pour le proxy, ajouter :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    proxyUrl:votreProxy?url=
    (voir la documentation liée au cross-domain sur cette page de documentation)

    Bon week-end,

    Elias

  4. #24
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Dans firebug, dans l'onglet réseau, pouvez vous faire click droit sur une des lignes qui correspond à une de vos requêtes WMS, copier l'adresse, et la coller ici (en masquant préalablement votre numéro de clé) ?
    Voici l'adresse que j'obtiens:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?LAYERS=1&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A3857&BBOX=260298.45229026442,6249148.697685922,262744.43719539046,6251594.682591047&WIDTH=256&HEIGHT=256
    Lorsque j'enlève le Get Feature WFS, j'ai l'impression qu'il ne se passe plus rien lorsque je clique sur un élément (alors qu'avant il y a avait un icône de chargement qui apparaissait).
    J'ai rajouté le proxy ici:
    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
    overlays:{
    		    'wms':[
    		    	{
    		    		name:"interstation_lineaire",
    		    		url:"http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer",
    				options:{
    		  			params:{
    	    				        layers:'1',
    	    				        transparent:'true'
    		    			},
    		    			options:{
    		    				minZoomLevel: 13,
    		 				maxZoomLevel:20,
    		    				opacity:1,
    						legends:[{ 
    		 						href: "http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=1&format=ima/png&STYLE=default",
    		   						width:30,
    								height:22
    		 				}],
    		    				visibility: true,
    		    				originators:[
    		                     				{
    								logo:'RATP',
    								pictureUrl: './RATP.jpg',
    								url: 'http://ratp.fr/'
    			   					}
    		   				],
    						proxy:'http://d-idg.info.ratp:6080?url=',
    						afterAdd:attachGetFeatureInfoControl
    	 			      }
    	    		       }
    		   	},
                         ]
    Est-ce bon ?

    Merci d'avance

  5. #25
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?LAYERS=1&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A3857&BBOX=260298.45229026442,6249148.697685922,262744.43719539046,6251594.682591047&WIDTH=256&HEIGHT=256
    Ceci est une requête GetMap, elle permet d'afficher les image de votre WMS, a priori vous n'avez pas de problème à ce niveau.

    Il faudrait que vous nous fournissiez une requête de ce type :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?LAYERS=1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&...
    Lorsque j'enlève le Get Feature WFS, j'ai l'impression qu'il ne se passe plus rien lorsque je clique sur un élément (alors qu'avant il y a avait un icône de chargement qui apparaissait).
    Peut-être, mais votre service est un WMS et non un WFS, vous ne pouvez donc pas lui demander un GetFeature. Il faut donc bien retirer cette partie de code.

    Pour éviter la confusion qui est possible avec l'exemple que je vous avais fourni, essayez de passer par la documentation : http://api.ign.fr/documentation/81/a...de-couches-wms, rubrique "Exploiter la méthode GetFeatureInfo du protocole WMS"

    Il est très difficile pour nous de vous aider sans avoir accès à votre page et à votre service.

  6. #26
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    En suivant la documentation, j'ai donc rajouté cette partie dans mon code (en supprimant l'autre fonction function attachGetFeatureInfoControl() que j'avais avant) :
    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
    function addGetFeatureInfoControl() {
                // fabrication de l'id de la barre d'outils dans le layerSwitcher :
                // "basic_<LayerSwitcherId>_<LayerId>"
                var lsid= "" ;
                var lss= this.map.getControlsByClass("Geoportal.Control.LayerSwitcher") ;
                lsid= lss[0].id+"_" ;
                //this===layer
                var blc= this.map.getControlsBy('id', 'basic_'+lsid+this.id)[0];
                if (!blc) { return; }
                var wic= new OpenLayers.Control.WMSGetFeatureInfo({
                    url:"http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer",
                    layers:[this],//'0','1','2','3','4','5','6','7','8','9','10'
                    title:"Identifier les « " + this.name + " »",
                    type:OpenLayers.Control.TYPE_BUTTON,
                    queryVisible:true,
                    maxFeatures:1,
                    eventListeners:{
                        getfeatureinfo:function(event) {
                            //this===control
                            if (event.text) {
                                this.map.addPopup(new
                                    OpenLayers.Popup.FramedCloud(
                                        "chicken",
                                        this.map.getLonLatFromPixel(event.xy),
                                        null,
                                        event.text,
                                        null,
                                        true,
                                        function(){
                                            console.log("close manually");
                                            this.destroy();
                                        }
                                    )
                                );
                            }
                        }
                    }
                });
                
                blc.addControls([wic]);
                // by default, it's activated !
                wic.activate();
            }
    J'obtiens donc comme requête (dans "Statut", il est marqué "400 Mauvaise requête") :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=257519.455033%2C6249069.050147%2C263233.122898%2C6252871.792304&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=473&Y=90
    J'ai essayé ce même code avec les données du Sandre : la requête n'indique pas d'erreur mais aucune info-bulle ne s'ouvre...

    J'imagine bien que ce doit être dur de m'aider sans voir ma page, mais celle-ci n'est accessible qu'en interne... j'en suis désolé.

  7. #27
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    OK, et si vous copiez/collez la requête dans votre navigateur, qu'est-ce que vous obtenez?

  8. #28
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    Pouvez-vous également nous fournir les Capacités du service ?

    http://d-idg.info.ratp:6080/arcgis/s...etCapabilities

  9. #29
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    En lançant la requête dans le navigateur j'ai :Nom : feature-info.PNG
Affichages : 845
Taille : 13,4 Ko

  10. #30
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Avec le GetCapabilities j'obtiens le xml suivant:
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <WMT_MS_Capabilities version="1.1.1">
      <Service>
        <Name><![CDATA[WMS]]></Name>
        <Title>OGC:WMS</Title>
        <Abstract>OGC:WMS</Abstract>
        <KeywordList><Keyword><![CDATA[]]></Keyword></KeywordList>
        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?"/>
        <ContactInformation>
          <ContactPersonPrimary>
            <ContactPerson><![CDATA[]]></ContactPerson>
            <ContactOrganization><![CDATA[]]></ContactOrganization>
          </ContactPersonPrimary>
          <ContactPosition><![CDATA[]]></ContactPosition>
          <ContactAddress>
            <AddressType><![CDATA[]]></AddressType>
            <Address><![CDATA[]]></Address>
            <City><![CDATA[]]></City>
            <StateOrProvince><![CDATA[]]></StateOrProvince>
            <PostCode><![CDATA[]]></PostCode>
            <Country><![CDATA[]]></Country>
          </ContactAddress>
          <ContactVoiceTelephone><![CDATA[]]></ContactVoiceTelephone>
          <ContactFacsimileTelephone><![CDATA[]]></ContactFacsimileTelephone>
          <ContactElectronicMailAddress><![CDATA[]]></ContactElectronicMailAddress>
        </ContactInformation>
        <Fees><![CDATA[]]></Fees>
        <AccessConstraints><![CDATA[]]></AccessConstraints>
      </Service>
      <Capability>
        <Request>
          <GetCapabilities>
            <Format>application/vnd.ogc.wms_xml</Format>
            <DCPType>
              <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?"/></Get></HTTP>
            </DCPType>
          </GetCapabilities>
          <GetMap>
            <Format>image/bmp</Format>
            <Format>image/jpeg</Format>
            <Format>image/tiff</Format>
            <Format>image/png</Format>
            <Format>image/png8</Format>
            <Format>image/png24</Format>
            <Format>image/png32</Format>
            <Format>image/gif</Format>
            <Format>image/svg+xml</Format>
            <DCPType>
              <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?"/></Get></HTTP>
            </DCPType>
          </GetMap>
          <GetFeatureInfo>
            <Format>application/vnd.esri.wms_raw_xml</Format>
            <Format>application/vnd.esri.wms_featureinfo_xml</Format>
            <Format>application/vnd.ogc.wms_xml</Format>
            <Format>application/geojson</Format>
            <Format>text/xml</Format>
            <Format>text/html</Format>
            <Format>text/plain</Format>
            <DCPType>
              <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?"/></Get></HTTP>
            </DCPType>
          </GetFeatureInfo>
          <GetStyles>
            <Format>application/vnd.ogc.sld+xml</Format>
            <DCPType>
              <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?"/></Get></HTTP>
            </DCPType>
          </GetStyles>
        </Request>
        <Exception>
          <Format>application/vnd.ogc.se_xml</Format>
          <Format>application/vnd.ogc.se_inimage</Format>
          <Format>application/vnd.ogc.se_blank</Format>
        </Exception>
        <Layer>
          <Title><![CDATA[Couches]]></Title>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065158" miny="48.692932" maxx="2.784018" maxy="48.948079"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065158" miny="48.692932" maxx="2.784018" maxy="48.948079"/>
    <BoundingBox SRS="EPSG:3949" minx="1631527.488400" miny="8166274.198400" maxx="1684101.556400" maxy="8194249.115600"/>
          <Layer queryable="1">
            <Name>0</Name>
            <Title><![CDATA[interstation_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065160" miny="48.692932" maxx="2.784018" maxy="48.947953"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065160" miny="48.692932" maxx="2.784018" maxy="48.947953"/>
    <BoundingBox SRS="EPSG:3949" minx="1631527.488400" miny="8166274.198400" maxx="1684101.556400" maxy="8194235.092100"/>
            <Style>
              <Name>default</Name>
              <Title>0</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=0" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>1</Name>
            <Title><![CDATA[interstation_lineaire]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065160" miny="48.692932" maxx="2.784018" maxy="48.947981"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065160" miny="48.692932" maxx="2.784018" maxy="48.947981"/>
    <BoundingBox SRS="EPSG:3949" minx="1631527.488400" miny="8166274.198400" maxx="1684101.556400" maxy="8194238.243500"/>
            <Style>
              <Name>default</Name>
              <Title>1</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=1" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>2</Name>
            <Title><![CDATA[station_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065217" miny="48.693899" maxx="2.783238" maxy="48.947624"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065217" miny="48.693899" maxx="2.783238" maxy="48.947624"/>
    <BoundingBox SRS="EPSG:3949" minx="1631531.164100" miny="8166381.697900" maxx="1684044.441500" maxy="8194198.722400"/>
            <Style>
              <Name>default</Name>
              <Title>2</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=2" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>3</Name>
            <Title><![CDATA[station_lineaire]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065901" miny="48.693944" maxx="2.783321" maxy="48.947617"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065901" miny="48.693944" maxx="2.783321" maxy="48.947617"/>
    <BoundingBox SRS="EPSG:3949" minx="1631581.305100" miny="8166386.118600" maxx="1684050.580900" maxy="8194197.928200"/>
            <Style>
              <Name>default</Name>
              <Title>3</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=3" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>4</Name>
            <Title><![CDATA[quai_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065188" miny="48.694024" maxx="2.783321" maxy="48.947586"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065188" miny="48.694024" maxx="2.783321" maxy="48.947586"/>
    <BoundingBox SRS="EPSG:3949" minx="1631528.994200" miny="8166395.653800" maxx="1684050.580900" maxy="8194194.419500"/>
            <Style>
              <Name>default</Name>
              <Title>4</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=4" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>5</Name>
            <Title><![CDATA[quai_lineaire]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.065188" miny="48.694024" maxx="2.783321" maxy="48.947586"/>
    <BoundingBox SRS="EPSG:4326" minx="2.065188" miny="48.694024" maxx="2.783321" maxy="48.947586"/>
    <BoundingBox SRS="EPSG:3949" minx="1631528.994200" miny="8166395.653800" maxx="1684050.580900" maxy="8194194.419500"/>
            <Style>
              <Name>default</Name>
              <Title>5</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=5" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>6</Name>
            <Title><![CDATA[ouvrage_technique_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.122025" miny="48.764293" maxx="2.552283" maxy="48.947403"/>
    <BoundingBox SRS="EPSG:4326" minx="2.122025" miny="48.764293" maxx="2.552283" maxy="48.947403"/>
    <BoundingBox SRS="EPSG:3949" minx="1635693.120700" miny="8174160.363800" maxx="1667089.798600" maxy="8194248.636200"/>
            <Style>
              <Name>default</Name>
              <Title>6</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=6" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>7</Name>
            <Title><![CDATA[ouvrage_technique_lineaire]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.122025" miny="48.764293" maxx="2.552283" maxy="48.947403"/>
    <BoundingBox SRS="EPSG:4326" minx="2.122025" miny="48.764293" maxx="2.552283" maxy="48.947403"/>
    <BoundingBox SRS="EPSG:3949" minx="1635693.120700" miny="8174160.363800" maxx="1667089.798600" maxy="8194248.636200"/>
            <Style>
              <Name>default</Name>
              <Title>7</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=7" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>8</Name>
            <Title><![CDATA[emergence_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.122025" miny="48.766588" maxx="2.552241" maxy="48.947407"/>
    <BoundingBox SRS="EPSG:4326" minx="2.122025" miny="48.766588" maxx="2.552241" maxy="48.947407"/>
    <BoundingBox SRS="EPSG:3949" minx="1635693.120700" miny="8174415.492500" maxx="1667088.165500" maxy="8194249.115600"/>
            <Style>
              <Name>default</Name>
              <Title>8</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=8" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>9</Name>
            <Title><![CDATA[emergence_lineaire]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.122025" miny="48.766588" maxx="2.552241" maxy="48.947407"/>
    <BoundingBox SRS="EPSG:4326" minx="2.122025" miny="48.766588" maxx="2.552241" maxy="48.947407"/>
    <BoundingBox SRS="EPSG:3949" minx="1635693.120700" miny="8174415.492500" maxx="1667088.165500" maxy="8194249.115600"/>
            <Style>
              <Name>default</Name>
              <Title>9</Title>
              <LegendURL width="52" height="64">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=9" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
          <Layer queryable="1">
            <Name>10</Name>
            <Title><![CDATA[Defaut_surfacique]]></Title>
            <Abstract><![CDATA[]]></Abstract>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:3949</SRS>
    <LatLonBoundingBox minx="2.208647" miny="48.733885" maxx="2.518370" maxy="48.903251"/>
    <BoundingBox SRS="EPSG:4326" minx="2.208647" miny="48.733885" maxx="2.518370" maxy="48.903251"/>
    <BoundingBox SRS="EPSG:3949" minx="1641987.131100" miny="8170709.925500" maxx="1664574.988500" maxy="8189354.332700"/>
            <Style>
              <Name>default</Name>
              <Title>10</Title>
              <LegendURL width="16" height="16">
                <Format>image/png</Format>
                <OnlineResource xlink:href="http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WmsServer?request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=10" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
              </LegendURL>
            </Style>
          </Layer>
        </Layer>
      </Capability>
    </WMT_MS_Capabilities>

  11. #31
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    OK, donc la requête est correcte, que dit la console ?

  12. #32
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Dans la console :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    "NetworkError: 400 Mauvaise Requête - http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382"
    Blocage d'une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382. Raison : l'en-tête CORS « Access-Control-Allow-Origin » est manquant.
    Blocage d'une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382. Raison : échec de la requête CORS.

  13. #33
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    Citation Envoyé par Sworks Voir le message
    Dans la console :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    "NetworkError: 400 Mauvaise Requête - http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382"
    Blocage d'une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382. Raison : l'en-tête CORS « Access-Control-Allow-Origin » est manquant.
    Blocage d'une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=1&QUERY_LAYERS=1&STYLES=&BBOX=249694.793825%2C6243043.46189%2C272549.465282%2C6258254.430519&FEATURE_COUNT=1&HEIGHT=796&WIDTH=1196&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A3857&X=611&Y=382. Raison : échec de la requête CORS.

    C'est là qu'intervient le proxy.
    Cross-domain signifie croisement de domaines. C'est un principe qui vise à faire communiquer deux domaines ensemble.
    Par exemple, monsite.com peut envoyer des données à tonsite.com, tout comme ce dernier peut renvoyer des données à monsite.com.

    Solution:
    Afin de gérer les problèmes de sécurité liés à l'accès à des fichier XML situés sur un autre serveur, il faut un service que votre site web va mandater pour aller chercher les données : c'est le proxy (c'est une sorte de passe-plats). Ce denier doit être obligatoirement situé sur le même domaine que la page qui l'utilisera et devra appeler toutes les url externes. Vous pouvez télécharger un exemple de proxy ici.
    Utiliser la méthode setProxyUrl de la classe Geoportal.Map:

    maCarte.setProxyUrl('http://votre.site.web/proxy/monProxy.asp');
    ou comme elias vous l'avait précisé, ajouter l'attribut proxyUrl (après overlays: par exemple)
    proxyUrl:votreProxy?url=

    Attention, nous vous proposons un exemple de proxy qu'il faut configurer

    Edit : la documentation ici

  14. #34
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    J'ai téléchargé un exemple de proxy ASP en le modifiant comme suit :
    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
    <%@ LANGUAGE=JScript %>
    <%
        //Création de l'objet composant
        var objHTTP =Server.CreateObject("Coalesys.CSHttpClient.1");
    
        //Déclaration de variables
        var HTTPResponseBody = new String();
        var HTTPResponseHeaders = new String();
        var HTTPResponseStatus = new String();
    
        //On récupère l'URL à requêter sur Internet
        objHTTP.RequestURL = String(Request.Querystring).substr(4);
    
        //Éventuellement on précise la passerelle vers Internet
        //Cas d'un réseau local
        //objHTTP.ProxyAddress = "<193.104.162.7>";
        objHTTP.ProxyPort = <6080>;
        objHTTP.AppendHost = true;
    
        //On lance la requête HTTP
        objHTTP.Execute("GET");
    
        //On récupère le statut de la réponse
        HTTPResponseStatus = objHTTP.ResponseStatus;
    
        //On récupère les headers de la réponse
        HTTPResponseHeaders = objHTTP.ResponseHeaders;
    
        //On récupère le contenu de la réponse
        HTTPResponseBody = objHTTP.ResponseBody(0);
    
        //On écrit ce contenu tel quel
        //En précisant qu'il s'agit de XML
        Response.ContentType = "text/xml";
        Response.write(HTTPResponseBody);
    %>
    Ensuite, j'ai rajouté l'attribut proxyUrl en dessous overlays :
    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
    ....
                         overlays:{
    								    'wms':[
    								    	{
    								    		name:"interstation_lineaire",
    								    		url:"http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer",
    								    		options:{
    								    			params:{
    								    				layers:'1',
    								    				transparent:'true'
    								    			},
    								    			options:{
    								    				minZoomLevel: 13,
    								    				maxZoomLevel:20,
    								    				opacity:1,
    													legends:[{ 
    								    						href: "http://d-idg.info.ratp:6080/arcgis/services/ouvrages_cc49/MapServer/WMSServer?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=1&format=image/png&STYLE=default",
    								    						width:30,
    								    						height:22
    								    				}],
    								    				visibility: true,
    													afterAdd:addGetFeatureInfoControl,
    								    				originators:[
    								    					{
    								    						logo:'RATP',
    								    						pictureUrl: './RATP.jpg',
    								    						url: 'http://ratp.fr/'
    								    					}
    								    				],
    
    													
    								    			}
    								    		}
    								    	},
    								    	],
    								    },
    										proxyUrl:'193.104.162.7?url='
    	    					}
    J'ai relancer ma page mais pas de changement...

  15. #35
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    Ok, votre configuration correspond bien à votre proxy d'entreprise ? (s'il n'y en a pas, il n'y a a priori rien à modifier dans l'exemple)

    Sinon, dans l'attribut proxyUrl, il faut mettre l'url vers votre fichier proxy.asp suivi de ?url=

    par exemple : http://localhost/proxy/proxy.asp?url=

  16. #36
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Ok, en fait j'ai modifier alors qu'il n'y a pas de proxy d'entreprise :-)
    Je laisse donc le fichier proxy.asp comme ça :
    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
    <%@ LANGUAGE=JScript %>
    <%
        //Creation of the component
        var objHTTP =Server.CreateObject("Coalesys.CSHttpClient.1");
    
        //HTTP variables
        var HTTPResponseBody = new String();
        var HTTPResponseHeaders = new String();
        var HTTPResponseStatus = new String();
    
        //Target URL
        objHTTP.RequestURL = String(Request.Querystring).substr(4);
    
        //Possibly, use a proxy (LAN 2 WAN)
        //objHTTP.ProxyAddress = "<proxy_adress>";
        objHTTP.ProxyPort = <proxy_port>;
        objHTTP.AppendHost = true;
    
        //Execution of the request
        objHTTP.Execute("GET");
    
        //Status reception
        HTTPResponseStatus = objHTTP.ResponseStatus;
    
        //Headers reception
        HTTPResponseHeaders = objHTTP.ResponseHeaders;
    
        //Response body reception
        HTTPResponseBody = objHTTP.ResponseBody(0);
    
        //Forwarding of the response
        Response.ContentType = "text/xml";
        Response.write(HTTPResponseBody);
    %>
    Pour le proxyUrl j'ai donc mis : proxyUrl:'http://localhost/projects/proxy.asp?url='

    J'obtiens enfin une info-bulle (celle ci s'affiche lorsque je clique n'importe où sur la carte) !! Mais elle affiche le contenu du fichier proxy.asp...
    Nom : info-bulle.PNG
Affichages : 882
Taille : 1,23 Mo

  17. #37
    Membre averti Avatar de lowzonenose
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2014
    Messages
    196
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2014
    Messages : 196
    Points : 407
    Points
    407
    Par défaut proxy
    Bonjour,

    vous avez choisi de prendre le proxy ASP.
    OK, mais le code ASP est il bien interprété par votre serveur web ?
    Sous Windows, il faudrait par exemple un serveur IIS, et sous Linux, il est possible de prendre une version apache un peu particulière...
    Donc, sous quel OS est le serveur (windows/linux) ? Quel serveur web a t il à disposition (IIS, apache, tomcat, nginx, ...) ?

    Sinon, le PHP est très bien interprété par les différents serveurs du marché
    (souvent par défaut, ou via un module à activer dans la configuration, ...).

    @+

  18. #38
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    Le serveur est sous Windows, avec à disposition un serveur web Apache.

    Comme tu m'as conseillé, j'ai essayé avec un proxy PHP, et j'arrive bien à récupérer les informations dans les pop-up (enfin ).
    Par contre, même lorsque je ne clique pas sur un objet que j'ai récupéré de l'ArcGis Server, une pop-up vide s'affiche (voir capture d'écran).
    Que faut-il modifier pour que seuls mes objets soient cliquables et ouvrent une pop-up ?

    Nom : 2info-bulles.PNG
Affichages : 879
Taille : 1,42 Mo

    Merci

  19. #39
    Membre confirmé Avatar de acarme
    Femme Profil pro
    Ingénieur d'études en Géomatique
    Inscrit en
    Avril 2013
    Messages
    237
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études en Géomatique
    Secteur : Service public

    Informations forums :
    Inscription : Avril 2013
    Messages : 237
    Points : 522
    Points
    522
    Par défaut
    Dans le code de votre fonction :
    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
     getfeatureinfo:function(event) {
                            //this===control
                            if (event.text) {
                                this.map.addPopup(new
                                    OpenLayers.Popup.FramedCloud(
                                        "chicken",
                                        this.map.getLonLatFromPixel(event.xy),
                                        null,
                                        event.text,
                                        null,
                                        true,
                                        function(){
                                            console.log("close manually");
                                            this.destroy();
                                        }
                                    )
                                );
                            }
                        }
    vous faites : if (event.text) avant de créer votre infobulle, a priori, ce test n'arrête pas les réponses vides
    il faut donc regarder ce que contient event.text lorsque le getFeatureInfo ne renvoie pas de donnée
    par exemple en ajoutant un console.log ou une alert et modifier votre test en conséquence.

  20. #40
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2015
    Messages
    29
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Juillet 2015
    Messages : 29
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    Quand je met un alert(event.text) et que je clique à un endroit où getFeatureInfo ne renvoie pas de donnée, voilà ce que j'obtiens:
    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
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html xmlns:esri_wms="http://www.esri.com/wms" xmlns="http://www.esri.com/wms">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
    <style type="text/css">
    					table, th, td {
    						border:1px solid #e5e5e5;
    						border-collapse:collapse;
    						font-family: arial;					
    						font-size: 80%;						
    						color: #333333
    					}   					
    					th, td {
    						valign: top;
    						text-align: center;
    					}					
    					th {
    						background-color: #aed7ff
    					}
    				</style>
    </head>
    <body></body>
    </html>
    Je ne vois pas trop comment cela peut m'aider à modifier le test ?
    Merci

Discussions similaires

  1. Bienvenue sur le forum IGN API Géoportail
    Par achaumet dans le forum IGN API Géoportail
    Réponses: 3
    Dernier message: 21/09/2021, 16h52
  2. API Géoportail plein écran
    Par oncle sam dans le forum IGN API Géoportail
    Réponses: 6
    Dernier message: 19/12/2009, 12h56
  3. Concours de la meilleure application à partir de l'API Géoportail
    Par JP-Lagrange dans le forum IGN API Géoportail
    Réponses: 0
    Dernier message: 19/11/2009, 11h25
  4. Prix Api Géoportail pour accés fermé
    Par julien75000 dans le forum IGN API Géoportail
    Réponses: 2
    Dernier message: 17/07/2009, 17h20
  5. API Office Communication Server 2007?
    Par Ezekhiel dans le forum Général Dotnet
    Réponses: 5
    Dernier message: 03/10/2007, 09h36

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