Skip to content

Commit

Permalink
Merge pull request #36 from spwoodcock/fix/mbtile-center-metadata
Browse files Browse the repository at this point in the history
Assign zoom level for mbtiles center metadata, as per spec v1.3
  • Loading branch information
iandees authored Feb 8, 2025
2 parents 231a971 + 19f3b18 commit 6d302a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tilepack/mbtiles_outputter.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ func (o *mbtilesOutputter) AssignSpatialMetadata(bounds orb.Bound, minZoom mapti
center := bounds.Center()

strBounds := fmt.Sprintf("%f,%f,%f,%f", bounds.Min[0], bounds.Min[1], bounds.Max[0], bounds.Max[1])
strCenter := fmt.Sprintf("%f,%f", center[0], center[1])
// Set default center zoom as minZoom level
strCenter := fmt.Sprintf("%f,%f,%d", center[0], center[1], minZoom)

strMinzoom := strconv.Itoa(int(minZoom))
strMaxzoom := strconv.Itoa(int(maxZoom))
Expand Down

0 comments on commit 6d302a6

Please sign in to comment.