Skip to content

Commit

Permalink
Merge pull request #135 from maptime/fit-chapters
Browse files Browse the repository at this point in the history
Set map bounds to chapters.geojson bounds
  • Loading branch information
geografa committed Mar 25, 2015
2 parents 5807325 + 2cab75b commit 5a1c5f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ $(function() {
clusterGroup.addLayer(chapterMarkers);
map.addLayer(clusterGroup);

// Fit map bounds to chapters.json
console.log(chapterMarkers.getBounds());
map.fitBounds(chapterMarkers.getBounds());

// Sort alphabetically; capitalization matters!
function sortAlphabetically(a,b) {
if (a.properties.title < b.properties.title)
Expand Down

0 comments on commit 5a1c5f3

Please sign in to comment.