Skip to content
New issue

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

Integrating Leaflet-Environmental-Library . #269

Merged
merged 5 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion app/views/maps/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<%= stylesheet_link_tag "/lib/leaflet/dist/leaflet.css" %>
<%= javascript_include_tag('/lib/leaflet-environmental-layers/dist/LeafletEnvironmentalLayers.js') %>

<div class="container-fluid">
<div id="mapknitter-unique" style="height: 300px ; width: 100% ; margin-bottom: 1%"></div>
<div class="row">
<div class="col-md-3">
<% if logged_in? %>
Expand Down Expand Up @@ -42,15 +46,17 @@
<%= render :partial => 'maps/statistics' %>
</div>
</div><!-- .col-md-3 -->
<div class="maps-list col-md-9">

<div class="maps-list col-md-9">
<br>
<div class="hero">
<h1 style="margin-top:4px;">Make maps from aerial photos</h1>
<p>
<a class="btn btn-lg btn-primary" href="http://publiclab.org/wiki/mapknitter"><i class="fa fa-book"></i> Learn how</a>
<a class="btn btn-lg btn-success" onClick="$('#video-tutorial').toggle()"><i class="fa fa-video-camera"></i> Watch tutorial video</a>
<a class="btn btn-lg btn-primary" href="https://publiclab.org/post?tags=mapknitter,aerial-imaging,aerial-photography,question:mapknitter,question:aerial-imaging,question:aerial-photography&template=question">Ask a question</a>
</p>

</div>

<div style="display:none;" id="video-tutorial">
Expand All @@ -77,3 +83,16 @@
</div><!-- .col-md-9 -->
</div><!-- .row -->
</div>

<script>
var bounds = new L.LatLngBounds(new L.LatLng(84.67351257 , -172.96875) , new L.LatLng(-54.36775852 , 178.59375)) ;
var Mapknitterunique = new L.map('mapknitter-unique' , {
maxBounds: bounds ,
maxBoundsViscosity: 0.75
}).setView([43, -83] , 2);
Mapknitterunique.options.minZoom = 2 ;

L.tileLayer('https://a.tiles.mapbox.com/v3/jywarren.map-lmrwb2em/{z}/{x}/{y}.png').addTo(Mapknitterunique) ;
L.layerGroup.mapKnitterLayer().addTo(Mapknitterunique);

</script>
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"glfx-js": "git+https://github.com/jywarren/glfx.js.git",
"webgl-distort": "jywarren/webgl-distort",
"image-sequencer": "git+https://github.com/publiclab/image-sequencer.git#~1.4.0",
"junction": "theleagueof/junction"
"junction": "theleagueof/junction",
"leaflet-environmental-layers": "*"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will take latest version always , right ?
Can you confirm this @jywarren ?

},
"resolutions": {
"jquery": "^2.1.3"
Expand Down