Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller.prototype.createRoof = function(data){
- console.log("CREATED");
- var type = data.layerType,
- layer = data.layer;
- layer.addTo(this.viewMap.map);
- //layer._latlngs hat die Koordinaten
- // oder layer.editing.latlngs
- $(layer).on('click', function () {
- if (layer.editing._enabled) {
- layer.editing.disable()
- } else {
- layer.editing.enable()
- }
- });
- this.viewMap.map.removeLayer(layer);
- var latlngs = data.layer.getLatLngs()[0];
- var roof = new Roof();
- roof.setPointsFromList(latlngs);
- roof.calculateOrientation(this);
- this.roof = roof;
- this.drawRoof();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement