Determine whether a checkbox is checked or unchecked
This is tighter I think:

function addParameter( url , name , value )
{
  var justHostname = ( location.href == ( location.protocol + "//" + location.host + "/" ),
      separator = justHostname?"?":"&amp;"
  return url + separator + encodeURIComponent(name) + "=" + encodeURIComponent(value);
}


$('#mapControl').on('click', function(){ 
    var url = window.location.href,
        urlParamObj = $('#urlParam');
    if(this.checked) 
    {
      url = addParameter( url , 'mapControl' , 'true' )
    } else {
      url = url.replace('?mapControl=true&amp;','?')
               .replace('?mapControl=true','')
               .replace('&amp;mapControl=true',''); 
    }
    urlParamObj.val(thisUrl);
});


I did not test this, but you should catch the drift.

If it were me though, I would not re-invent the wheel and use the code from the answer here : 
https://stackoverflow.com/questions/6953944/how-to-add-parameters-to-a-url-that-already-contains-other-parameters-and-maybe