var mapView = new ol.View({
  center: ol.proj.fromLonLat([-122.41, 43.82]),
  zoom: 6.5
});

var map = new ol.Map({
  target: 'map',
  layers: [
    new ol.layer.Tile({
      source: new ol.source.OSM()
    })
  ],
  view: mapView
});

var showNextBtn = function(show) {
  if (show) {
    document.querySelector('#btn-content-panel-next').classList.remove('disabled');
  } else {
    document.querySelector('#btn-content-panel-next').classList.add('disabled');
  }
}

var loadTaxLots = function(mapEvent) {
  var lonlat = mapEvent.coordinate;
  let taxlotsURL = '/landmapper/get_taxlot_json/';

  jQuery.ajax({
    url: taxlotsURL,
    data: {
      'coords': lonlat
    },
    success: function(data) {
        // var format = new OpenLayers.Format.WKT();
        let wkt = data.geometry;
        if (wkt == []) {
          window.alert('Taxlot info unavailable at this location - please draw instead.');
        } else {
          // feature = format.read(wkt);
          // if (! feature) {
            // For some reason, we get GeoJSON back instead of WKT
            // Clearly a bug in Madrona, but for now, just go with it.
            // format = new OpenLayers.Format.GeoJSON();
            // feature = format.read(wkt)[0];
            console.log(data);
          // }
        }
        //Add feature to vector layer
        // app.viewModel.scenarios.drawingFormModel.polygonLayer.addFeatures([feature]);
        // app.viewModel.scenarios.drawingFormModel.consolidatePolygonLayerFeatures();
        // app.viewModel.scenarios.drawingFormModel.hasShape(true);
    },
    error: function(error) {
        window.alert('Error retrieving taxlot - please draw instead.');
        console.log('error in map.js: Click Control trigger');
    }
  });
};


map.on('click', function(e) {
  showNextBtn(true);
  loadTaxLots(e);
});

@@ -1,12 +1,34 @@
+var landmapper = %7B%7D;%0A%0A
 var mapView 
@@ -104,24 +104,188 @@
 m: 6.5%0A%7D);%0A%0A
+landmapper.selectedFeatureSource = new ol.source.Vector();%0A%0Alandmapper.selectedFeatureLayer = new ol.layer.Vector(%7B%0A  source: landmapper.selectedFeatureSource%0A%7D);%0A%0A
 var map = ne
@@ -388,16 +388,53 @@
 )%0A    %7D)
+,%0A    landmapper.selectedFeatureLayer
 %0A  %5D,%0A  
@@ -452,20 +452,27 @@
 ew%0A%7D);%0A%0A
-var 
+landmapper.
 showNext
@@ -691,20 +691,27 @@
 %0A  %7D%0A%7D%0A%0A
-var 
+landmapper.
 loadTaxL
@@ -944,52 +944,40 @@
     
-  // var form
+var parsedD
 at
+a
  = 
-new OpenLayers.Format.WKT(
+JSON.parse(data
 );%0A 
@@ -985,33 +985,38 @@
     
-  let
+var
  wkt = 
-data.
+parsedData%5B'
 geometry
 ;%0A  
@@ -1011,20 +1011,60 @@
 geometry
+'%5D
 ;%0A  
+    var format = new ol.format.WKT();%0A
       if
@@ -1074,26 +1074,24 @@
 kt == %5B%5D) %7B%0A
-  
         wind
@@ -1173,18 +1173,16 @@
 ;%0A      
-  
 %7D else %7B
@@ -1182,36 +1182,35 @@
  else %7B%0A        
-  //
+var
  feature = forma
@@ -1219,439 +1219,125 @@
 read
-(wkt);%0A          // if (! feature) %7B%0A            // For some reason, we get GeoJSON back instead of WKT
+Feature(wkt);
 %0A      
+%7D%0A%0A
       
-// Clearly a bug in Madrona, but for now, just go with it.%0A            // format = new OpenLayers.Format.GeoJSON();%0A            // feature = format.read(wkt)%5B0%5D;%0A            console.log(data);%0A          // %7D%0A        %7D%0A        //Add feature to vector layer%0A        // app.viewModel.scenarios.drawingFormModel.polygon
+landmapper.selectedFeatureSource.addFeature(feature)%0A      // landmapper.selectedFeature
 Laye
@@ -1360,20 +1360,17 @@
 eature%5D)
-;%0A  
+%0A
       //
@@ -1442,26 +1442,24 @@
 Features();%0A
-  
       // app
@@ -1732,16 +1732,27 @@
 (e) %7B%0A  
+landmapper.
 showNext
@@ -1764,16 +1764,27 @@
 rue);%0A  
+landmapper.
 loadTaxL

Add selected features to source