public void dragNDropZoom(double xStartCoord, double yStartCoord, double xEndCoord, double yEndCoord)
	{
		final double mapXStartCoord = Math.min(convertMouseXToMap(xStartCoord),convertMouseXToMap(xEndCoord));
		final double mapYStartCoord = Math.min(convertMouseYToMap(yStartCoord),convertMouseYToMap(yEndCoord));
		final double mapXEndCoord = Math.max(convertMouseXToMap(xStartCoord),convertMouseXToMap(xEndCoord));
		final double mapYEndCoord = Math.max(convertMouseYToMap(yStartCoord),convertMouseYToMap(yEndCoord));

		double zoomconstant;
		if (mapXEndCoord - mapXStartCoord > mapYEndCoord - mapYStartCoord)
		{
			zoomconstant = (mapXEndCoord - mapXStartCoord) / visibleArea.getxLength();
		} else
		{
			zoomconstant = (mapYEndCoord - mapYStartCoord) / visibleArea.getyLength();
		}
		int fixRounds = 0;
		while ((visibleArea.getxLength() * zoomconstant) < (quadTreeToDraw.getQuadTreeLength() / 100000) && fixRounds != 20)
		{
			zoomconstant += 0.02;
			fixRounds++;
		}
		if (fixRounds >= 20)
		{
			return;
		}
		final double newXLength = visibleArea.getxLength() * zoomconstant;
		final double newYLength = visibleArea.getyLength() * zoomconstant;
		
		visibleArea.setCoord(mapXStartCoord+newXLength/2-xlength/2, mapYStartCoord+newYLength/2-ylength/2, xlength, ylength);
		
		searchXCoord = getWidth() / 2;
		searchYCoord = getHeight() / 2;
		
		timer.purge();
		timer.cancel();
		timer = new Timer();
		TimerTask task = new TimerTask() {
			@Override
			public void run()
			{
				if (xlength <= newXLength)
				{
					visibleArea.setCoord(mapXStartCoord, mapYStartCoord, newXLength, newYLength);
					timer.cancel();
					timer.purge();
					searchYCoord = 0;
					searchXCoord = 0;
					zoomInConstant = 0.98;
					repaint();
				}
				else
				{
					zoomInConstant = 0.99 - Math.log(xlength)*0.0014;
					zoomIn(searchXCoord, searchYCoord);
					repaint();
				}
			}
		};
		timer.scheduleAtFixedRate(task, 10, 10);
	}