AstronomyAPI / Samples

Examples for Astronomy API
https://astronomyapi.com
MIT License
30 stars 3 forks source link

Specifying Chart Style always results in 'Inverted' Style #53

Closed jacktomsett closed 1 year ago

jacktomsett commented 1 year ago

I have been trying to make calls to return star charts. When I call without specifying a style it works as expected as returns a URL to a chart in the default style. However when I specify a style I always get an image in the 'Inverted' style, even when I put the value as 'red' or 'navy'. Has anyone else noticed this behaviour?

astroanu commented 1 year ago

Could you please post the request body you're passing?

jacktomsett commented 1 year ago

Sure, the following three request bodies all produce the same image (different URL's but the same image): { "observer" : { "date" : "2023-05-10", "latitude" : 53.412792205810547, "longitude" : 2.8017048835754395 }, "style" : "inverted", "view" : { "parameters" : { "position" : { "equatorial" : { "declination" : 26.090000152587891, "rightAscension" : 6.2399997711181641 } } }, "type" : "area" } }

{ "observer" : { "date" : "2023-05-10", "latitude" : 53.412792205810547, "longitude" : 2.8017048835754395 }, "style" : "navy", "view" : { "parameters" : { "position" : { "equatorial" : { "declination" : 26.090000152587891, "rightAscension" : 6.2399997711181641 } } }, "type" : "area" } }

{ "observer" : { "date" : "2023-05-10", "latitude" : 53.412792205810547, "longitude" : 2.8017048835754395 }, "style" : "red", "view" : { "parameters" : { "position" : { "equatorial" : { "declination" : 26.090000152587891, "rightAscension" : 6.2399997711181641 } } }, "type" : "area" } }

jacktomsett commented 1 year ago

Sorry this is the first time I've commented on github, not sure why it came out obnoxiously large like that!

jacktomsett commented 1 year ago

Just for further update. I have just tried using the same endpoint using the constellation view type. Now I always get the 'red' style image

astroanu commented 1 year ago

looks like a bug. i'll take a look.

astroanu commented 1 year ago

This should be fixed now.