Skip to content

Commit

Permalink
add back zoom control and specify tilesize
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Sep 27, 2015
1 parent 56fff98 commit ace4731
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion assets/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,17 @@ var Map = React.createClass({
zoomControl: false
});

new L.Control.Zoom({ position: 'topright' }).addTo(_this.map);

_this.map.attributionControl.setPrefix('<a href="http://www.davidrumsey.com/">David Rumsey</a> | <a href="http://library.stanford.edu">Stanford University Libraries</a>');

$.getJSON(this.state.mapid, function (data) {
_this.setState({ mapInfo: data });
_this.map.attributionControl.addAttribution(data.attribution);
var iiifLayer = L.tileLayer.iiif(data.sequences[0].canvases[0].images[0].resource.service['@id'] + '/info.json', {});
var iiifLayer = L.tileLayer.iiif(data.sequences[0].canvases[0].images[0].resource.service['@id'] + '/info.json', {
tileSize: 1024
});

_this.map.addLayer(iiifLayer);
var firstTime = true;
// Zoom in for more detail
Expand Down
4 changes: 4 additions & 0 deletions lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ var Map = React.createClass({
zoomControl: false
});

new L.Control.Zoom({ position: 'topright' }).addTo(_this.map);

_this.map.attributionControl.setPrefix('<a href="http://www.davidrumsey.com/">David Rumsey</a> | <a href="http://library.stanford.edu">Stanford University Libraries</a>');


$.getJSON(this.state.mapid, function(data) {
_this.setState({mapInfo: data});
_this.map.attributionControl.addAttribution(data.attribution);
var iiifLayer = L.tileLayer.iiif(data.sequences[0].canvases[0].images[0].resource.service['@id'] + '/info.json', {
tileSize: 1024
});

_this.map.addLayer(iiifLayer);
var firstTime = true;
// Zoom in for more detail
Expand Down

0 comments on commit ace4731

Please sign in to comment.