0

I try to use WMS OGC services for weather forecasting I'm able to load WMS layer but when I move on the map layer follow the moving as an image who is stuck on the top of my screen. I set all the parameters and I can't figure out where is my problem...

Here is my code:

_loadMeteoFranceData : function (MFApiKey){
var requestMapOpts = {        
    version : "1.3.0",
    LAYERS : "TOTAL_WATER_PRECIPITATION__GROUND_OR_WATER_SURFACE",
    CRS : "EPSG:4326",
    styles : "EAU__GROUND__RADAR_SHADING",
    format : "png",
    width : "2048",
    height : "2048",
    BBOX : "38,-12,53,8",
    dim_reference_time : "2017-07-04T03:00:00Z",
    time : "2017-07-04T04:00:00Z",
    token : MFApiKey
};

var urlGetMapArome = "https://geoservices.meteofrance.fr/services/MF-NWP-HIGHRES-AROME-0025-FRANCE-WMS";   
var WMStest2 = new WMSLayer(urlGetMapArome,{
            format : requestMapOpts.format,
            version : requestMapOpts.version,
            visibleLayers : [requestMapOpts.LAYERS],
            opacity : 0.85,
            visible : true,
            resourceInfo: {
                getFeatureInfoURL: urlGetMapArome,
                getMapURL: urlGetMapArome,
                layerInfos: [
                      new WMSLayerInfo({
                name: requestMapOpts.LAYERS,
                title: "Quantité de précipitations sous forme liquide.",
                spatialReferences : new SpatialReference(4326),
                allExtents : [new Extent(38,-12,53,8, {wkid: 4326}),
                     new Extent(4230140.65014,-1345708.40841,5899933.01204,893463.751013,{wkid: 3857})],
                extent : new Extent(38,-12,53,8, {wkid: 4326}),
                legendURL : "https://geoservices.meteofrance.fr/api/"+MFApiKey+"/MF-NWP-HIGHRES-AROME-0025-FRANCE-WMS?service=WMS&version=1.3.0&sld_version=1.1.0&request=GetLegendGraphic&layer=TOTAL_WATER_PRECIPITATION__GROUND_OR_WATER_SURFACE&style=EAU__GROUND__RADAR_SHADING&format=image/png",
                description : "QTé précipitations modele AROME"
                      })],
                extent : new Extent(38,-12,53,8, {wkid: 4326}),

                customLayerParameters : {
            styles : requestMapOpts.styles,
            BBOX :requestMapOpts.BBOX,
            CRS : requestMapOpts.CRS,
            dim_reference_time : requestMapOpts.dim_reference_time,
            time : requestMapOpts.time,
            token: MFApiKey
            }}
            });

_map.addLayer(WMStest2); 
  • When you pan/zoom and look at the network traffic, are there any requests going to the service at all? If so, how does it differ from the original request (which works)? – Bjorn Svensson Jul 8 '17 at 16:20
  • Hi yes the resquest is sent with the right BBOX and ESPG but it seems the response is placed with screen coordinates and not geographics. Exactly if I pan/zoom, the request is sent to the service but when it's load he is fixed on my screen and i can see the same data at Paris and honolulu for example.. – Flo Jul 10 '17 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.