function ParamPoly(urlvar){
  console.warn("{ParamPoly} Loaded")
  function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
  }
  urlvar = urlvar || "passed"
  // when document ready
  // get url variable

  //image_data.provenance.analysis.execution_id = "url"
  Store.prototype.findMark_raw = Store.prototype.findMark
  Store.prototype.findMarkTypes_raw = Store.prototype.findMarkTypes
  Store.prototype.getMarkByIds_raw = Store.prototype.getMarkByIds
  Store.prototype.findMark = function (ids, slide){
    if (!urlvar in getUrlVars()){
      return x
    } else {
      // expecting feature collection so far
      let image_data = JSON.parse(decodeURI(getUrlVars(urlvar)))
      let dummy_mark = { "_id" : { "$oid" : "000"} , "provenance" : { "image" : { "slide" : "NO" , "slidename" : "NO"} , "analysis" : { "source" : "url" , "execution_id" : "URLPARAM"}} , "geometries" : { "type" : "FeatureCollection" , "features" : image_data}}
      return this.findMark_raw(ids, slide).then(x=>{
        x.push(dummy_mark)
        return x
      })
    }
  }

  Store.prototype.findMarkTypes = function(slide, name){
    if (!urlvar in getUrlVars()){
      return x
    } else {
      return this.findMarkTypes_raw(slide, name).then(x=>{
        let urltype = { "image" : { "slide" : "NO" , "slidename" : "NO"} , "analysis" : { "source" : "url" , "execution_id" : "URLPARAM"}}
        x.push(urltype)
        return x
      })
    }
  }

  Store.prototype.getMarkByIds = function(ids, slide){
    console.log(ids, slide)
    if (ids.includes('URLPARAM')){
      return this.getMarkByIds_raw(ids, slide).then(x=>{
        if (!urlvar in getUrlVars()){
          return x
        } else {
          // expecting feature collection so far
          let image_data = JSON.parse(decodeURI(getUrlVars(urlvar)))
          let dummy_mark = { "_id" : { "$oid" : "000"} , "provenance" : { "image" : { "slide" : "NO" , "slidename" : "NO"} , "analysis" : { "source" : "url" , "execution_id" : "URLPARAM"}} , "geometries" : { "type" : "FeatureCollection" , "features" : image_data}}
          x.push(dummy_mark)
          console.log(x)
          return x
        }
      })
    } else {
      return this.getMarkByIds_raw(ids, slide)
    }
  }

}

export default ParamPoly

@@ -634,32 +634,33 @@
 lide)%7B%0A    if (!
+(
 urlvar in getUrl
@@ -658,32 +658,33 @@
 in getUrlVars())
+)
 %7B%0A      return x
@@ -1243,32 +1243,33 @@
 name)%7B%0A    if (!
+(
 urlvar in getUrl
@@ -1267,32 +1267,33 @@
 in getUrlVars())
+)
 %7B%0A      return x
@@ -1753,16 +1753,17 @@
    if (!
+(
 urlvar i
@@ -1777,16 +1777,17 @@
 lVars())
+)
 %7B%0A      

fix no url var conditionals