class GetVectorTileCommand implements CommandHasRequest<GetVectorTileRequest, GetVectorTileResponse> {

	@Override
	public void execute(GetVectorTileRequest request, GetVectorTileResponse response) throws Exception {
		String layerId = request.getLayerId();
		log.debug("request start layer {}, crs {}", layerId, request.getCrs());
		if (null == layerId) {
			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "layer");
		}
		if (null == request.getCrs()) {
			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "crs");
		}

		response.setTile(converter.toDto(layerService.getTile(request)));
	}

}