dlamart
dlamart

Reputation: 1

Openlayer 3 change my bbox coordinates in my final http request

Compared to your experience maybe you can help me. I must query by this link:

https://geoservices.meteofrance.fr/inspire/services/MF-NWP-GLOBAL-ARPEGE-05-GLOBE-WMS?request=GetMap&service=WMS&version=1.3.0&LAYERS=TEMPERATURE__ISOBARIC_SURFACE&CRS=EPSG:4326&styles=T__ISOBARIC__SHADING&format=image/png&width=550&height=400&BBOX=10,-50,80,50&ELEVATION=850&token=key

I use openlayer 3 and when I query with the parameters of this link, I have a change of coordinates of the BBOX: here is my JS openlayer code (I use QgistoWeb layers.js, and I modify it):

var temperature = new ol.layer.Image({
    source: new ol.source.ImageWMS({
        url: 'https://geoservices.meteofrance.fr/inspire/services/MF-NWP-GLOBAL-ARPEGE-05-GLOBE-WMS',
        params: {'LAYERS': 'TEMPERATURE__ISOBARIC_SURFACE',
                'VERSION':'1.3.0',
                'TILE': true, 
                 'FORMAT': 'image/png',
                 'CRS':'EPSG:4326',
                 'STYLES':'T__ISOBARIC__SHADING',
                 'ELEVATION':'850',
                 'width':'550',
                 'height':'400',
                 'BBOX': '10,-50,80,50',
                 'TOKEN':'__BbjtPuAiIArNdbO0ZQOASVrsEbArTzsrogr9rRX5liA__'},
        projection: 'EPSG:4326'
    }),
    title: "TEMPERATURE ISOBARIC"
  });

Precision: I was forced to add the projection to 'EPSG: 4326' because I got 'EPSG: 3857' in my final http request.

In my final http request, I got:

BBOX=14.329041936927823%2C-61.370658874511726%2C14.938932479986605%2C-60.67646026611329

bbox: 10, -50, 80, 50 in my final http request.

Upvotes: 0

Views: 248

Answers (1)

Naghaveer R
Naghaveer R

Reputation: 2944

I think you are missing "token key" in the last portion of above url. For me below URL is working for me.

https://geoservices.meteofrance.fr/inspire/services/MF-NWP-GLOBAL-ARPEGE-05-GLOBE-WMS?request=GetMap&service=WMS&version=1.3.0&LAYERS=TEMPERATURE__ISOBARIC_SURFACE&CRS=EPSG:4326&styles=T__ISOBARIC__SHADING&format=image/png&width=550&height=400&BBOX=10,-50,80,50&ELEVATION=850&token=__BbjtPuAiIArNdbO0ZQOASVrsEbArTzsrogr9rRX5liA__

Upvotes: 0

Related Questions