Commit 8c2ed2e639a3088e661ce5226bc17fbe277821bc

  • avatar
  • arvind
  • Fri Oct 04 13:04:24 IST 2013
Feature completions
        - Adding an option to specify shapefiles in geoJSON format
        - login.html uses the new bootstrap file now
  
313313 else if(type === "map"){
314314 var template = _.template($('#map-template').html());
315315 $('#specific-content').html(template({
316 tileLayer: this.model.get('tileLayer')
316 tileLayer: this.model.get('tileLayer'),
317 shp: this.model.get('shp')
317318 }));
318319 }
319320 },
  
6161 // Map model
6262 var Map = BaseType.extend({
6363 defaults: _.extend(BaseType.prototype.defaults, {
64 tileLayer: ""
64 tileLayer:"",
65 shp: ""
6566 }),
6667 initialize: function(){
6768 BaseType.prototype.initialize.call(this, arguments);
  
124124 var restrictBounds = new L.LatLngBounds(southWest, northEast);
125125 M.map = new L.Map('map',{mapBounds: restrictBounds, zoom: 2, worldCopyJump: true, center:[14.604847155053898, 2.8125] });
126126 L.tileLayer(this.model.get("tileLayer")).addTo(M.map);
127 if(this.model.has("shp")){
128 $.getJSON(this.model.get("shp"), function(data){
129 L.geoJSON(data);
130 });
131 }
127132 }
128133 });
129134
  
204204 m-data-target="tileLayer">
205205 </div>
206206 </div>
207 <div class="form-group">
208 <div class="input-group">
209 <span class="input-group-addon"><strong>Shapefile</strong></span>
210 <input class="form-control" type="text" placeholder="" value="<%= shp %>"
211 m-data-target="shp">
212 </div>
213 </div>
207214 <div class="preview"></div>
208215 </div>
209216 </script>
  
1313 <!-- Place favicon.ico in the root directory -->
1414
1515 <link rel="stylesheet" href="{{url_for('static', filename='css/normalize.css')}}">
16 <link rel="stylesheet" href="{{url_for('static', filename='css/bootstrap.css')}}">
16 <link rel="stylesheet" href="{{url_for('static', filename='css/bootstrap.min.css')}}">
1717 <style type="text/css">
1818 .form-wrapper {
1919 height: 300px;