You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If they forget latitude and longitude or don't know how to do it: Could we display a grey area/div? Because otherwise we get this "map error" thing which is not so nice 😰 :
I don't think detecting a "map error" is possible, but an even better approach would be to validate the latitude and longitude values provided in the Markdown file. According to Google Static Maps Developer Guide:
Latitude and longitude values must correspond to a valid location on the face of the earth. Latitudes can take any value between -90 and 90 while longitude values can take any value between -180 and 180. If you specify an invalid latitude or longitude value, your request will be rejected as a bad request.
It should be possible to write some Ruby code to validate these values. If invalid values are provided, Travis would fail the pull request.
Activity
davidchambers commentedon Jun 1, 2017
I don't think detecting a "map error" is possible, but an even better approach would be to validate the
latitudeandlongitudevalues provided in the Markdown file. According to Google Static Maps Developer Guide:It should be possible to write some Ruby code to validate these values. If invalid values are provided, Travis would fail the pull request.
vsmart commentedon Jul 3, 2018
I see that the latitude/longitude values as min/max are encoded in the
validate-filelogic :https://github.com/ClojureBridge/clojurebridge.github.io/blob/master/validate-yaml.cljs#L20-L21
I think this means that the build would fail if incorrect values are given and that we can close here. cc @davidchambers
davidchambers commentedon Jul 3, 2018
Good point, Franka. :)