function Measure(args) {
    /*jshint validthis: true */
    var options = {
        position: {
            //top: '100px',
            //left: '100px',
            //bottom: '100px',
            //right: '100px'
        },
        center: true,
        id: 0
    };
    $.extend(options, args);
    this.options = options;
}


Measure.prototype.init = function() {

	$("#btnDistance").click(function (event){
		//if (DOT.DOTClickHandler) DOT.DOTClickHandler.remove();
		DOT.toolActivated = true;
		DOT.distanceMeasurement();
	});

	$("#btnArea").click(function (event){
		//if (DOT.DOTClickHandler) DOT.DOTClickHandler.remove();
		DOT.toolActivated = true;
		DOT.areaMeasurement();
	});

	$("#btnMClear").click(function (event){
		//if (DOT.DOTClickHandler.remove) DOT.DOTClickHandler = DOT.map.on("click", DOT.onPlanClick);
		DOT.map.popup.autoOpenEnabled = true;
		DOT.toolActivated = false;
		DOT.clearMeasurements();
	});			

	$('#measurePanel').on('shown.bs.collapse', function () {
		//if (DOT.DOTClickHandler) DOT.DOTClickHandler.remove();
		//DOT.map.setInfoWindowOnClick(false);
		//DOT.txtmarkClickHandler = DOT.map.on("click", DOT.txtmarkClick);
		DOT.map.popup.autoOpenEnabled = false;
	});

	$('#measurePanel').on('hidden.bs.collapse', function () {
		//DOT.txtmarkClickHandler.remove();
		//if (DOT.DOTClickHandler.remove) DOT.DOTClickHandler = DOT.map.on("click", DOT.onPlanClick);
		//DOT.map.setInfoWindowOnClick(true);
		DOT.map.popup.autoOpenEnabled = true;
		//$("#btnTextmarkup").css("background-color","white");
		DOT.toolActivated = false;
		clicked = 0;
	});

};
