Commit 8c2ed2e639a3088e661ce5226bc17fbe277821bc
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/editor.js
(2 / 1)
  | |||
313 | 313 | else if(type === "map"){ | |
314 | 314 | var template = _.template($('#map-template').html()); | |
315 | 315 | $('#specific-content').html(template({ | |
316 | tileLayer: this.model.get('tileLayer') | ||
316 | tileLayer: this.model.get('tileLayer'), | ||
317 | shp: this.model.get('shp') | ||
317 | 318 | })); | |
318 | 319 | } | |
319 | 320 | }, |
mouchak/static/js/models.js
(2 / 1)
  | |||
61 | 61 | // Map model | |
62 | 62 | var Map = BaseType.extend({ | |
63 | 63 | defaults: _.extend(BaseType.prototype.defaults, { | |
64 | tileLayer: "" | ||
64 | tileLayer:"", | ||
65 | shp: "" | ||
65 | 66 | }), | |
66 | 67 | initialize: function(){ | |
67 | 68 | BaseType.prototype.initialize.call(this, arguments); |
mouchak/static/js/views.js
(5 / 0)
  | |||
124 | 124 | var restrictBounds = new L.LatLngBounds(southWest, northEast); | |
125 | 125 | M.map = new L.Map('map',{mapBounds: restrictBounds, zoom: 2, worldCopyJump: true, center:[14.604847155053898, 2.8125] }); | |
126 | 126 | 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 | } | ||
127 | 132 | } | |
128 | 133 | }); | |
129 | 134 |
  | |||
204 | 204 | m-data-target="tileLayer"> | |
205 | 205 | </div> | |
206 | 206 | </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> | ||
207 | 214 | <div class="preview"></div> | |
208 | 215 | </div> | |
209 | 216 | </script> |
mouchak/templates/login.html
(1 / 1)
  | |||
13 | 13 | <!-- Place favicon.ico in the root directory --> | |
14 | 14 | ||
15 | 15 | <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')}}"> | ||
17 | 17 | <style type="text/css"> | |
18 | 18 | .form-wrapper { | |
19 | 19 | height: 300px; |