We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The example provided at the documentation does not seem to work:
package main import ( "image/color" sm "github.com/flopp/go-staticmaps" "github.com/fogleman/gg" "github.com/golang/geo/s2" ) func main() { ctx := sm.NewContext() ctx.SetSize(400, 300) ctx.AddObject( sm.NewMarker( s2.LatLngFromDegrees(52.514536, 13.350151), color.RGBA{0xff, 0, 0, 0xff}, 16.0, ), ) img, err := ctx.Render() if err != nil { panic(err) } if err := gg.SavePNG("my-map.png", img); err != nil { panic(err) } }
2024/10/28 15:51:00 Error downloading tile file: GET https://c.tile.openstreetmap.org/30/576689288/352165953.png: 400 Bad Request 2024/10/28 15:51:00 Error downloading tile file: GET https://c.tile.openstreetmap.org/30/576689287/352165954.png: 400 Bad Request 2024/10/28 15:51:00 Error downloading tile file: GET https://a.tile.openstreetmap.org/30/576689289/352165953.png: 400 Bad Request 2024/10/28 15:51:00 Error downloading tile file: GET https://a.tile.openstreetmap.org/30/576689288/352165954.png: 400 Bad Request 2024/10/28 15:51:00 Error downloading tile file: GET https://b.tile.openstreetmap.org/30/576689289/352165954.png: 400 Bad Request 2024/10/28 15:51:00 Error downloading tile file: GET https://b.tile.openstreetmap.org/30/576689287/352165953.png: 400 Bad Request
The text was updated successfully, but these errors were encountered:
Fix:
package main import ( "image/color" sm "github.com/flopp/go-staticmaps" "github.com/fogleman/gg" "github.com/golang/geo/s2" ) func main() { ctx := sm.NewContext() ctx.SetSize(600, 400) ctx.SetZoom(14) ctx.AddObject( sm.NewMarker( s2.LatLngFromDegrees(52.514536, 13.350151), color.RGBA{0xff, 0, 0, 0xff}, 16.0, ), ) img, err := ctx.Render() if err != nil { panic(err) } err = gg.SavePNG("my-map.png", img) if err != nil { panic(err) } }
Difference:
ctx.SetSize(600, 400) ctx.SetZoom(14)
Sorry, something went wrong.
No branches or pull requests
The example provided at the documentation does not seem to work:
The text was updated successfully, but these errors were encountered: